Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Regex for QNames

From: Florent Georges <darkman_spam@-----.-->
To: xmlschema-dev@--.---
Date: 2/9/2007 2:11:00 PM
  Hi

  I need the regular expression for a QName.  From §F.1 Character
Classes [WXS-2] (http://www.w3.org/TR/xmlschema-2/#charcter-classes),
I thought the following would be correct:

    [\i-:][\c-:]*:[\i-:][\c-:]*

  But the following example results in an error with Saxon 8 (I need
this regex for an XSLT 2.0 stylesheet, the XSLT 2.0 REC point to XML
Schema for regexs):

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="2.0">

  <xsl:template match="/" name="main">
    <res r="{ matches('pr:local', '[\i-:][\c-:]*:[\i-:][\c-:]*') }"/>
  </xsl:template>

</xsl:stylesheet>

$ saxon -it main qnames-regex.xsl
Error on line 5 of qnames-regex.xsl:
  FORX0002: Error at character 5 in regular expression
"[\i-:][\c-:]*:[\i-:][\c-:]*": multi_range
Failed to compile stylesheet. 1 error detected.

  Does someone see what I did wrong?

  Regards,

--drkm






















	

	
		
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com

From mike@s... Fri Feb 09 12:38:25 2007
Received: from lisa.w3.org ([128.30.52.41])
	b


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent