Re: How to get xsl:output/@method after transformation?
Martin Honnen <[email protected]> Thu, 29 Apr 2021 21:36:34 +0200
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Organization | Liberty Development |
| Message-ID | <[email protected]> |
On 29.04.2021 21:27, Martin Honnen wrote: > On 29.04.2021 21:24, John Ulric wrote: >> Hello all, when using s9api, after a transformation with >> net.sf.saxon.s9api.XsltTransformer.transform(), is there a way to get >> the output method that the stylesheet declared in its xsl:output >> element? (Or the corresponding content type?) >> >> I tried calling .getOutputProperty(Serializer.Property.METHOD) on the >> net.sf.saxon.s9api.Serializer in use, but this seems to return a value >> only if it was set programatically, not the method that the stylesheet >> declares. > > Which Saxon version/release exactly? Is that only about the primary > result or any result document? In Saxon 10 subclassing Serializer to override getReceiver https://www.saxonica.com/html/documentation10/javadoc/net/sf/saxon/s9api/Serializer.html#getReceiver-net.sf.saxon.event.PipelineConfiguration-net.sf.saxon.serialize.SerializationProperties- should allow you to read out or capture any SerializationProperties.