[ http://issues.apache.org/jira/browse/XALANJ-2130?page=comments#action_12316479 ]
Henry Zongaro commented on XALANJ-2130: --------------------------------------- >From a note I sent to Brian privately: «I started to review your patch for XALANJ-2130, and was a bit confused about the change to Output.java. It's handling URIs in braces, but the code in that class never puts URIs in braces. Try this example, and you'll see what I mean: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" cdata-section-elements="me:thou" xmlns:me="uri1"/> <xsl:output method="xml" cdata-section-elements="we:you" xmlns:we="uri2"/> </xsl:stylesheet> » I just wanted to record the comment so it wouldn't get lost. > cdata-section-elements are not properly set via JAXP > ---------------------------------------------------- > > Key: XALANJ-2130 > URL: http://issues.apache.org/jira/browse/XALANJ-2130 > Project: XalanJ2 > Type: Bug > Components: XSLTC > Reporter: Brian Minchau > Assignee: Brian Minchau > Attachments: cdata-section-elements.patch.jira2130.txt > > Section 16. of the XSLT 1.0 recommendation ( see http://www.w3.org/TR/xslt ) > says this: > << > A stylesheet may contain multiple xsl:output elements and may include or > import stylesheets that also contain xsl:output elements. All the xsl:output > elements occurring in a stylesheet are merged into a single effective > xsl:output element. For the cdata-section-elements attribute, the effective > value is the union of the specified values. For other attributes, the > effective value is the specified value with the highest import precedence. It > is an error if there is more than one such value for an attribute. An XSLT > processor may signal the error; if it does not signal the error, if should > recover by using the value that occurs last in the stylesheet. > >> > Even after this is done one can use the JAXP API > Transformer.setOutputProperty(name,value) or > Transformer.setOutputProperty(java.util.Properties) to override values in the > stylesheet, that would be in its "single effective merged xsl:output element". > In the spirit of what the stylesheet does, it would seem that if a > cdata-section-elements property is set, it should not override the > stylesheets set of sections, but be a union with it, just as the xsl:output > cdata-sections-elements form an effective union. This is unlike other > xsl:output attributes. > The effective xsl:output attributes can be modified with mulitple calls to > Transformer.setOuputProperty(String name, String value) and/or > Transformer.setOutputProperty(java.util.Properties) > However the serializer is brittle with respect to multiple such calls namely: > - cdata-section-elements from JAXP do merge with the stylesheets values, they > replace the stylesheets values > - Writers can be lost > - properties with namespaces, where the name part of the property is of the > form > "{uri}localname" are not properly handled, (i.e. it doesn't parse the uri > from within the curly braces). > The code needs some re-work to make it robust. -- 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]
