xsl-list
[Top] [All Lists]

RE: xml not well-formed

2006-01-08 07:13:02
Use an attribute value template, id="{Location}"

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: dan(_at_)streampad(_dot_)com [mailto:dan(_at_)streampad(_dot_)com] 
Sent: 08 January 2006 08:05
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] xml not well-formed

In the below example, I would like to make the div id = <xsl:value-of
select="Location"/>, but this will not work since it is not 
well-formed
xml. Is there any way to reference this node without using an 
xml element?

Thanks,
Dan

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:template match="/">
<html>
<body>
     <xsl:for-each select="songlist/song">
        <div id="<xsl:value-of select="Location"/>"><xsl:value-of
select="Name"/></div>
     </xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>


--~------------------------------------------------------------------
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>
--~--





--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>