[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XPath 2.0 Regex misunderstanding
If the XML is:
<x> <DATE>07/18/2006</DATE> <DATE>07/12/2006</DATE> <DATE>09/25/2006</DATE> <DATE>10/24/2006</DATE> <DATE>10/18/2006</DATE> <DATE>10/10/2006</DATE> <DATE>10/02/2006</DATE> <DATE>01/19/2006</DATE> </x> and, XSLT is: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="xml" indent="yes" /> <xsl:template match="/x"> <result> <xsl:for-each select="DATE"> <xsl:if test="matches(.,'[0-1][0-2]/[0-3][0-9]/2006')"> <bad-date><xsl:value-of select="." /></bad-date> </xsl:if> </xsl:for-each> </result> </xsl:template> </xsl:stylesheet> and if the XSLT processor produces output: <?xml version="1.0" encoding="UTF-8"?> <result> <bad-date>10/24/2006</bad-date> <bad-date>10/18/2006</bad-date> <bad-date>10/10/2006</bad-date> <bad-date>10/02/2006</bad-date> <bad-date>01/19/2006</bad-date> </result> I feel, XSLT processor is compliant. And this is exactly what Saxon 8.8J is doing. On 1/19/07, cknell@xxxxxxxxxx <cknell@xxxxxxxxxx> wrote: I have a date element: -- Regards, Mukul Gandhi
|
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
|