|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Xpath patern question
Hi!
I have the follow xml example:
<?xml version="1.0" encoding="UTF-8"?>
<xxx>
<yyyy>
<campo>12-12-2002</campo>
<campo>2</campo>
</yyyy>
<zzz>
<campo>1</campo>
<campo>2</campo>
</zzz>
</xxx>
Imagine that I want all elements "campo" with value matching a determinate patern. For example, I want all elements "campo" whose value is like "2 digits, a separator("/" or "-"), 2 digits, a separator("/" or "-"), 4 digits". This is a date!
I'm doing that using javascript in xsl
<xsl:script>
<[-||\/](\d{4})/);
if ( encont != null )
return true;
else
return false;
}
]]>
</xsl:script>
My question is: "This is possible to do with xpath, without using the script?" Tks for helpe.
Hélder Sousa
Departamento de Projectos e-Business
I2S - Informática Sistemas e Serviços
<<mailto:helder.sousa@xxxxxx>> - <<http://www.i2s.pt/>>
Tel.: +351 22 834 04 00; Fax: +351 22 834 07 95
Portugal
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








