xsl-list
[Top] [All Lists]

Re: XSL can be used as a DOM?

2005-11-16 05:02:35
Hi raj,

I have question. Is the XSL can be used as a DOM?

Not sure what you mean here.


In the above xml, i should start with <Order-list>
element and if it has child, traverse the child and
accessing the text() of <h> and coming out to parent
one by one and accessing the next sibiling of
<ordered-list> like that..

I presume that you mean ordered-list here...?

From how I understand your question, I would write something like:

<xsl:template match="office">
  <xsl:apply-templates select="ordered-list"/>
</xsl:template>

<xsl:template match="ordered-list">
  <xsl:apply-templates select="*"/>
</xsl:template>

<xsl:template match="ordered-list/*">
  <xsl:value-of select="h"/>  <!-- Get's the first text() child of h element -->
  <xsl:apply-templates select="ordered-list"/> <!-- Recurse through
more ordered lists -->
</xsl:template>

I hope I understood your question
Ragulf Pickaxe :-)

--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>