Bug 44635 - XSLT split one CDATA block into several
Summary: XSLT split one CDATA block into several
Status: RESOLVED INVALID
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.6.5
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords: XSLTBug
Depends on:
Blocks:
 
Reported: 2008-03-19 09:36 UTC by Vitia
Modified: 2008-03-22 07:44 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitia 2008-03-19 09:36:14 UTC
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
Comment 1 Peter Reilly 2008-03-22 07:44:01 UTC
This is an ant bugzilla site, not an xslt site.
please direct this request for infomration to the correct site.