Hi Mathis,

It might be possible for you to use the XPathMatcher but the input you 
provide it will need to come from manually traversing the XSModel.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

Mathis Kueckens <[EMAIL PROTECTED]> wrote on 10/17/2006 06:01:06 
AM:

> On Thu, 12 Oct 2006, Michael Glavassevich wrote:
> Thanks for answering quickly.
> I'm still not done with this problem. just to make sure, I get it right:
> To determine the element or attribut declarations the 
> key/keyref/unique-elements belong to, I have to evaluate the 
> selector/field XPath expressions manually while traversing the XSModel? 
> There's is no way to use the 
> org.apache.xerces.impl.xs.identity package in conjunction with the 
> org.apache.xerces.impl.xpath package for this problem?
> 
> Thanks again,
> Mathis
> 
> 
> > Hi Mathis,
> >
> > Mathis Kueckens <[EMAIL PROTECTED]> wrote on 10/12/2006 
11:50:57
> > AM:
> >
> >>
> >> hi,
> >> for my diploma thesis I'm programming a transformation tool, that
> >> transforms XML schemas to UML
> >> class diagrams.
> >> For traversing the xml schema structure I use the xerces xml schema 
api.
> >>
> >> Currently I try to transform keyref-to-key-relations into uml
> >> associations. Therefore I need to
> >> resolve the Xpath expressions within the IdentityConstraint 
expressions
> >> (XSIDCDefinition) to get
> >>   the attributes/elements the key/keyRef-Element is assigned to.
> >>
> >> I tried to use the "org.apache.xerces.impl.xs.identity" package that
> >> implements the key-keyref
> >>   concept. So far I didn't reach my goal.
> >>
> >> My question:
> >> Is this package (maybe with interaction to other XPath 
implementations)
> > is
> >> able to resolve the
> >> xpath expressions (within <xs:selector>- and <xs:field>-elements) to
> >> resolve the attribue/element
> >> declaration (XSAttributeDeclaration, XSElementDeclaration) it belongs
> > to?
> >
> > There's nothing in the API which does this. You'd have to walk the 
XSModel
> > yourself (taking into account wildcards, substitution groups and 
possible
> > values for xsi:type) to determine which declared attributes/elements 
could
> > match a selector/field XPath.
> >
> >> Thank You
> >>
> >> Mathis
> >>
> >> ------------------------------
> >> Technical University of Berlin
> >> Germany
> >> ------------------------------
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > Michael Glavassevich
> > XML Parser Development
> > IBM Toronto Lab
> > E-mail: [EMAIL PROTECTED]
> > E-mail: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to