Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Why XSDElementDeclaration doesnt have Min/Max Occur?
Why XSDElementDeclaration doesnt have Min/Max Occur? [message #15624] Mon, 31 March 2003 09:12 Go to next message
kaunteya bhattacharya is currently offline kaunteya bhattacharyaFriend
Messages: 24
Registered: July 2009
Junior Member
Hello,
Was wondering why the cardinality support is not there for
XSDElementDeclaration. Please correct me if i am wrong, but i believe the
XSDElementDecl can have a max|min from the XML Schema definition:

XML Representation Summary: element Element Information Item
<element
abstract = boolean : false
block = (#all | List of (extension | restriction | substitution))
default = string
final = (#all | List of (extension | restriction))
fixed = string
form = (qualified | unqualified)
id = ID
maxOccurs = (nonNegativeInteger | unbounded) : 1
minOccurs = nonNegativeInteger : 1
name = NCName
nillable = boolean : false
ref = QName
substitutionGroup = QName
type = QName
{any attributes with non-schema namespace . . .}>
Content: (annotation?, ((simpleType | complexType)?, (unique | key |
keyref)*))
</element>


but i couldnt find the api on Element in xsd doc. What should I do? I am
planning to have XSDElements as schema contents but in my schema, they can
occur more than once.

many thanks

kaunteya
Re: Why XSDElementDeclaration doesnt have Min/Max Occur? [message #15656 is a reply to message #15624] Mon, 31 March 2003 11:48 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

--------------FBFE85F2C0C8BF450F7A766A
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Kauneya,

XSD models elements (and everything else) according to the XML Schema
specification's component model. So an element has these properties:

http://www.w3.org/TR/xmlschema-1/#Element_Declaration_detail s

And information about "cardinality" is modeled as a particle:

http://www.w3.org/TR/xmlschema-1/#Particle_details

The spec carefully outlines how an element information item maps to the
component model (i.e., how it maps to both an element declaration component
and a particle component):

http://www.w3.org/TR/xmlschema-1/#declare-element

It might help to look at examples:

http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javadoc/org/eclipse/xsd/util/XSDPrototypicalSchema .html



kaunteya bhattacharya wrote:

> Hello,
> Was wondering why the cardinality support is not there for
> XSDElementDeclaration. Please correct me if i am wrong, but i believe the
> XSDElementDecl can have a max|min from the XML Schema definition:
>
> XML Representation Summary: element Element Information Item
> <element
> abstract = boolean : false
> block = (#all | List of (extension | restriction | substitution))
> default = string
> final = (#all | List of (extension | restriction))
> fixed = string
> form = (qualified | unqualified)
> id = ID
> maxOccurs = (nonNegativeInteger | unbounded) : 1
> minOccurs = nonNegativeInteger : 1
> name = NCName
> nillable = boolean : false
> ref = QName
> substitutionGroup = QName
> type = QName
> {any attributes with non-schema namespace . . .}>
> Content: (annotation?, ((simpleType | complexType)?, (unique | key |
> keyref)*))
> </element>
>
> but i couldnt find the api on Element in xsd doc. What should I do? I am
> planning to have XSDElements as schema contents but in my schema, they can
> occur more than once.
>
> many thanks
>
> kaunteya

--------------FBFE85F2C0C8BF450F7A766A
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Kauneya,
<p>XSD models elements (and everything else) according to the XML Schema
specification's component model. So an element has these properties:
<blockquote><a href=" http://www.w3.org/TR/xmlschema-1/#Element_Declaration_detail s"> http://www.w3.org/TR/xmlschema-1/#Element_Declaration_detail s</a></blockquote>
And information about "cardinality" is modeled as a particle:
<blockquote><a href="http://www.w3.org/TR/xmlschema-1/#Particle_details">http://www.w3.org/TR/xmlschema-1/#Particle_details</a></blockquote>
The spec carefully outlines how an element information item maps to the
component model (i.e., how it maps to both an element declaration component
and a particle component):
<blockquote><a href="http://www.w3.org/TR/xmlschema-1/#declare-element">http://www.w3.org/TR/xmlschema-1/#declare-element</a></blockquote>
It might help to look at examples:
<blockquote><a href=" http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javadoc/org/eclipse/xsd/util/XSDPrototypicalSchema .html"> http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javadoc/org/eclipse/xsd/util/XSDPrototypicalSchema .html</a>
<br><a href=" http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javadoc/org/eclipse/xsd/util/XSDPrototypicalSchema .html"></a>&nbsp;</blockquote>
kaunteya bhattacharya wrote:
<blockquote TYPE=CITE>Hello,
<br>Was wondering why the cardinality support is not there for
<br>XSDElementDeclaration. Please correct me if i am wrong, but i believe
the
<br>XSDElementDecl can have a max|min from the XML Schema definition:
<p>XML Representation Summary: element Element Information Item
<br>&lt;element
<br>&nbsp; abstract = boolean : false
<br>&nbsp; block = (#all | List of (extension | restriction | substitution))
<br>&nbsp; default = string
<br>&nbsp; final = (#all | List of (extension | restriction))
<br>&nbsp; fixed = string
<br>&nbsp; form = (qualified | unqualified)
<br>&nbsp; id = ID
<br>&nbsp; maxOccurs = (nonNegativeInteger | unbounded)&nbsp; : 1
<br>&nbsp; minOccurs = nonNegativeInteger : 1
<br>&nbsp; name = NCName
<br>&nbsp; nillable = boolean : false
<br>&nbsp; ref = QName
<br>&nbsp; substitutionGroup = QName
<br>&nbsp; type = QName
<br>&nbsp; {any attributes with non-schema namespace . . .}>
<br>&nbsp; Content: (annotation?, ((simpleType | complexType)?, (unique
| key |
<br>keyref)*))
<br>&lt;/element>
<p>but i couldnt find the api on Element in xsd doc. What should I do?
I am
<br>planning to have XSDElements as schema contents but in my schema, they
can
<br>occur more than once.
<p>many thanks
<p>kaunteya</blockquote>
</html>

--------------FBFE85F2C0C8BF450F7A766A--
Re: Why XSDElementDeclaration doesnt have Min/Max Occur? [message #566906 is a reply to message #15624] Mon, 31 March 2003 11:48 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
--------------FBFE85F2C0C8BF450F7A766A
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Kauneya,

XSD models elements (and everything else) according to the XML Schema
specification's component model. So an element has these properties:

http://www.w3.org/TR/xmlschema-1/#Element_Declaration_detail s

And information about "cardinality" is modeled as a particle:

http://www.w3.org/TR/xmlschema-1/#Particle_details

The spec carefully outlines how an element information item maps to the
component model (i.e., how it maps to both an element declaration component
and a particle component):

http://www.w3.org/TR/xmlschema-1/#declare-element

It might help to look at examples:

http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javadoc/org/eclipse/xsd/util/XSDPrototypicalSchema .html



kaunteya bhattacharya wrote:

> Hello,
> Was wondering why the cardinality support is not there for
> XSDElementDeclaration. Please correct me if i am wrong, but i believe the
> XSDElementDecl can have a max|min from the XML Schema definition:
>
> XML Representation Summary: element Element Information Item
> <element
> abstract = boolean : false
> block = (#all | List of (extension | restriction | substitution))
> default = string
> final = (#all | List of (extension | restriction))
> fixed = string
> form = (qualified | unqualified)
> id = ID
> maxOccurs = (nonNegativeInteger | unbounded) : 1
> minOccurs = nonNegativeInteger : 1
> name = NCName
> nillable = boolean : false
> ref = QName
> substitutionGroup = QName
> type = QName
> {any attributes with non-schema namespace . . .}>
> Content: (annotation?, ((simpleType | complexType)?, (unique | key |
> keyref)*))
> </element>
>
> but i couldnt find the api on Element in xsd doc. What should I do? I am
> planning to have XSDElements as schema contents but in my schema, they can
> occur more than once.
>
> many thanks
>
> kaunteya

--------------FBFE85F2C0C8BF450F7A766A
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Kauneya,
<p>XSD models elements (and everything else) according to the XML Schema
specification's component model. So an element has these properties:
<blockquote><a href=" http://www.w3.org/TR/xmlschema-1/#Element_Declaration_detail s"> http://www.w3.org/TR/xmlschema-1/#Element_Declaration_detail s</a></blockquote>
And information about "cardinality" is modeled as a particle:
<blockquote><a href="http://www.w3.org/TR/xmlschema-1/#Particle_details">http://www.w3.org/TR/xmlschema-1/#Particle_details</a></blockquote>
The spec carefully outlines how an element information item maps to the
component model (i.e., how it maps to both an element declaration component
and a particle component):
<blockquote><a href="http://www.w3.org/TR/xmlschema-1/#declare-element">http://www.w3.org/TR/xmlschema-1/#declare-element</a></blockquote>
It might help to look at examples:
<blockquote><a href=" http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javadoc/org/eclipse/xsd/util/XSDPrototypicalSchema .html"> http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javadoc/org/eclipse/xsd/util/XSDPrototypicalSchema .html</a>
<br><a href=" http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javadoc/org/eclipse/xsd/util/XSDPrototypicalSchema .html"></a>&nbsp;</blockquote>
kaunteya bhattacharya wrote:
<blockquote TYPE=CITE>Hello,
<br>Was wondering why the cardinality support is not there for
<br>XSDElementDeclaration. Please correct me if i am wrong, but i believe
the
<br>XSDElementDecl can have a max|min from the XML Schema definition:
<p>XML Representation Summary: element Element Information Item
<br>&lt;element
<br>&nbsp; abstract = boolean : false
<br>&nbsp; block = (#all | List of (extension | restriction | substitution))
<br>&nbsp; default = string
<br>&nbsp; final = (#all | List of (extension | restriction))
<br>&nbsp; fixed = string
<br>&nbsp; form = (qualified | unqualified)
<br>&nbsp; id = ID
<br>&nbsp; maxOccurs = (nonNegativeInteger | unbounded)&nbsp; : 1
<br>&nbsp; minOccurs = nonNegativeInteger : 1
<br>&nbsp; name = NCName
<br>&nbsp; nillable = boolean : false
<br>&nbsp; ref = QName
<br>&nbsp; substitutionGroup = QName
<br>&nbsp; type = QName
<br>&nbsp; {any attributes with non-schema namespace . . .}>
<br>&nbsp; Content: (annotation?, ((simpleType | complexType)?, (unique
| key |
<br>keyref)*))
<br>&lt;/element>
<p>but i couldnt find the api on Element in xsd doc. What should I do?
I am
<br>planning to have XSDElements as schema contents but in my schema, they
can
<br>occur more than once.
<p>many thanks
<p>kaunteya</blockquote>
</html>

--------------FBFE85F2C0C8BF450F7A766A--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Why XSDElementDeclaration doesnt have Min/Max Occur?
Next Topic:Eclipse API to remove elements and groups from Schema
Goto Forum:
  


Current Time: Fri Apr 26 20:22:03 GMT 2024

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

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

Back to the top