|
Subject: Re: [xsl] descendant-or-self XSLT 1.0 From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Mon, 20 Mar 2006 08:27:29 -0500 |
Hello list!
I've got a xml: ... 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/>
T:\ftemp>type swisslab.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>T:\ftemp>xslt swisslab.xml swisslab.xsl con 123456 123456 T:\ftemp>type swisslab.xsl <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/"> <xsl:apply-templates select="//node"/> <xsl:text> </xsl:text> <xsl:apply-templates select="//result"/> </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>
</xsl:stylesheet> T:\ftemp>
-- Upcoming XSLT/XSL-FO hands-on courses: Washington,DC 2006-06-12/16 World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] descendant-or-self XSLT 1.0, news | Thread | RE: [xsl] descendant-or-self XSLT 1, cknell |
| [xsl] descendant-or-self XSLT 1.0, news | Date | RE: [xsl] descendant-or-self XSLT 1, cknell |
| Month |