You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Timothy Larson <Td...@ci.canton.oh.us> on 2002/11/15 14:39:44 UTC
Output not well formed from Cocoon, but fine from Saxon on
command line
I am sending this again because it did not seem to hit the list.
Sorry if you have already seen this email.
Using Saxon7.2 in Cocoon 2.0.4dev from Nov 13 2002,
I apply stylesheet A to stylesheet B.
This produces stylesheet C, which is NOT well formed.
(Notice the <xsl:copy>...</x2:copy>)
Using Saxon7.2 from the command line,
I apply stylesheet A to stylesheet B.
This produces stylesheet D, which IS well formed.
Anybody have clues how to get this to work from Cocoon?
Tim
---
Stylesheet A:
<?xml version="1.0"?>
<xsl:stylesheet version="2.0"
xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
xmlns:x2 = "http://www.w3.org/1999/XSL/TransformAlias"
exclude-result-prefixes="x2">
<xsl:namespace-alias stylesheet-prefix="x2" result-prefix="xsl"/>
<xsl:template match="/">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="x2:stylesheet">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
<x2:template match="sometag"><a-tag/></x2:template>
</xsl:copy>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Stylesheet B:
<?xml version="1.0"?>
<xsl:stylesheet version="2.0"
xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
xmlns:x = "http://www.w3.org/1999/XSL/TransformAlias"
exclude-result-prefixes="x">
<xsl:namespace-alias stylesheet-prefix="x" result-prefix="xsl"/>
<xsl:template match="/">
<xsl:copy>
<x:stylesheet>
<x:template match="/"><x:value-of select="test"/></x:template>
</x:stylesheet>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Stylesheet C:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" exclude-result-prefixes="x" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:x="http://www.w3.org/1999/XSL/TransformAlias">
<xsl:namespace-alias stylesheet-prefix="x" result-prefix="xsl"/>
<xsl:template match="/">
<xsl:copy>
<x:stylesheet>
<x:template match="/"><x:value-of select="test"/></x:template>
<x2:template match="sometag" xmlns:x2="http://www.w3.org/1999/XSL/Transform"><a-tag/></x2:template></x:stylesheet>
</x2:copy>
</x2:template>
</x2:stylesheet>
Stylesheet D:
<?xml version="1.0" encoding="utf-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:x="http://www.w3.org/1999/XSL/TransformAlias" version="2.0" exclude-result-prefixes="x">
<xsl:namespace-alias stylesheet-prefix="x" result-prefix="xsl"/>
<xsl:template match="/">
<xsl:copy>
<x:stylesheet>
<x:template match="/"><x:value-of select="test"/></x:template>
<x2:template xmlns:x2="http://www.w3.org/1999/XSL/Transform" match="sometag"><a-tag/></x2:template></x:stylesheet>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>