|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: how to test for the element type of the current no
I'd like to add a comment to my question;
instead of
>
> <xsl:template match="A">
> <xsl:for-each select="*">
> <xsl:choose>
> <xsl:when test="if this node is a B"> <--- this is what I can't figure out
> apply-templates for B
>
> ...
> <xsl:otherwise>
> do something else for C
> ...
>
I also thought about using:
<xsl:template match="A">
<xsl:for-each select="B">
apply-templates for B
</xsl:for-each>
<xsl:for-each select="select all nodes that are not Bs">
....
But I couldn't figure that out either: "not(B)", for instance, is a
boolean and not a node set.
( Note that in my actual application, it's not A -> (B|C)*, it's
A -> (B|....many alternatives here...)*,
so it's not practical to list them all in their own select() clauses. )
- Godmar
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








