|
Re: short question on minOccurs and maxOccurs on XSDElementDeclaration [message #41884 is a reply to message #41823] |
Tue, 20 April 2004 15:05 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Joachim,
The maxOccurs attribute is on the XSDParticle not on the
XSDElementDeclaration.
Joachim Lusiardi wrote:
> hello,
> i have the following xml schema snippet:
>
> <xs:element name="vorname" type="xs:string" maxOccurs="4"/>
>
> how do i get the maxOccurs from the XSDElementDeclaration?
> Or do i have to think it real over?
> greets
> Joachim Lusiardi
|
|
|
Re: short question on minOccurs and maxOccurs on XSDElementDeclaration [message #42003 is a reply to message #41884] |
Tue, 20 April 2004 20:15 |
Eclipse User |
|
|
|
Originally posted by: joachim.lusiardi.web.de
Hello again,
sorry for the question, but a can't find any method to access this
XSDParticle directly. org.eclipse.emf.ecore.EObject.eContainer returns
an XSDParticle if i have min- or maxOccurs set. Wouldn't in be better to
have a method to return the XSDParticle or null if there is no XSDParticle?
Greetz
Joachim
Ed Merks wrote:
> Joachim,
>
> The maxOccurs attribute is on the XSDParticle not on the
> XSDElementDeclaration.
>
>
> Joachim Lusiardi wrote:
>
>
>> hello,
>> i have the following xml schema snippet:
>>
>> <xs:element name="vorname" type="xs:string" maxOccurs="4"/>
>>
>> how do i get the maxOccurs from the XSDElementDeclaration?
>> Or do i have to think it real over?
>> greets
>> Joachim Lusiardi
>
>
>
|
|
|
Re: short question on minOccurs and maxOccurs on XSDElementDeclaration [message #42034 is a reply to message #42003] |
Tue, 20 April 2004 20:39 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Joachim,
In general I do not like to have named "container" references unless there is
only one possible container because many things can be contained in many
different places so you would tend to have a lot of container references where
only one can be non-null at any point in time. An element can be contained by
a schema or by a particle, so there aren't so many for this case, but for
something like a simple type, there are many more possible containers, i.e., a
schema, a simple type, a complex type, an element, an attribute, a redefine...
If xsdElementDeclaration.isGlobal is false xsdElementDeclaration.getContainer()
will be an XSDParticle.
joachim lusiardi wrote:
> Hello again,
> sorry for the question, but a can't find any method to access this
> XSDParticle directly. org.eclipse.emf.ecore.EObject.eContainer returns
> an XSDParticle if i have min- or maxOccurs set. Wouldn't in be better to
> have a method to return the XSDParticle or null if there is no XSDParticle?
> Greetz
> Joachim
>
> Ed Merks wrote:
>
> > Joachim,
> >
> > The maxOccurs attribute is on the XSDParticle not on the
> > XSDElementDeclaration.
> >
> >
> > Joachim Lusiardi wrote:
> >
> >
> >> hello,
> >> i have the following xml schema snippet:
> >>
> >> <xs:element name="vorname" type="xs:string" maxOccurs="4"/>
> >>
> >> how do i get the maxOccurs from the XSDElementDeclaration?
> >> Or do i have to think it real over?
> >> greets
> >> Joachim Lusiardi
> >
> >
> >
|
|
|
|
Re: short question on minOccurs and maxOccurs on XSDElementDeclaration [message #585900 is a reply to message #41884] |
Tue, 20 April 2004 20:15 |
Eclipse User |
|
|
|
Originally posted by: joachim.lusiardi.web.de
Hello again,
sorry for the question, but a can't find any method to access this
XSDParticle directly. org.eclipse.emf.ecore.EObject.eContainer returns
an XSDParticle if i have min- or maxOccurs set. Wouldn't in be better to
have a method to return the XSDParticle or null if there is no XSDParticle?
Greetz
Joachim
Ed Merks wrote:
> Joachim,
>
> The maxOccurs attribute is on the XSDParticle not on the
> XSDElementDeclaration.
>
>
> Joachim Lusiardi wrote:
>
>
>> hello,
>> i have the following xml schema snippet:
>>
>> <xs:element name="vorname" type="xs:string" maxOccurs="4"/>
>>
>> how do i get the maxOccurs from the XSDElementDeclaration?
>> Or do i have to think it real over?
>> greets
>> Joachim Lusiardi
>
>
>
|
|
|
Re: short question on minOccurs and maxOccurs on XSDElementDeclaration [message #585912 is a reply to message #42003] |
Tue, 20 April 2004 20:39 |
Ed Merks Messages: 33139 Registered: July 2009 |
Senior Member |
|
|
Joachim,
In general I do not like to have named "container" references unless there is
only one possible container because many things can be contained in many
different places so you would tend to have a lot of container references where
only one can be non-null at any point in time. An element can be contained by
a schema or by a particle, so there aren't so many for this case, but for
something like a simple type, there are many more possible containers, i.e., a
schema, a simple type, a complex type, an element, an attribute, a redefine...
If xsdElementDeclaration.isGlobal is false xsdElementDeclaration.getContainer()
will be an XSDParticle.
joachim lusiardi wrote:
> Hello again,
> sorry for the question, but a can't find any method to access this
> XSDParticle directly. org.eclipse.emf.ecore.EObject.eContainer returns
> an XSDParticle if i have min- or maxOccurs set. Wouldn't in be better to
> have a method to return the XSDParticle or null if there is no XSDParticle?
> Greetz
> Joachim
>
> Ed Merks wrote:
>
> > Joachim,
> >
> > The maxOccurs attribute is on the XSDParticle not on the
> > XSDElementDeclaration.
> >
> >
> > Joachim Lusiardi wrote:
> >
> >
> >> hello,
> >> i have the following xml schema snippet:
> >>
> >> <xs:element name="vorname" type="xs:string" maxOccurs="4"/>
> >>
> >> how do i get the maxOccurs from the XSDElementDeclaration?
> >> Or do i have to think it real over?
> >> greets
> >> Joachim Lusiardi
> >
> >
> >
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03446 seconds