[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] Get all childs with xsl:for-each
Subject: [xsl] Get all childs with xsl:for-each From: "Robert Soesemann" <rsoesemann@xxxxxxxxxxx> Date: Tue, 8 Feb 2005 13:03:11 +0100 |
Why can't I get all <a> or <img> tags inside a relation when I use the above template? <my-relation name="relatedImages" type="image" multi="yes"> <td width="75%"> <ul> <li> <a href="../images/autobahnraser.jpg">autobahnraser.jpg</a> <br /> </li> </ul> </td> </my-relation> In my template where I match all <my-????> tags I have: <xsl:when test="name(.) = 'my-relation'"> <xsl:for-each select="descendant-or-self::a"> <foo url="{@url}"/> </xsl:for-each> <xsl:for-each select="descendant-or-self::img"> <bar src="{@src}"/> </xsl:for-each> </xsl:when> And althoug there are <a> and <img> in my input XML I don't get any <foo> and <bar> in the output. What am I doing wrong? R.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] problem locating the xsl , David Carlisle | Thread | Re: [xsl] Get all childs with xsl:f, David Carlisle |
Re: [xsl] problem locating the xsl , David Carlisle | Date | [xsl] How to apply different page m, Arun Sinha |
Month |
Keywords