xsl-list
[Top] [All Lists]

Re: [xsl] Still thinking to object oriented...

2008-09-29 05:49:25
For example i have the structure like this:

<node_a>
  <node_b>
     <node_c>
        <node_a>
           <node_to_search_1/>
        </node_a>
        <node_b>
           <node_d>
              <node_to_search_2/>
           </node_d>
        </node_b>
     </node_c>
  </node_b>
</node_a>

I am searching for "node_to_search_1" and "node_to_search_2" and i
want the result like this:

node_a
node_b
node_c
node_a
node_to_search_1
node_b
node_d
node_to_search_2


I think you need to rethink that example, because it's simply the
names of the nodes listed in document order, eg:

<xsl:template match="/">
        <xsl:for-each select="//*">
                <xsl:value-of select="concat('&#xa;',name())"/>
        </xsl:for-each>
</xsl:template>

:)


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--