xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] new: how to change value of attributes


Subject: RE: [xsl] new: how to change value of attributes
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 25 Nov 2009 19:15:57 -0000

> <xsl:function name="f:index-of-node" as="xs:integer*">
>   <xsl:param name="nodes" as="node()*"/>
>   <xsl:param name="node" as="node()"/>
>   <xsl:for-each select="$nodes">
>     <xsl:sequence select="position()[current() is $node]"/>
>   </xsl:for-each>
> </xsl:function>
> 

or (perhaps less obscurely)

 <xsl:function name="f:index-of-node" as="xs:integer*">
   <xsl:param name="nodes" as="node()*"/>
   <xsl:param name="node" as="node()"/>
   <xsl:sequence select="1 to count($nodes)[subsequence($nodes, ., 1) is
$node]">
 </xsl:function>
 
 
 Regards,
 
 Michael Kay
 http://www.saxonica.com/
 http://twitter.com/michaelhkay 


Current Thread
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor