Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Node -> XSDConcreteComponent
Node -> XSDConcreteComponent [message #592949] Wed, 01 December 2004 13:20
Eclipse UserFriend
Originally posted by:


I wish to find the corresponding XSDConcreteComponent-Object to a given

I have a XSDConcreteComponent and an XPath-Expression to get the node:

private void whatever(XSDConcreteComponent context, String xpath) {
Element root = context.getElement();
Node schemaNode = XPathAPI.selectSingleNode(root, xpath);

Now I need the XSDConcreteComponent the schemaNode points at. My first
plan was to create a hashtable of all given XSDConcreteComponents with
the Node as key. Is there a less time-consuiming way?

But there is another problem with these Nodes:

The XPaths point into an XMLSchema-File. Possible references in the
XMLSchema should be resolved. A Node pointing to a referred Element
should be translated into the resolved XSDConcreteComponent.


<xs:complexType name="general">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="alpha"/>
<xs:group ref="beta"/>
<xs:group ref="gamma"/>

<xs:complexType name="alpha">

The context is the "general"-complexType-Element as XSDConcreteComponent.
The xpath is "/xs:choice/xs:group[1]".

The result-XSDConcreteComponent should be the resolved

Does someone has an idea how to implement such a method?

Thank you in advance
Hajo Hoffmann
Previous Topic:particle.getElement()
Next Topic:Node -> XSDConcreteComponent
Goto Forum:

Current Time: Sat Jun 23 14:34:27 GMT 2018

Powered by FUDForum. Page generated in 0.02086 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top