ivanmacculi(_at_)libero(_dot_)it wrote:
Hi all, i've problem of selecting elements that corresponds to some
characteristics:
xml elements that i want to select are like this:
<mets:techMD ID="TMD_DRV1_IMG_Scan00020_techMD">
so, i need to select all mets:techMD that have
ID="TMD_DRV1_IMG_Scan#####_techMD".
my problem is to cover all the numbers.
<xsl:apply-templates
select="mets:techMD[matches(@ID,
'TMD_DRV1_IMG_Scan[0-9]{5}_techMD')]"/>
That assumes there will always be 5 digits but you could also use e.g.
<xsl:apply-templates
select="mets:techMD[matches(@ID,
'TMD_DRV1_IMG_Scan[0-9]{1,5}_techMD')]"/>
to allow one to five digits.
--
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>
--~--