Subject: Re: [xsl] are all strings in a sequence valid potential QNames|
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 04 Feb 2010 22:19:27 +0100
> As has been told, "castable as" is not correct for this use case. As > Mike suggests, I'll also go for a regex solution.
I would disagree, "castable as" is absolutely the correct approach in this case (creating element names based on some input).
However, it's not possible because of the (imho) unnecessary restriction in the spec, so you are forced to fall back to a regex based solution.
Currently even NCNames fail the castable xs:QName test, which has to be wrong.
Hopefully this could be looked at for 2.1...?
-- XSLT/XQuery/XPath training after http://XMLPrague.cz 2010-03-15/19 XSLT/XQuery/XPath training: San Carlos, California 2010-04-26/30 Vote for your XML training: http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal