Checks and Constraints with XML Schema?
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 1
- Joined: Thu May 19, 2005 12:18 pm
Checks and Constraints with XML Schema?
Post by Juergen.Birkle »
Hi,
I have the following 2 XML files:
-----
<test>
<type>car</type>
<vehicle>BMW</vehicle>
<vehicle>Audi</vehicle>
<vehicle>Rover</vehicle>
</test>
-----
and:
-----
<test>
<type>motorbike</type>
<vehicle>Honda</vehicle>
<vehicle>Kawasaki</vehicle>
</test>
-----
Is it possible to check the value of 'type' to restrict the possible values of 'vehicle' with XML Schema?
I'd like XML Schema to accept only the values 'BMW', 'Audi' and 'Rover' (and other out of a list) if the type is set to 'car' and different values, if the type is set to 'motorbike'.
Thanks for any help.
Regards,
Juergen
I have the following 2 XML files:
-----
<test>
<type>car</type>
<vehicle>BMW</vehicle>
<vehicle>Audi</vehicle>
<vehicle>Rover</vehicle>
</test>
-----
and:
-----
<test>
<type>motorbike</type>
<vehicle>Honda</vehicle>
<vehicle>Kawasaki</vehicle>
</test>
-----
Is it possible to check the value of 'type' to restrict the possible values of 'vehicle' with XML Schema?
I'd like XML Schema to accept only the values 'BMW', 'Audi' and 'Rover' (and other out of a list) if the type is set to 'car' and different values, if the type is set to 'motorbike'.
Thanks for any help.
Regards,
Juergen
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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