xsl-list
[Top] [All Lists]

Re: [xsl] XPath "none" /type/ not available to the user

2006-05-24 05:41:01
Frans Englich wrote:

On Wednesday 24 May 2006 11:26, Florent Georges wrote:

  Why is it not available to the user?

Probably because no one thought a reasonable usage
scenario exists for it(although I don't know for sure).

  A custom error reporting function (based on fn:error()) is
an enough interesting use case, isn't it?  But more
generaly, if a system function returns such an absorbent
type [1], you'll need one time or another to use this type,
IMHO.

I've myself been thinking a bit about this, while writing
XQuery test cases.  Try declaring a function with the
return type empty-sequence()

  I didn't try to really test it.  Actually, with Saxon
8.7.1j we can use every SequenceType (for example xs:string,
node(), empty-sequence() or text()), even with the '+'
occurrence indicator.  As if no static type checking was
made at all.  As if this special case was banned from the
static type checking engine.

  [1] I don't know if "absorbent" is the right English word.
      I mean a mathematical property, "for every element in
      a set, using an operation with X will always returns
      X".  For example 0 on R,*.  Here, for every sequence,
      if the static type of one item is "none" then the
      static type of the whole sequence is "none" (I think).

  Regards,

--drkm




























        

        
                
___________________________________________________________________________ 
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son 
interface révolutionnaire.
http://fr.mail.yahoo.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>
--~--