Subject: Re: [xsl] about xsl:when From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 8 Mar 2001 16:39:56 GMT |
] <xsl:template match = "persona[@id]" > that matches persona elements that have an id. so . is the _element_ node and in ".='1' you are testing the string value of the element (ie all the character data in all its descendents) against '1'. I would guess you want "@id='1' Incidentally you might prefer not to have an xsl:choose at all but just do it in the match: <xsl:template match = "persona[@id=1 or @id=2]" priority="2"> <br/> edad=<xsl:value-of select="name"/> </xsl:template> <xsl:template match = "persona[@id]" > <br/> <xsl:text >no hay</xsl:text> </xsl:template> <xsl:template match = "persona" > <br/> <xsl:text >no id attribute at all</xsl:text> </xsl:template> David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Control Centre. For further information visit http://www.star.net.uk/stats.asp XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] about xsl:when, dago | Thread | RE: [xsl] about xsl:when, Michael Kay |
[xsl] How to specify a path to a no, Shakeel Mahate | Date | Re: [xsl] problem matching template, David Carlisle |
Month |