This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Error message when match=$variable


Hi,

When I run the following stylesheet with
<xsl:template match="$english/node()">,
which should display all the nodes of the english.xml, I get an error

httpd: expr.cpp:1627: Bool Expression::patternOK(): Assertion `functor ==
EXFO_U
NION || functor == EXF_LOCPATH' failed.

and yet when I change it to
<xsl:template match="node()">
it won't give an error, but neither will it select the nodes of $english
variable!

Can anyone help?

Tim Watts
PS. I'm using Sablotron

XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:variable name="english"
select="document(languages/english.xml)/language"></xsl:variable>
<xsl:variable name="german"
select="document(languages/german.xml)/language"></xsl:variable>

<xsl:template match="/">
<html>
<head>
</head>
<body>
	<textarea rows="20" cols="100">
	<xsl:apply-templates select="$english/node()" />
	</textarea>
</body>
</html>
</xsl:template>

<xsl:template match="$english/node()">
<xsl:value-of select="name()" /> = <xsl:value-of select="." />&#10;
</xsl:template>

</xsl:stylesheet>

I get error message...

httpd: expr.cpp:1627: Bool Expression::patternOK(): Assertion `functor ==
EXFO_U
NION || functor == EXF_LOCPATH' failed.

except when I change 

<xsl:template match="$english/node()">
<xsl:value-of select="name()" /> = <xsl:value-of select="." />&#10;
</xsl:template>

to

<xsl:template match="node()">
<xsl:value-of select="name()" /> = <xsl:value-of select="." />&#10;
</xsl:template>

when the text block simply won't find a template to match with!

The XML looks like :

<?xml version="1.0" encoding="UTF-8"?>
<language>
	<ld-hello>Hello</ld-hello>
	<ld-goodbye>Good-Bye</ld-goodbye>
</language>

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]