wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes Help meunderstand how this translates into Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Help meunderstand how this translates into" Watch "Help meunderstand how this translates into" New topic
Author

Help meunderstand how this translates into

Venkat Venkataramanan
Greenhorn

Joined: May 17, 2012
Posts: 1
I picked up this fragment from a DTD:


<xs:complexType name="oversight_info_struct">
<xs:sequence>
<xs:element name="authority" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="has_dmc" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

Does this mean:

1. The XML can have Zero-to-many instances of the element, authority"
2. Each authority element may or may not have an element, "has_dmc"

Venki
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10242
    
168

Welcome to the forums!

Venkat Venkataramanan wrote:I picked up this fragment from a DTD:


<xs:complexType name="oversight_info_struct">
<xs:sequence>
<xs:element name="authority" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="has_dmc" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

Does this mean:

1. The XML can have Zero-to-many instances of the element, authority"


The oversight_info_struct element type can have 0 or more child elements named "authority". Here's an example (assuming "oversight" element is of type oversight_info_struct):


Does this mean:

2. Each authority element may or may not have an element, "has_dmc"

No. Notice that the "oversight_info_struct" is being defined there and not the "authority" element. So it means that the oversight_info_struct type can have 0 or any number of child elements named "has_dmc".


[My Blog] [JavaRanch Journal]
 
Don't get me started about those stupid light bulbs.
 
subject: Help meunderstand how this translates into