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

Re: new: how to change value of attributes

Subject: Re: new: how to change value of attributes
From: "ivanmacculi\@libero\.it" <ivanmacculi@xxxxxxxxx>
Date: Fri, 27 Nov 2009 18:51:51 +0100
Re:  new: how to change value of attributes
your first suggestion about changes of list works fine.

<xsl:template match="mets:div/@LABEL[matches(., '^Pagina [0-9]+$')]">
<xsl:variable name="n">
<xsl:number level="any" count="mets:div[@LABEL[matches(.,
'^Pagina [0-9]+$')]]"/>
</xsl:variable>
<xsl:attribute name="LABEL" select="concat('Carta ', if ($n mod 2 =
0) then concat(($n + 1) idiv 2, 'v') else concat(($n + 1) idiv 2, 'r'))"/>
</xsl:template>

what can i do if i want to modify your suggestion with the new needs that you
wrote to change Kay's suggestion?


Or if you want to exclude the first found element then

<xsl:variable name="g" select="(//mets:div[matches(@LABEL, '^Pagina
[0-9]+$')])[position() gt 1]"/>

i would prefer to don't add new namespaces, but to adopt linear solution even
if it has more redoundancy...

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.