- From: Paul Warren <pdw@decisionsoft.com>
- Date: 03 Mar 2003 16:16:24 +0000
- To: Shirish Kulkarni <shirish_kul@yahoo.com>
- Cc: xmlschema-dev@w3.org
On Mon, 2003-03-03 at 07:55, Shirish Kulkarni wrote: > As I understand, Schema validation ( on the basis of > the structure and data types ) is done at the call to > the parser.parse() method and when successful ( if the > DOM Parser is used ) the DOM Tree representation is > built. > > My questions are - > 1) Does DOM tree representation hold the DataTypes' as > described in the Schema used for the validation of the > input XML ? DOM Level 3 [1] defines an interface called TypeInfo. This allows you to obtain the name and namespace of the type used to validate the element/attribute, assuming it was valid. We have recently implemented this in Xerces C++, and it is available in the recently released v2.2. If you are looking at this, be aware that the DOM Level 3 document is a Working Draft, and has very recently changed. Tbe current implement is based on the previous iteration [2]. > 2) if answer to 1) is YES, how to access these > DataTypes using Xerces C++ parser ? See the Xerces-C API docs [3]. If you require more information than name and namespace then this is available through the SchemaGrammar and other non-DOM interfaces. Our developers have a good understanding of this through our work on XPath 2 - they (and others) can probably help further if you post to the Xerces-C mailing list (xerces-c-dev@xml.apache.org) Paul [1] http://www.w3.org/TR/DOM-Level-3-Core/ [2] http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20021022/ [3] http://xml.apache.org/xerces-c/apiDocs/classDOMElement.html#z79_3 -- Paul Warren, Client Services DecisionSoft Limited +44-1865-203192 http://www.decisionsoft.com
Received on Monday, 3 March 2003 11:16:28 UTC