Altova Mailing List Archives

RE: [xsl] are all strings in a sequence valid potential QNames

From: "Michael Kay" <mike@--------.--->
To: <xsl-list@-----.------------.--->
Date: 2/4/2010 5:41:00 AM
Just to check that by "valid potential QName" you mean a string that is in
the lexical space of xs:QName and will therefore constitute a valid QName
provided the prefix is in scope?

($x castable as xs:QName) will not work because (a) it also tests whether
the prefix is in scope, and (b) to avoid the issues of it therefore being
context-sensitive, the W3C spec says this is only allowed if the argument
($x) is a string literal.

So you do need to use the regex approach.


Michael Kay   

> -----Original Message-----
> From: ac [mailto:ac@h...] 
> Sent: 03 February 2010 07:30
> To: xsl-list@l...
> Subject: [xsl] are all strings in a sequence valid potential QNames
> Hi List,
> As for example, in determining element and/or attribute names 
> from the first line of a csv file, as well as other similar 
> cases, with xslt2.0 (e.g. without "map", "try", and schema), 
> what is the best way to check (e.g. true/false) that 1. a 
> string is a valid potential QName (e.g. match + what regex?, 
> or other option) 2. all strings in a sequence are valid 
> potential QNames
> Thank you,
> ac
> --~------------------------------------------------------------------
> XSL-List info and archive:
> To unsubscribe, go to:
> or e-mail: <mailto:xsl-list-unsubscribe@l...>
> --~--

XSL-List info and archive:
To unsubscribe, go to:
or e-mail: <mailto:xsl-list-unsubscribe@l...>


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 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.