|
Subject: [xsl] xsl:sequence produces error I cant understand From: Kenneth Stephen <marvin.the.cynical.robot@xxxxxxxxx> Date: Sun, 10 Oct 2004 14:44:36 -0500 |
Hi,
The following code :
<?xml version="1.0"?>
<xsl:stylesheet version="2.0"
xmlns:ns="urn:dummyNamespace"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" />
<ns:root>
<ns:child attr="x" />
<ns:child attr="y" />
</ns:root>
<xsl:template match="/">
<xsl:for-each
select="document('')/xsl:stylesheet/ns:root/ns:child">
<xsl:if test="@attr = 'y'">
<xsl:sequence select="@attr" />
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
....when invoked on itself produces :
bash-2.05b$ java net.sf.saxon.Transform seq.xsl seq.xsl
Error at if on line 15 of file:/C:/cygwin/home/zaphod/code/seq.xsl:
Cannot write an attribute when there is no open start tag
Transformation failed: Run-time errors were reported
Can someone help me understand my error please?
Thanks,
Kenneth
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Union of XPath sequences , Jeni Tennison | Thread | Re: [xsl] xsl:sequence produces err, Jeni Tennison |
| Re: [xsl] Xslt transform & grouping, row.filter | Date | Re: [xsl] re-ordering nodes/partial, Anton Triest |
| Month |