RE: Namespace considerations

At 12:15 PM 3/5/2003 -0800, Michael Rys wrote:
> > Wouldn't that mean that in a basic XPath2 implementation, without
> > importing the above schema, only the third example below is legal?
> >
> > <snip>
> >
> > > > for example, if I bind xf to "http://www.w3.org/2001/XMLSchema"
>and
> > > > xs to "http://www.w3.org/2001/XMLSchema-datatypes", then which of
> > these
> > > > (or all?) are legal?
> > > >
> > > > 'cast as xs:string(xs:decimal("15.5"))'
> > > > 'cast as xf:string(xs:decimal("15.5"))'
> > > > 'cast as xf:string(xf:decimal("15.5"))'

Hi Caroline,

The xs: prefix is predefined, bound to "http://www.w3.org/2001/XMLSchema", 
so there is no need to bind anything to xs.  I'm trying to remember if we 
outlawed redefining this prefix - I think not, but I also asked the WG the 
question, and I will reply here if I find out that I was wrong.

So under the assumption that you actually can redefine this prefix, if you 
do not import the schema, these types will not be predefined, and you will 
get a type error, since the system does not know what types you are 
referring to.

Jonathan 

Received on Wednesday, 5 March 2003 17:07:21 UTC