xsl-list
[Top] [All Lists]

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

2004-11-30 07:34:35
Hi Robert,

It would help if you post your XML (or a typical excerpt if it's too long).

Cheers,
<prs/>

-----Original Message-----
From: Robert Soesemann [mailto:rsoesemann(_at_)sapient(_dot_)com] 
Sent: Tuesday, November 30, 2004 7:56 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Can't match node without node()[name(.) syntax

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?

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

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