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]

[xsl] Using 'contains' function with xsl:key


Subject: [xsl] Using 'contains' function with xsl:key
From: Gjergji Spaho <gjspaho@xxxxxxxxx>
Date: Tue, 6 Sep 2005 15:19:13 +0200

Hi everyone!
I have a XML with elements that have an id attribute.
The value of the id attribute is composed in one of the two ways:

1) '_field:' + valid string + number
2)'_group:' + valid string + number

All i want is to create two different groups based on the first word
of the attribute value : '_field'  or 'group'.

One way is:
<xsl:key name="ctlkey" match="*" use="substring-before(@id,':')"/>

and use it
key('ctlkey','_field') or key('ctlkey','_group')

now my quetion is:
Is it possible to have the xsl:key defined:

<xsl:key name="ctlkey" match="*" use="contains(@id,'_field')"/>

and then use it

key('ctlkey',true()) or key('ctlkey',false()) ??????

thanks anyway


Current Thread
Keywords
xml
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