W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2005

RE: The same element in one content model with different type

From: Michael Kay <mike@saxonica.com>
Date: Thu, 3 Nov 2005 12:08:55 -0000
To: "'Michael Stolp'" <Michael.Stolp@stud.tu-ilmenau.de>, <xmlschema-dev@w3.org>
Message-ID: <E1EXdu1-0008Fg-OQ@lisa.w3.org>

> Hello list.
> I have a problem to write a schema for the following:
> <Bar id="Bar2" original_id="B5" zIndex="1">
> 	<Point posRef="pos2" id="Bar2.pt1" role="start"/>
> 	<Point posRef="pos3" id="Bar2.pt2" role="end"/>
> 	<Point posRef="pos5" id="Bar2.pt3" role="middle1"/>
> </Bar>

Can't be done in XML Schema. All the Point elements within one Bar element
have to have the same type. You either have to change the design (e.g. the
element names), or use a different validation technology.

Michael Kay
Received on Thursday, 3 November 2005 12:09:12 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:09 UTC