https://issues.apache.org/bugzilla/show_bug.cgi?id=44635

           Summary: XSLT split one CDATA block into several
           Product: Ant
           Version: 1.6.5
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Keywords: XSLTBug
          Severity: major
          Priority: P3
         Component: Core tasks
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Hello.
I have a problem with simple xslt transformation.

<?xml version="1.0" encoding="windows-1251"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
        <xsl:output method="xml" encoding="UTF-8" indent="no"
omit-xml-declaration="no" cdata-section-elements="string"/>
        <xsl:template match="*">
                <xsl:copy>
                        <xsl:for-each select="@*">
                                <xsl:copy/>
                        </xsl:for-each>
                        <xsl:apply-templates/>
                </xsl:copy>
        </xsl:template>
</xsl:stylesheet>

It's copy one xml-doc to another.
I try to copy the next document
<?xml version="1.0" encoding="UTF-8"?>
<property name="propertyComment">
        <string><![CDATA[leave blank for no input, "console" to read from the
console window,
and any path to a file to read from that file]]></string>
</property>

And this is the ant-script, that i use:
<?xml version="1.0" encoding="windows-1251"?>
<project default="help" basedir=".">
    <target name="help">
        <xslt basedir="." destdir=".\1\"  style="test.xsl" force="true"
in="test.xml" out="test.xml.new" processor="trax">
        </xslt>
    </target>
</project>

In the output dcument I have several CDATA instead of one in source document:
<?xml version="1.0" encoding="UTF-8"?>
<property name="propertyComment">
        <string><![CDATA[leave blank for no input, "con]]><![CDATA[sole" to
read from the console w]]><![CDATA[indow,
and any path to a file to]]><![CDATA[ read from that file]]></string>
</property>


When I use Microsoft xslt processor it outputs only one CDATA block in this
case.
Why trax output several CDATA blocks?
Can I fixed it?

All documents that i've mentioned are attached.

Best regards,
Victor


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to