xsl-list
[Top] [All Lists]

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

2010-02-04 09:04:48
Hi,

Michael, thank you for clearing this out.
David and Ken thank you for still taking the time to work out the regex for QNames.

I think I know why I had not thought about "castable as" in the first place ...

Cheers,
ac



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.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
-----Original Message-----
From: ac [mailto:ac(_at_)hyperbase(_dot_)com] Sent: 03 February 2010 07:30
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>