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.
Could you do a fn:prefix-from-QName($x) = fn:in-scope-prefixes(.)
check before doing the castable as check?
--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
--~------------------------------------------------------------------
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>
--~--