|
Subject: [xsl] descendant-or-self XSLT 1.0 From: news@xxxxxxxxxxx Date: Mon, 20 Mar 2006 14:15:26 +0100 |
Hello list!
I've got a xml:
<xml>
<node>
<result>1</result>
<result>2</result>
<result>3</result>
<diff>
<result>4</result>
<result>5</result>
<result>6</result>
</diff>
</node>
<node>
...
</node>
...
</xml>
I want to process all result children inside the <node> node. No matter if
they are stored inside <node/> or the descendant <diff/>. I want to handel
the <result/> nodes as one result set. So I m trying not to use two
apply-templates after another.
Example:
<xsl: template match"/">
<xsl:apply templates select="//node"/> </xsl:template>
<xsl:template match="node">
<xsl:apply-templates select="descendant-or-self::result"/>
</xsl:template>
<xsl:template match="result">
<xsl:value-of select="."/>
</xsl:template>
The output WANTED is "123456".
The output I GET is "123"
When trying:
<xsl:apply-templates select="*/result"/> I only get 456.
:(
What Xpath do I have to use in XSLT 1.0 to get ALL <result/>
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Announce: Repeat XSL Delivery, G. Ken Holman | Thread | Re: [xsl] descendant-or-self XSLT 1, G. Ken Holman |
| Re: [xsl] XSL-FO and XSD Informatio, Kamal Bhatt | Date | Re: [xsl] descendant-or-self XSLT 1, G. Ken Holman |
| Month |