RE: position() of the parent

Subject: RE: position() of the parent
From: "Pawson, David" <DPawson@xxxxxxxxxxx>
Date: Thu, 20 Jan 2000 13:11:26 -0000
David C wrote:
>> DSSSL permits an absolute node numbering relative to the
>> document root.
>> Is that achievable in XPATH?
>well since an earlier theread agreed xsl was turing complete, you could
>implement a dsssl compiler in xsl, and run that, alternatively 
>you could
>use generate-id (which probably is doing that internally anyway,
>although you can not guarantee that) or you just count whatever nodes
>you want to count, eg
>replacing * by node() or whatever, to suit.

Or even

<xsl:template match="mynode">
  <mynode name="{@name}" 
   parentid="{substring (generate-id(..),2)}"
   id="{substring (generate-id(.),2)}"/>


 XSL-List info and archive:

Current Thread