[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Get all childs with xsl:for-each
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.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|