xsl-list
[Top] [All Lists]

Test for current node being an element or attribute?

2002-12-10 06:03:04
Hi,

Is there a way in XSL to test the current node being an element or
attribute?

I'm using a copy template (recursively) that matches "@*|node()" and
would like to decide what to do (<xsl:choose>) depending on the text
content of the current node (nodes with arbitrary names, so no fix
testing possible!).

To point it out: I have to manipulate the contents of the nodes and
therefor I apply <xsl:element name="{name()}"> and
<xsl:attribute name="{name()}"> on these specific nodes (perhaps a
bad approach?). Some elements and attributes are simply copied,
others get a new content.

Tips appreciated,
Georges


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list