Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Fri, 8 Feb 2008 04:27:56 -0800 (PST),    group: microsoft.public.xsl        back       


Separating Attribute Sting   
Hello,

I have an attribute string that I want to select but seperate at the
same time.

So something like:

<something stuff="_aaaaaa _bbbbbb _ccccc">

I need to select each string starting with '_' and there could be one
to many sub-strings.

Is there something that could do this for me, this seems to just
return boolean.

<relee><xsl:value-of select="starts-with(@myattribute, '_')"/></relee>


Thanks for your help,

C
date: Fri, 8 Feb 2008 04:27:56 -0800 (PST)   author:   unknown

Re: Separating Attribute Sting   
conorgaff@gmail.com wrote:

> I have an attribute string that I want to select but seperate at the
> same time.
> 
> So something like:
> 
> <something stuff="_aaaaaa _bbbbbb _ccccc">
> 
> I need to select each string starting with '_' and there could be one
> to many sub-strings.

With XSLT 2.0 you can use e.g.
   something/@stuff/tokenize(., '\s+')
with XSLT 1.0 you need to write a named recursive template that splits 
the string or you need to use an extension function.





-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
date: Fri, 08 Feb 2008 14:05:50 +0100   author:   Martin Honnen

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us