Hi All!
I have looked through the list and don't seem to find anything that answers
my specific question, but if there is... I apologise!
I have an xml file similar to this:
<abs:body>
<abs:heading class='100' string='test'>
<abs:heading class='200' string='tester'></abs:heading>
<abs:heading class='300' string='sometext'></abs:heading>
<abs:heading class='300' string='somemoretext'></abs:heading>
<abs:heading class='200' string='testing'></abs:heading>
</abs:heading>
</abs:body>
This is the output I would like:
class = 200 string='tester'
class = 200 string='testing'
class = 300 string='sometext'
class = 300 string='somemoretext'
What I am trying to achieve is to throw out all instances of a specific
class, so for example I might do a <xsl:apply-templates
select="@class=200">, then I might have a specific template match for that
class somewhere.
But then, which is the bit I am struggling with is being able to then list
all instances of another class. Now if I then make a call to something like
<xsl:apply-templates select="@class=300"> again with a template match
somewhere in my xsl, nothing seems to happen.
I think the problem is that the class=300 elements in the xml above could be
great great grand children of a class=200 element.
Sample xsl (forgive the errors in syntax, I hope it is clear enough though):
<xsl:apply-templates select="@class=200"/>
<xsl:apply-templates select="@class=300"/>
<xsl:template match="@class=200">
Output something here
</xsl:template>
<xsl:template match="@class=300">
Output something else here
</xsl:template>
Is it a case of having to do a <xsl:apply-templates/> in the first template
match so the rest of the document is parsed in memory?
I hope I have explained my question clearly...?
Thanks for any help or advice!
AM
--~------------------------------------------------------------------
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>
--~--