Re: XPath Data Model proposal

Hi John,

>> Also, I assume that you're suggesting that the XPath 2.0 processor
>> validate the content of the annotated element, such that, for
>> example <foo xsi:type="xs:integer">rubbish</foo> isn't labelled as
>> being of type xs:integer. Or are you suggesting that elements be
>> labelled with types without necessarily being valid against those
>> types?
>
> Hmm, that's a point I hadn't considered. It's formally messy,
> because there is no formal definition of type validity in the DM --
> it can delegate to the XML Schema documentation for that. OTOH,
> asking an XPath processor to cope with examples like that is more
> than a bit awkward.

I think this has been the main argument against using xsi:type to
indicate the type of an element -- we can't do so blindly. On the
other hand, it's the case even now that XPath processors are expected
to validate values if the type of an element or attribute is a list
whose item type is a union type and of course they have to be able to
validate such values in order to do casting to the types that they
recognise.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Thursday, 5 June 2003 13:17:06 UTC