XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
XML schema : refer problem

Suppose I have the following document :
<?xml version="1.0" encoding="UTF-8"?>
<organisation>
	<person id="1">
		<poll id="a">
			<answer id="1"/>
			<answer id="3"/>
		</poll>
	</person>

	<poll id="a">
		<question id="1"/>
		<question id="2"/>
	</poll>
	<poll id="b">
		<question id="1"/>
		<question id="3"/>
	</poll>
</organisation>

In my schema definition i want the following constraints :
- a poll has a unique id within an organisation : key on id in
organisation scope : No Problem
- a question has a unique id within a poll : key on id in poll scope :
No Problem
- a person can only answer a defined poll : keyref to the key of poll
: No problem
- a person can only answer questions of the referenced poll : ...
problem ... How do I do that? The combination poll-id question-id is
unique but I can't define a key on that combination which I need to
refer to.

Extra question : how can I ensure that the person answers every question?
The question element contains lots of information that I don't want to
duplicate...


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS