W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2003

Why is this model non-deterministic?

From: Richard R. Liu <richard-liu@tiscalinet.ch>
Date: Wed, 30 Apr 2003 02:57:25 +0200
To: <xmlschema-dev@w3.org>
Message-ID: <000001c30eb3$773988e0$1406c8d5@balcab.ch>

Turbo XML (aka XML Authority, latest version) tells me that in the following
schema person, date, time, markedUpTextNoLinkType and captionType are
non-deterministic.  I cannot figure out why.  Can anybody explain?  Notice
that the elements of markedUpTextNoLinkType that are not based on
derivations by extension seem to be OK.

Here's the schema:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.ubs.com/namespaces/wbml"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:wb="http://www.ubs.com/namespaces/wbml"
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
jxb:version="1.0">
	<xs:annotation>
		<xs:documentation>This schema defines the page editing and rendering XML
for the Web Branding project.</xs:documentation>
		<xs:appinfo>
			<jxb:schemaBindings>
				<jxb:package name="com.ubs.wip.applets.page.jaxb"/>
			</jxb:schemaBindings>
		</xs:appinfo>
	</xs:annotation>
	<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="xml.xsd"/>
	<xs:complexType name="captionType" mixed="true">
		<xs:complexContent mixed="true">
			<xs:extension base="wb:markedUpTextNoLinkType"/>
		</xs:complexContent>
	</xs:complexType>
	<xs:attributeGroup name="dateAttrGroup">
		<xs:attribute name="year" type="xs:positiveInteger" use="required"/>
		<xs:attribute name="month" use="required">
			<xs:simpleType>
				<xs:restriction base="xs:positiveInteger">
					<xs:minInclusive value="1"/>
					<xs:maxInclusive value="12"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="day" use="required">
			<xs:simpleType>
				<xs:restriction base="xs:positiveInteger">
					<xs:minInclusive value="1"/>
					<xs:maxInclusive value="31"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:attributeGroup>
	<xs:complexType name="markedUpTextNoLinkType" mixed="true">
		<xs:choice minOccurs="0" maxOccurs="unbounded">
			<xs:choice>
				<xs:annotation>
					<xs:documentation>Text Decoration Markup</xs:documentation>
				</xs:annotation>
				<xs:element name="bold" type="wb:markedUpTextNoLinkType"/>
				<xs:element name="italic" type="wb:markedUpTextNoLinkType"/>
				<xs:element name="phrase" type="wb:markedUpTextNoLinkType"/>
				<xs:element name="subscript" type="wb:markedUpTextNoLinkType"/>
				<xs:element name="superscript" type="wb:markedUpTextNoLinkType"/>
			</xs:choice>
			<xs:choice>
				<xs:annotation>
					<xs:documentation>Text Identification Markup</xs:documentation>
				</xs:annotation>
				<xs:element name="date">
					<xs:complexType mixed="true">
						<xs:complexContent mixed="true">
							<xs:extension base="wb:markedUpTextNoLinkType">
								<xs:attributeGroup ref="wb:dateAttrGroup"/>
							</xs:extension>
						</xs:complexContent>
					</xs:complexType>
				</xs:element>
				<xs:element name="person">
					<xs:complexType mixed="true">
						<xs:complexContent mixed="true">
							<xs:extension base="wb:markedUpTextNoLinkType">
								<xs:attributeGroup ref="wb:personAttrGroup"/>
							</xs:extension>
						</xs:complexContent>
					</xs:complexType>
				</xs:element>
				<xs:element name="time">
					<xs:complexType mixed="true">
						<xs:complexContent mixed="true">
							<xs:extension base="wb:markedUpTextNoLinkType">
								<xs:attributeGroup ref="wb:timeAttrGroup"/>
							</xs:extension>
						</xs:complexContent>
					</xs:complexType>
				</xs:element>
			</xs:choice>
		</xs:choice>
		<xs:attribute ref="xml:lang"/>
	</xs:complexType>
	<xs:attributeGroup name="personAttrGroup">
		<xs:attribute name="authorityKey" type="xs:string" use="required"/>
		<xs:attribute name="idAuthority" type="xs:string" use="required"/>
	</xs:attributeGroup>
	<xs:attributeGroup name="timeAttrGroup">
		<xs:attribute name="hour" use="required">
			<xs:simpleType>
				<xs:restriction base="xs:nonNegativeInteger">
					<xs:minInclusive value="0"/>
					<xs:maxInclusive value="23"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="minutes" use="required">
			<xs:simpleType>
				<xs:restriction base="xs:nonNegativeInteger">
					<xs:minInclusive value="0"/>
					<xs:maxInclusive value="59"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="seconds" use="optional">
			<xs:simpleType>
				<xs:restriction base="xs:decimal">
					<xs:minInclusive value="0"/>
					<xs:maxExclusive value="60"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="timezone" use="optional">
			<xs:simpleType>
				<xs:restriction base="xs:int">
					<xs:minInclusive value="-12"/>
					<xs:maxInclusive value="12"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:attributeGroup>
</xs:schema>

Thanks,

Richard R. Liu
Received on Tuesday, 29 April 2003 21:12:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:36 GMT