[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: selecting all nodes which contains similar names

Subject: RE: selecting all nodes which contains similar names
From: Jarno.Elovirta@xxxxxxxxx
Date: Fri, 26 Jul 2002 14:12:22 +0300
xsl select contains
Hi,

> i know this is a FAQ, but i cannot find it with google and in 
> the archive.

Did you check the XPath 1.0 spec <http://www.w3.org/TR/xpath#section-String-Functions>?

> I want to extract with a shortest statement all nodes which 
> begins with the
> same characters in the element .
> 
> xml snippet
> ----
> 
> <row>
> ...
> <umszweck1>UMSZWECK1</umszweck1>
> <umszweck2>UMSZWECK2</umszweck2>
> <umszweck3>UMSZWECK3</umszweck3>
> <umszweck4>UMSZWECK4</umszweck4>
> <umszweck5>UMSZWECK5</umszweck5>
> <umszweck6></umszweck6>
> <umszweck7>UMSZWECK7</umszweck7>
> <umszweck8>UMSZWECK8</umszweck8>
> <umszweck9>UMSZWECK9</umszweck9>
> <umszweck10></umszweck10>
> <umszweck11>UMSZWECK11</umszweck11>
> <umszweck12>UMSZWECK12</umszweck12>
> <umszweck13>UMSZWECK13</umszweck13>
> <umszweck14>UMSZWECK14</umszweck14>
> etc
> ...
> </row>
> 
> xsl try
> ----
> <xsl:-for each select="node()[contains(name(),'umszweck')]">
>  <xsl:value-of select="." />
> </xsl:for-each>

<xsl:-for each select="*[start-with(name(), 'umszweck')]">

Cheers,

Jarno

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.