This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: That didnt work either! RE: How to add a "less than" or "grea ter than" sign?
- To: xsl-list at mulberrytech dot com
- Subject: Re: That didnt work either! RE: How to add a "less than" or "grea ter than" sign?
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Thu, 13 Apr 2000 21:45:06 +0100 (BST)
- References: <DF9599D767C4D31195670006293825F912D539@lasexch1.purchasepro.net>
- Reply-To: xsl-list at mulberrytech dot com
<xsl:template match="/">
<<xsl:value-of select="@title"/>>2000</<xsl:value-of
select="@title"/>>
This is valid, it's just a strange thing to do, unless you are trying to
describe XML elements in an HTML <pre> or something. That is
it is making some text that looks like an element markup, it
isn't making an element. In this case however @title will be empty
I would assume it would produce the text <>2000</>.
<xsl:element name="{@title}">2000</xsl:element>
This would be valid if the current node had a title attribute that was
supplying the characters to make a valid XML element name.
But as this template is for the root node, there can't be any
attributes. so @title must be empty, and so this is the same as
<xsl:element name="">2000</xsl:element>
which is an error as <>2000</> is not well formed XML.
So in this case you should get an error from the xsl system.
</xsl:template>
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list