Project

Profile

Help

getOutputProperties() not according to spec?

Added by Anonymous about 16 years ago

Legacy ID: #4830557 Legacy Poster: Mattias M (molke)

Hi! I think I've come across a small deviation from JAXP specifications in SaxonB 9.0.0.2. After parsing a stylesheet containing this element: <xsl:output media-type="application/xml"/> I would expect this expression to return the value "application/xml" (xslStylesheet in an instance of Templates): xslStylesheet.getOutputProperties().get("media-type") according to the specification of the operation getOutputProperties at http://java.sun.com/javase/6/docs/api/javax/xml/transform/Transformer.html#getOutputProperties() (specifically "getOutputProperties().get(String key) will only retrieve properties that were explicitly set [...] in the stylesheet."), but instead it returns null. Turns out that even the explicitly set properties are in the backing "defaults" Properties object of the returned object, and has to be retrieved using getProperty. Any thoughts? /MM


Please register to reply