[ http://issues.apache.org/jira/browse/XALANJ-1338?page=all ]
     
Brian Minchau closed XALANJ-1338:
---------------------------------

    Assign To:     (was: Xalan Developers Mailing List)

> Testcase in error, CDATA sections for xml output
> ------------------------------------------------
>
>          Key: XALANJ-1338
>          URL: http://issues.apache.org/jira/browse/XALANJ-1338
>      Project: XalanJ2
>         Type: Bug
>   Components: Xalan
>     Versions: Latest Development Code
>  Environment: Operating System: Windows NT/2K
> Platform: Other
>     Reporter: Brian Minchau

>
> Testcase output46 has a "gold" file that has output text elements wrapped in 
> CDATA. 
> I've compared with SAXON, and Xalan's gold file is wrong.
> output46.xsl has this:
>       <xsl:output cdata-section-elements="test"/>
>       <xsl:output method="html"  doctype-public="-//W3C//DTD HTML 4.0 
> Transitional"  cdata-section-elements="example"/>
> Its output has both elements, "test" and "example" put out as CDATA.  However 
>  
> SAXON does not do this, and the XSLT 1.0 says this under section 16:
> >> If the semantics of an attribute are not described 
> >> for an output method, 
> >> then it is not applicable to that output method.
> In section 16.2 the cdata-section-elements attribute is not mentioned under 
> HTML output, so I must assume that it is not applicable.
> With SAXON the result is:
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional">
> <example>&lt;foo&gt;</example>
> <test>]]&gt;</test>
> but Xalan gives:
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional">
> <example><![CDATA[<foo>]]></example>
> <test><![CDATA[]]]]><![CDATA[>]]></test>
> Comments in output46.xsl indicate that it expects both elements to be ouput 
> as 
> CDATA but the gold file is wrong according to XSLT 1.0.  
> The simplest fix seems to me to not push or pop any values on the stack 
> m_cdataSectionStates for HTML output.  This stack keeps track of whether the 
> current element was listed in the cdata-section-elements or not. 
> I'd suggest keeping the existing testcase, but changing method="html" to 
> method="xml" in the stylesheet.  An addition testcase should be written to 
> test 
> that cdata-section-elements attribute is ignored for method="html".
> - Brian Minchau, IBM

-- 
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