[
Lists Home |
Date Index |
Thread Index
]
- To: "Jeni Tennison" <jeni@jenitennison.com>
- Subject: RE: [xml-dev] Schema: defining occurences in choices?
- From: "Emmerich, Martin" <Martin.Emmerich@oew.de>
- Date: Wed, 18 Dec 2002 18:54:23 +0100
- Cc: <xml-dev@lists.xml.org>
- Thread-index: AcKmn0a72VOqpI8GSwuyAHl5w2tzbAAF7JjQ
- Thread-topic: [xml-dev] Schema: defining occurences in choices?
Hi Jeni,
you write
> I'm not sure which thing you want to affect the occurrence of -- is it
> the <content> elements?
I'm sorry that my description was not clear enough. When re-reading it even I can see it :-).
The problem is more complicated.
I want to have a sequence of several
<testentry>
<name>value</name>
<content>
<subcontent1>
<subchoice1a/>
</subcontent1>
<subcontent1>
<subchoice1b/>
</subcontent1>
<subcontent2/>
</content>
</testentry>
"testentry" should be a restriction by choice of a certain type testType.
Based on the value in "name" (its vocabulary will be fixed, for example 10 different values), the restrictions on content should vary.
"content" is a sequence of subcontent elements, some repetitive, some not.
subcontent1 contains a subchoice itself.
What I need are several rules like:
name = "value1" --> there must be a "subcontent1" with "subchoice1a", annother "subcontent1" with "subchoice1b" can occur and "subcontent2" can occur.
I understand your mail that that is not possible to specify such constraints in plain schema. Am I correct?
Do I always need an external rule engine like Schematron or Relax NG for that?
Best regards,
..............................
Martin Emmerich
Leitung IT
Oestreicher + Wagner
Medientechnik GmbH
Frankenthaler Straße 20
D-81539 München
Fon +49 (0)89-68961 171
Fax +49 (0)89-68961 271
|