[ 
http://issues.apache.org/jira/browse/XALANJ-2133?page=comments#action_66909 ]
     
Brian Minchau commented on XALANJ-2133:
---------------------------------------

The patch is rather simple. Rather than parse the java.util.Properties object, 
as created from JAXP, and pass only the attributes that it recognizes, the body 
of that method simply calls the already existing
serializer.setOutputFormat(props) method and lets the serializer worry about it.

Not only is this easier, but it handles serialization extension elements on the 
xsl:output attribute, both now and into the future with no code changes.  It is 
more robust. It also gets the cdata-section-elements with values of the form 
"b1 {uri2}b2  " working right away, as the serializer is expecting that format 
for the value (XSLTC was not expecting that format).


> XSLTC identity transform doesn't set all JAXP output properties
> ---------------------------------------------------------------
>
>          Key: XALANJ-2133
>          URL: http://issues.apache.org/jira/browse/XALANJ-2133
>      Project: XalanJ2
>         Type: Bug
>     Reporter: Brian Minchau
>  Attachments: patch.jira.2133.txt
>
> When running the XSLTC identity transform via JAXP it is possible to 
> effectively set xsl:output properties via the JAXP setOutputProperty() method.
> Unfortunately the method
>    transferOutputProperties(SerializationHandler)
> in the class:
>    org.apache.xalan.xsltc.trax.TransformerImpl
> parses the output properties itself, and only passes those that it recognizes
> to the handler. In doing so it fails to pass any xalan extension properties, 
> such as "{http://xml.apache.org/xalan}indent-amount";.  It also does its own 
> parsing of "cdata-section-elements" and incorrectly parses the URI. It 
> doesn't look for a URI surrounded by braces, as it should according to JAXP.
> All this method does is parse the properties and call setter-s one at a time 
> on the handler.  The fix is simply to pass the java.util.Properties object to 
> the already public API that is on the Serializer interface, namely
>    setOutputFormat(java.util.Properties)
> and let it deal with all of the properties itself.  This will smoothly get 
> all properties set via JAXP to the serializer.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to