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 ]


  The only time your statement is true is if <Weight> typed as a schema
  type and thus was converted from a PSVI to the XQuery data model.  

Yes. Exactly.

  In this case since the PSVI doesn't mandate retaining comments

I can live (just about) with comments going. Although in practice
All XPath1 implementations seem to keep them even though they spec
doesn't insist on that. I don't believe that the character data should
be lost though.

> it may be costly for implementations to store both the typed value
> and the untyped node structure 

If its costly to keep both, and you want to call yourself an XML
application rather than a database of typed data, then it's clear whuch
one should be kept. I don't have anything against databases, but If
Xpath is corrupted to work with those, what are we going to use for
documents, go back to dsssl?


  I don't see how different this is from the XPath 1.0 query 
 
    number(/A) 
 
  giving me 
 
    12 
 

It's _completely_ and utterly different and goes to the heart of the
debate.

In a traditional document oriented view of XML I can have
 <A>012</A> (forget comments for now) and choose _at processing time_
how I want to view the data. I can within the same expression do

test=="(A = 12 ) and string-length(A)=2"

and use it both as a string and a number (or any other type that seems
useful at the time)

In the new order. typing is, or may be, irretrievably enforced by the
document author supplying a schema, which instead of doing its rightful
job of ensuring that the author followed the grammar of the language
being used, is instead being used to impose a typed view on all subsequent
operations.

> So really what has changed? If you want to deal with untyped data then
> don't use schema types. You can't have your cake and eat it too.  

If the XML file is going to be used as input to a numerical process
it is perfectly reasonable for it to be associated with a schema
that ensures that the document has been created with data that will
parse as numerical data. But one of the main reasons for chosing XML as
opposed to some binary format is to be able to be free to do other kinds
of processing _on the same file_.

The "typed value" aproach to XML parsing severely limits this freedom of
processing options.  Jonathan's assertion that if you don't import
schemas into your query everything works as before is simply not
true. Xpath2/Xquery allow documents to be corrupted at parse time in
ways that can't be controlled from the query.

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