Another question about indicators
This should cover W3C XML Schema, Relax NG and DTD related problems.
Another question about indicators
Post by Guest »
Hi,
I wonder how I can set the indicator, that certain elements have to be set before others and only once, while others can occur several times!
This is the example and the elements duration and name have to be set before slide. It doesn't matter if they are set at all or in which order. Slide should occur at least once, but could more than that.
Could be like name | duration | slide | slide...
or duration | slide | slide...
<xs:element name="presentation">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="duration" minOccurs="0" maxOccurs="1"/>
<xs:element ref="name" minOccurs="0" maxOccurs="1" />
<xs:element ref="slide" minOccurs="1" maxOccurs="unbounded"/>
</xs:choice>
</xs:complexType>
</xs:element>
Is it possible to nest indicators like:
<xs:choice>
<xs:all>
<xs:element></xs:element>
<xs:element></xs:element>
<xs:element></xs:element>
</xs:all>
<xs:element></xs:element>
</xs:choice>
Thanx in advance Rainer...
I wonder how I can set the indicator, that certain elements have to be set before others and only once, while others can occur several times!
This is the example and the elements duration and name have to be set before slide. It doesn't matter if they are set at all or in which order. Slide should occur at least once, but could more than that.
Could be like name | duration | slide | slide...
or duration | slide | slide...
<xs:element name="presentation">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="duration" minOccurs="0" maxOccurs="1"/>
<xs:element ref="name" minOccurs="0" maxOccurs="1" />
<xs:element ref="slide" minOccurs="1" maxOccurs="unbounded"/>
</xs:choice>
</xs:complexType>
</xs:element>
Is it possible to nest indicators like:
<xs:choice>
<xs:all>
<xs:element></xs:element>
<xs:element></xs:element>
<xs:element></xs:element>
</xs:all>
<xs:element></xs:element>
</xs:choice>
Thanx in advance Rainer...
Hi,
If you can enforce name before duration then you can use something like
If you want to have also duration, name, slide then you can use something like below (it is a little more complicated because you need to avoid ambiguity):
Best Regards,
George
If you can enforce name before duration then you can use something like
Code: Select all
<xs:sequence>
<xs:element ref="name" minOccurs="0"/>
<xs:element ref="duration" minOccurs="0"/>
<xs:element ref="slide" maxOccurs="unbounded"/>
</xs:sequence>
Code: Select all
<xs:choice>
<xs:sequence>
<xs:element ref="name"/>
<xs:element ref="duration" minOccurs="0"/>
<xs:element ref="slide" maxOccurs="unbounded"/>
</xs:sequence>
<xs:sequence>
<xs:element ref="duration"/>
<xs:element ref="name" minOccurs="0"/>
<xs:element ref="slide" maxOccurs="unbounded"/>
</xs:sequence>
<xs:sequence>
<xs:element ref="slide" maxOccurs="unbounded"/>
</xs:sequence>
</xs:choice>
George
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service