You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Mathis Kueckens <ku...@cs.tu-berlin.de> on 2006/10/12 17:50:57 UTC
using the org.apache.xerces.impl.xs.identity package
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?
Thank You
Mathis
------------------------------
Technical University of Berlin
Germany
------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
Re: using the org.apache.xerces.impl.xs.identity package
Posted by Michael Glavassevich <mr...@ca.ibm.com>.
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: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
Mathis Kueckens <ku...@cs.tu-berlin.de> 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 <ku...@cs.tu-berlin.de> 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: j-dev-unsubscribe@xerces.apache.org
> >> For additional commands, e-mail: j-dev-help@xerces.apache.org
> >
> > Michael Glavassevich
> > XML Parser Development
> > IBM Toronto Lab
> > E-mail: mrglavas@ca.ibm.com
> > E-mail: mrglavas@apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
> > For additional commands, e-mail: j-dev-help@xerces.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-dev-help@xerces.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
Re: using the org.apache.xerces.impl.xs.identity package
Posted by Mathis Kueckens <ku...@cs.tu-berlin.de>.
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 <ku...@cs.tu-berlin.de> 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: j-dev-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: j-dev-help@xerces.apache.org
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-dev-help@xerces.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
Re: using the org.apache.xerces.impl.xs.identity package
Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Mathis,
Mathis Kueckens <ku...@cs.tu-berlin.de> 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: j-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-dev-help@xerces.apache.org
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org