Subject: Re: [xsl] Question:from Michael Kay's Book From: Greg Faron <gfaron@xxxxxxxxxxxxxxxxxx> Date: Wed, 09 Oct 2002 15:46:04 -0600 |
The following is what i read.. <<//@width/..>> selects all the elements in the document that have a width attribute.
would this mean that if i have a xml file that looks like.. <rooms> <room width = "1"> my room 1 </room> <room width = "2"> my room 2 </room> <room width = "3"> my room 3 </room> <room width = "4"> my room 4 </room> </rooms>
then an XSL code like
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:value-of select="//@width/.."/><br/>
</xsl:template>
</xsl:stylesheet>
should return me all the rooms text like my room 1 my room 2 my room 3 my room 4..
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:for-each select="//@width/.."> <xsl:value-of select="."/><br/> </xsl:for-each> </xsl:template> </xsl:stylesheet>
> I am a bit confused about the above mentioned statement that > i read in the book. I shud be grateful if someone(possibly > Mr Kay) clears my doubt..I think i am missing something here..
Greg Faron Integre Technical Publishing Co.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Node renaming problem, Greg Faron | Thread | [xsl] attempting a preceding-siblin, Carrie Kaufman |
RE: [xsl] Abbreviated form of XSLT?, Deborah Aleyne Lapey | Date | Re[2]: [xsl] Abbreviated form of XS, Michael R. Hahn |
Month |