You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Vincent Herrmann <vi...@free.fr> on 2009/12/17 17:34:29 UTC
Substitution group
Hello.
I have a problem with xerces for parse XML Schema.
My problem is to get children from a XSElementDeclaration. I can do it
in most of case, but there is one I can't.
This is a part from my XML Schema:
<xs:element name="tei_model.HistoCPart" abstract="true"
type="xs:string"/>
<xs:element name="author" substitutionGroup="mlif:tei_model.HistoCPart">
When I have the XSElementDeclaration tei_model.HistoCPart, how must I
do to get author? Is it possible?
Thanks in advance, regards.
Vincent.
Re: Substitution group
Posted by Vincent Herrmann <vi...@free.fr>.
Hello,
I tried it. It's work perfectly =)
Thanks a lot, have a nice day.
Le 17 déc. 09 à 18:02, Michael Glavassevich a écrit :
> Hi Vincent,
>
> Have you tried XSModel.getSubstitutionGroup(XSElementDeclaration) [1]?
>
> Thanks.
>
> [1] http://xerces.apache.org/xerces2-j/javadocs/xs/org/apache/xerces/xs/XSModel.html#getSubstitutionGroup(org.apache.xerces.xs.XSElementDeclaration)
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
>
> Vincent Herrmann <vi...@free.fr> wrote on 12/17/2009
> 11:34:29 AM:
>
> > Hello.
> >
> > I have a problem with xerces for parse XML Schema.
> > My problem is to get children from a XSElementDeclaration. I can do
> > it in most of case, but there is one I can't.
> >
> > This is a part from my XML Schema:
> >
> > <xs:element name="tei_model.HistoCPart" abstract="true"
> type="xs:string"/>
> >
> > <xs:element name="author"
> substitutionGroup="mlif:tei_model.HistoCPart">
> >
> > When I have the XSElementDeclaration tei_model.HistoCPart, how must
> > I do to get author? Is it possible?
> >
> > Thanks in advance, regards.
> >
> > Vincent.
>
Re: Substitution group
Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Vincent,
Have you tried XSModel.getSubstitutionGroup(XSElementDeclaration) [1]?
Thanks.
[1]
http://xerces.apache.org/xerces2-j/javadocs/xs/org/apache/xerces/xs/XSModel.html#getSubstitutionGroup
(org.apache.xerces.xs.XSElementDeclaration)
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
Vincent Herrmann <vi...@free.fr> wrote on 12/17/2009 11:34:29
AM:
> Hello.
>
> I have a problem with xerces for parse XML Schema.
> My problem is to get children from a XSElementDeclaration. I can do
> it in most of case, but there is one I can't.
>
> This is a part from my XML Schema:
>
> <xs:element name="tei_model.HistoCPart" abstract="true"
type="xs:string"/>
>
> <xs:element name="author" substitutionGroup="mlif:tei_model.HistoCPart">
>
> When I have the XSElementDeclaration tei_model.HistoCPart, how must
> I do to get author? Is it possible?
>
> Thanks in advance, regards.
>
> Vincent.