Subject: Re: [xsl] are all strings in a sequence valid potential QNames From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Thu, 04 Feb 2010 11:41:08 +0100 |
On 4 February 2010 09:53, G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote:
> At 2010-02-04 09:45 +0000, Andrew Welch wrote:
>>
>> Doesn't that restriction then make "castable as xs:QName" pretty
>> useless? I can't see when you would need it...
>
> I think many specifications end up with useless vestiges resulting from the
> product of two concepts where most of the combinations make sense but the
> odd one here or there end up not being very useful. On the left operand you
> have all of the different operands of literals and values, and on the right
> operand you have all of the different types, and that produces a myriad of
> combinations that need to be considered and implemented.
Without the restriction it's definitely useful, and intuitive :) ...but with the odd requirement that it will return false unless it's given a hard-coded string, then it is a really subtle and annoying gotcha... I'm sure one that's got me in the past.
T:\ftemp>type ken2.xsl <?xml version="1.0" encoding="US-ASCII"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="2.0">
<xsl:template match="/"> 'abcdef': <xsl:value-of select="'abcdef' castable as xsd:QName"/> 'abc:def': <xsl:value-of select="'abc:def' castable as xsd:QName"/> 'xsd:def': <xsl:value-of select="'xsd:def' castable as xsd:QName"/> </xsl:template>
'abcdef': true 'abc:def': false 'xsd:def': true T:\ftemp>
-- 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] are all strings in a sequ, Andrew Welch | Thread | Re: [xsl] are all strings in a sequ, Andrew Welch |
Re: [xsl] are all strings in a sequ, Andrew Welch | Date | Re: [xsl] When are <!DOCTYPE> and s, Elliotte Rusty Harol |
Month |