OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] bohemians, gentry

[ Lists Home | Date Index | Thread Index ]


> Is allowed to, but doesn't have to. 

Quite. Is that really how to specify an interoperable language?

In theory Xpath1 processors can drop comments, but in practice they
don't. But Comments are inherantly second class citizens anyway. 0's in
character data are not (or were not until recently)
No Xpath processor is going to drop leading zeros from source
data. If I decide, in my query to use that data as a number then
obviously 01 = 1 but if I want to check starts-with(.,'0' 
then I know it will work.

If I switch to Xpath 2 (and it's a big if) then I no longer get that
assurance, only your "hope" that I'll find processors that don't mess up
my data.


> Only if you applied a schema that said the data type of <Weight> was a
> numeric. If you said it was a string, you'd get back just what you put
> in.

True but I might want to specify it's numeric. for use with a
computational engine and still query the original text with an XMl
querying application.
I might even have specified it's numeric with a facet that insists on
leading zeros. XQuery isn't going to care though, it's still going to
allow implemtations to junk the input string.


> And if you want, you can validate it as a string in your schema then
> cast it to a number when you want to do something numeric with it. You
> don't have to let the data model builder munge it for you.

Yes there are ways round it. I could use Xpath 1 for example.
But why is XPath2 _defined_ to allow this incompatiblity.

It appears to be defined that way so that it can call itself an XML
processing language when really it wants to deal with typed data in a
database which is thinly disguised as XML with an XML view of the data.
I have no objection to people developing a language for handling such
data I do object to them so corrupting XPath/XSLT in order to do it.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS