W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2001

Re: does DOM Object contain schema elements also ??

From: Michael Anderson <michael@research.canon.com.au>
Date: Tue, 06 Feb 2001 08:43:46 +1100
Message-ID: <3A7F1E92.F5365177@research.canon.com.au>
To: anand awasthi <anand-awasthi@usa.net>
Cc: xmlschema-dev@w3.org, xerces-j-dev@xml.apache.org
anand awasthi wrote:

> Hi,
> i am parsing an xml file which is being validated by using schema.
> my question is when DOM object is generated then does this DOM object contain
> schema elements and node information also ?? (does DOM tree include schema
> information also ??)
> pls reply soon
> tx
> AA

In short - no.
In long -
DOM Lvl 1 and Lvl 2 do not provide access to schema information.  DOM Lvl 3 [1]
is currently being developed and _does_ include schema information, BUT this
schema information is not the W3C XML Schema information.  It is "schema"
information in the original sense of the word.
Having said this, both DOM Lvl 1 and Lvl 2 allow element information items to
contain default attribute values that have been specified in some "schema" (I
think they had DTD in mind).  I'm not sure if the xerces parser will supply these
defaults if you supply it with a schema.  Try it and find out.


[1] http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010126/
Received on Monday, 5 February 2001 16:43:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:50 UTC