[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Can't match node without node()[name(.) syntax

Subject: Can't match node without node()[name(.) syntax
From: "Robert Soesemann" <rsoesemann@xxxxxxxxxxx>
Date: Tue, 30 Nov 2004 14:55:48 +0100
xsl template match
Help;-(

I experienced that I cannot match any element in the normal way of just
Naming the node name. Instead I also need to write "node()[name(.)='....
Any ideas why that happens? Could it be the identity template that I
use?

This works (I see <FOOOOOO/>):
-----------------------------
	<!-- Copy nodes except those affected by other templates -->
	<xsl:template match="/ | @* | node()">
	   <xsl:copy>
	     <xsl:apply-templates select="@* | node()"/>
	   </xsl:copy>
	</xsl:template>

	<!-- Match all kiwi-relation elements  -->
	<xsl:template match="node()[name(.) = 'my-relation']">

        <FOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO/>
        ...

This doesn't works (I don't see <FOOOOOO/>):
-------------------------------------------
	<!-- Copy nodes except those affected by other templates -->
	<xsl:template match="/ | @* | node()">
	   <xsl:copy>
	     <xsl:apply-templates select="@* | node()"/>
	   </xsl:copy>
	</xsl:template>

	<!-- Match all kiwi-relation elements  -->
	<xsl:template match="my-relation">
        <FOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO/>
        ...
Why that?

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.