Subject: Re: [xsl] Count items in a key ? From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Wed, 13 Oct 2010 14:41:36 -0700 |
>> Did you mean xs:anyAtomicType* B ? Yes, this is precise. > > According to http://www.w3.org/TR/xpath-datamodel/#types-hierarchy > xs:anyType seemed to be the most generic type, but I'm not an xpath/schema > datatype guru ;) Actually, the values of the possible keys (the "using" attribute or the sequence constructor of <xsl:key>) must all be atomic -- see: http://www.w3.org/TR/2007/REC-xslt20-20070123/#element-key "If the use attribute is present, its value is an expression specifying the values of the key. The expression will be evaluated with the node that matches the pattern as the context node. The result of evaluating the expression is atomized. Similarly, if a sequence constructor is present, it is used to determine the values of the key. The sequence constructor will be evaluated with the node that matches the pattern as the context node. The result of evaluating the sequence constructor is atomized." This is why, using xs:anyAtomicType* is the precise return type of the proposed function: keys(keyname as xs:string) as xs:anyAtomicType* -- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- Never fight an inanimate object ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Count items in a key ?, G. Ken Holman | Thread | Re: [xsl] Count items in a key ?, Olivier Jeulin |
Re: [xsl] Count items in a key ?, G. Ken Holman | Date | Re: [xsl] Unicode character decimal, Pradnya Gawade |
Month |