xsl-list
[Top] [All Lists]

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

2009-11-27 07:10:47
ivanmacculi(_at_)libero(_dot_)it 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[(_at_)LABEL[^Pagina [0-9]+$]"/>

is it correct?

No, you would need
 <xsl:template match="mets:div[(_at_)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[(_at_)LABEL[(_dot_) = 'Canto XL']]"/>


--

        Martin Honnen
        http://msmvps.com/blogs/martin_honnen/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>