xsl-list
[Top] [All Lists]

Re: [xsl] XPath 2 sequence item type determination

2008-09-02 12:54:41


Though, say, if one wants to stick to standards and not proprietary
extensions, then surely the suggestion of using a series of "if instance
of" is problematic in that it is relying on the external string
representation of the type (via xsd schema) to guess the type of the
(internal) XDM item?

No. Why do you say that? The item may never have been near an xsd
schema.

If you have a sequence

(1,'1',true(),'true')

then a nested test with instance of will show those types as xs:integer,
xs:string, xs:boolean and xs:string respectively.

this does not depend on any internals of the XSL processor the result is
determined by the xpath spec. (I am assuming here that xs: is bound to
the xsd schema namespace)


David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

--~------------------------------------------------------------------
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>
--~--