Subject: RE: Fwd: [xsl] complex XPATH test From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 17 Jul 2001 16:04:26 -0400 |
At 02:58 PM 7/17/01, you wrote: ...
For starters, there has to be a better way of returning the position of a node within a node set than what I used here (the for-each block). Anyone have any ideas? I tried <xsl:variable name="currPos" select="$containing-block/descendant::node()[.=current()]/position()"/> knowing it wouldn't work (from previous posts to the list, etc.) and I wasn't disappointed.
So the question I have is: How do you return the position of a node in a node set given the node and the node set, so that the position can be used in a comparison or a variable? Second, why is it that ".=$curr" tests the value of each against each other, rather than a 'node id' or something? Wouldn't it make sense for that to actually check that the nodes are equivalent since if I wanted to check their string values I could do "string(.)=string($curr)" but I can't do the reverse. (ie. "node(.)=node($curr)" or something). I'm I overlooking something here?
Cheers, Wendell
Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Fwd: [xsl] complex XPATH test, David Carlisle | Thread | RE: Fwd: [xsl] complex XPATH test, Adam Van Den Hoven |
[xsl] Is recursion in XSL really th, xmlhack . | Date | Re: [xsl] Ampersand, Carmelo Montanez |
Month |