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

Re: is it possible xpath expression [A-Z]?

Subject: Re: is it possible xpath expression [A-Z]?
From: "ivanmacculi\@libero\.it" <ivanmacculi@xxxxxxxxx>
Date: Fri, 27 Nov 2009 13:25:29 +0100
Re:  is it possible xpath expression [A-Z]?
thx Martin, but what can i do if i want to select all of elements that have an
attribute with different values?
you suggest:

<xsl:template match="mets:div[@LABEL[matches(., '^Pagina [0-9]+$')]]"/>

is it possible doing the same thing with literal value, as
(a-z)or(A-Z)or(aA-zZ)as substitution of (0-9)?

in particular i need to select all of elements that have, as attribute, a word
(canto) followed by a roman number that starts from I (one) and finished to L
(fifty).
for example <mets:div LABEL="Canto XL">, but also <mets:div LABEL="Canto X">.
I know i explaned you bad. sorry...



> ivanmacculi@xxxxxxxxx wrote:
> > Hi all, i've a problem and a question for you. I know that is possible to
build xpath expression like this:
> >
> > <xsl:template match="mets:div[@LABEL[^Pagina [0-9]+$]"/>
> >
> > is it correct?
>
> No, you would need
>   <xsl:template match="mets:div[@LABEL[matches(., '^Pagina [0-9]+$')]]"/>
>
> > second question is if it's possible doing the same thing with literal
value, as (a-z)or(A-Z)or (aA-zZ)?
> > but my problem is a little bit more complicated.
> > I must select this element with attribute:
> >
> > <mets:div LABEL="Canto XL">, tha value of attribute starts with roman
number I (one)and finished with L (fifty).
> > what can i do to select all of these elements?
>
> If you want to literally compare to a certain string then you can do
> that with e.g.
>    <xsl:template match="mets:div[@LABEL[. = 'Canto XL']]"/>
>
>
> --
>
> 	Martin Honnen
> 	http://msmvps.com/blogs/martin_honnen/

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.