[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: bohemians, gentry
So your only complaint is that you believe that an XML document with a provided schema will be forced to be typed? Well, this doesn't jibe with anything I've seen in any of the working drafts so could you please provide a link or excerpt of the relevant text of a W3C document? Nothing stops you from having <A>012</A> and treating it as a string or as a number if you so care in XQuery/XPath 2.0/XSLT 2.0 as long as you don't associate a type with the value. You only seem to be arguing about what you believe some implementations will do. -----Original Message----- From: David Carlisle [mailto:davidc@n...] Sent: Thu 12/5/2002 7:55 AM To: Dare Obasanjo Cc: jonathan.Robie@d...; xml-dev@l... Subject: Re: bohemians, gentry 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.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|