XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Lee PurtonSubject: enumeration
Author: Lee Purton
Date: 13 Oct 2006 07:30 AM
Hi,

Im trying to write a schema (which I am new at doing) and have a problem with setting an enumeration. The relevant code is detailed below and the section in question has been separated for ease of reference;

<xsd:complexType name="MortgageClaimType">
<xsd:sequence>
<xsd:element name="CustomerUniqueIdentifier" type="xsd:string" />
<xsd:element name="Claimant" type="ClaimantType" />
<xsd:element name="Solicitor" type="SolicitorType" />
<xsd:element name="Property" type="PropertyType" />
<xsd:element name="Defendant" type="DefendantType" />
<xsd:element name="ClaimantDesignation" type="xsd:string" />

<xsd:simpleType>
<xsd:restriction base="xs:string">
<xsd:sequence>
<xsd:enumeration value="LocalAuthority" />
<xsd:enumeration value="Commercial" />
</xsd:sequence>
</xsd:restriction>
</xsd:simpleType>

<xsd:element name="ParticularsofClaim" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>

When validating Im getting the following message and am unsure as to what Im doing wrong;

s4s-elt-must-match.1: The content of 'sequence' must match (annotation?, (element | group | choice | sequence | any)*). A problem was found starting at: simpleType. [28]

Any suggestions would be grately appreciated.

Cheers.
Lee



Postnext
Ivan PedruzziSubject: enumeration
Author: Ivan Pedruzzi
Date: 13 Oct 2006 03:22 PM
Hi Lee,

The schema definition is invalid, no need of <xsd:sequence> around xsd:enumeration.

You are allow to use xsd:sequence only as child of xsd:restriction. have a look to the specification (http://www.w3.org/TR/xmlschema-2/#rf-enumeration)

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Posttop
Lee PurtonSubject: enumeration
Author: Lee Purton
Date: 16 Oct 2006 04:32 AM
Thanks Ivan, I'll bear your comments in mind when I review the problem this afternoon.

Regards.

Lee

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.