You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Graham Mann <gm...@adobe.com> on 2002/06/24 15:10:04 UTC

Couple of simple questions

I suspect these have been asked before but I cant find a FAQ or old mail to help (I also suspect I know the answers but...)

After a document has been parsed against an XML Schema into a DOM, is there a way to link DOM_Nodes back to schema data types.
In the first instance even the name of the xsd datatype would help (And then (fancifully!) to further inspect those data types for inheritance etc).

In many cases I'd like an iterator to the child elements of a particular element rather than an iterator to the remaining elements (ie grand children etc) in the document or to all the child nodes. I have several ways of handling this but all are a bit clunky.

Graham Mann
Adobe Systems Europe Ltd.



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Couple of simple questions

Posted by Gareth Reakes <ga...@decisionsoft.com>.
Hi,

On Mon, 24 Jun 2002, Graham Mann wrote:

> I suspect these have been asked before but I cant find a FAQ or old mail to help (I also suspect I know the answers but...)
> 
> After a document has been parsed against an XML Schema into a DOM, is there a way to link DOM_Nodes back to schema data types.
> In the first instance even the name of the xsd datatype would help (And then (fancifully!) to further inspect those data types for inheritance etc).

As far as I can see the answer is no. Take a look at SEnumVal, it shows  
you how to get access to the schema grammar after a parse. However 
this does not associate the DOM_Nodes with the grammar. You could override 
the parser and store the information in the UserData section of the 
DOM_Node. Otherwise you will have to wait for PSVI (on the todo list), 
although even then I don't know how that will be accessed through the DOM 
(anyone any ideas on this as I really would like to know, I cant fully 
implement XPath2 without the schema info). 

Its also possible that the Abstract Schemas object model from level 3 will 
help. I don't know enough about it to say. Perhaps someone else can help 
here. However thats not yet made it onto the todo list.

Gareth

-- 
Gareth Reakes, Head of Product Development  
DecisionSoft Ltd.            http://www.decisionsoft.com
Office: +44 (0) 1865 203192



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org