Tempore 06:15:16, die 01/23/2005 AD, hinc in
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com scripsit Touchtel
<omprakashv(_at_)touchtelindia(_dot_)net>:
Iam using a stylesheet to generate another stylesheet and having some
problems like the processor not recognising the aliased namespace (x:)
the
2nd time around. The following are my xml and and input and output
stylesheet snippets. The snippets are quite large but I am not sure how
to
make these smaller than this.
Hi,
Do the following things to make it work:
* omit 'exclude-result-prefixes="x"'
* write <xsl:element name="xsl:template"/> (or <x:template/>) rather than
<xsl:element name="x:template"/>
This is a working stylesheet:
<xsl:stylesheet version="1.0"
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:output method="xml" indent="yes" encoding="iso-8859-1"/>
<xsl:template match="school">
<x:stylesheet version="1.0">
<x:strip-space elements="*"/>
<xsl:element name="xsl:template">
<xsl:attribute name="match">
<xsl:value-of select="person"/>
</xsl:attribute>
<BODY>
This is the body text
<x:apply-templates>
<x:with-param name="path" select="person"/>
</x:apply-templates>
</BODY>
</xsl:element>
<xsl:apply-templates />
</x:stylesheet>
</xsl:template>
<xsl:template match="student">
<xsl:if test="not(@name='person')">
<xsl:element name="xsl:template">
<xsl:attribute name="match">
<xsl:value-of select="@name" />
</xsl:attribute>
<a href="#">This is a student <x:value-of select="@name"/></a>
</xsl:element>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
Deserta faciunt et innovationem appelant
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--