[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: data types


data types in dom
7/9/2002 2:05:15 PM, Jonathan Robie <jonathan.robie@d...> wrote:

>>
>>Now, I am parsing xml file using DOM. How can I get the data type for year,
>>month etc?????
>
>Whose DOM are you using?

It doesn't matter, there is no straightforward, standard way to 
access this information.  

[What follows is my personal assessment, not that of the DOM wG or 
my employer]

The DOM (levels 1, 2, and in the current conception of level 3) operates on
the XML InfoSet, i.e., what an XML parser produces.  In the overall W3C
model, the type information is added to the InfoSet by a W3C Schema
validator, and this known as the Post Schema Validation Infoset or PSVI.
The DOM does not have any conception of the PSVI, so there is no straightforward
way incorporate the type information without adopting the WXS worldview,
and this seems premature given the immaturity of and controversy surrounding
the WXS specification. 

The DOM WG attempted to define an "Abstract Schema" module that would have
provided standard APIs to access the information contained in a DTD or
schema ("schema" in the generic sense, not limited to WxS).  This proved
unsatisfactory, and the the work is now suspended, for reasons which 
long-time XML-DEV readers may appreciate: the result was too complex
for DTD or RELAX NG users and inadequate to meet the needs of WXS users;
it was "computer science by committee" rather than a standardization of
existing practice, so it was unclear whether it could be implemented or
used in the real world; and it stumbled over the numerous PSVI issues that
we love to debate here.  (A simpler "validation" API to check whether an
instance is valid against a DTD or schema, and to query for valid 
elements/attributes at some point in an instance, will be in Level 3).

Proprietary DOM extensions (probably Microsoft's, perhaps Apache's) may provide
"DOM" APIs to access the type information in the PSVI, but applications which
use these APIs will not work with other implementations.  Use them if they
work for you, but use them with caution. 

The possibility of the next major version of the DOM supporting the PSVI is
under consideration inside the W3C; members may wish to look into this issue
and make sure that their opinion is registered ... I don't think I can be 
more explicit due to the confidentiality guidelines, sorry.






  • Follow-Ups:
  • References:

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.