Subject: [xsl] Xpath patern question From: Hélder Sousa <Helder.Sousa@xxxxxx> Date: Mon, 10 Mar 2003 16:16:08 -0000 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Get Position of Node in A, Michael Kay | Thread | Re: [xsl] Xpath patern question, Jeni Tennison |
Re: [xsl] trying to create a node-s, Ankit Jain | Date | [xsl] How to test if a named attrib, Imrran Wahid |
Month |