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

RE: Empty input in analyze-string

Subject: RE: Empty input in analyze-string
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 4 Jul 2008 14:18:18 +0100
RE:  Empty input in analyze-string
It doesn't look to me as if it matches an empty string. Perhaps you are
misinterpreting the evidence?

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Mathieu Malaterre [mailto:mathieu.malaterre@xxxxxxxxx] 
> Sent: 04 July 2008 13:44
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Empty input in analyze-string
> 
> Hello,
> 
>   I cannot figure out how to tell xsl:analyze-string that 
> empty input should not match regex.
> 
> eg.
> 
>     <xsl:variable 
> name="myregex">^([CF]\.[0-9\.]+)\s*(.*)$</xsl:variable>
>     <xsl:analyze-string select="$para2" regex="{$myregex}">
>       <xsl:matching-substring>
>         <xsl:value-of select="regex-group(1)"/>
>       </xsl:matching-substring>
> ...
> 
> if para2 is an empty element, then the regex success and 
> return an empty string. How do I express in my regex that 
> empty is a non-matching regex ?
> 
> Thanks !
> --
> Mathieu

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.