[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Schema issue - enumerations - off topic apology

Subject: Re: Schema issue - enumerations - off topic apology
From: Ihe Onwuka <ihe.onwuka@xxxxxxxxx>
Date: Sat, 6 Oct 2012 18:00:45 +0100
Re:  Schema issue - enumerations - off topic apology
On Sat, Oct 6, 2012 at 5:31 PM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
>> The instance has the following
>>
>>     <propertyDetails>
>>          <status>Available</status>
>>          <propertyType>Industrial</propertyType>
>>          <propertySubType>General Industrial</propertySubType>
>>     </propertyDetails>
>>
>> My schema validation fails with this message
>>
>> cvc-enumeration (I-valid: Value 'General' is not facet-valid with respect
>> to enumeration '[Cold Store, Data Centre, Design and Build,
>> Distribution Warehouse, General Industrial, High Bay Warehouse, etc
>> .....]'. It must be a value from the enumeration.
>>
>> It has failed to recognise that General Industrial is a valid value
>> and instead failed the validation on the word General.
>>
>> It looks like some sort of problem with enumerations that contain whitespace.
>
> Are you sure you don't have a
> <propertySubType>General</propertySubType> elsewhere in your xml?
>
> If not, post a small complete runnable example demonstrating the problem.
>

I have seen the problem. It something I worried about at the time and
sure enough it has come back to bite me.

PropertySubType is actually defined like this

<xsd:element name="propertySubType" type="PropertySubTypeList" />
<xsd:simpleType name="PropertySubTypeList">
       <xsd:list itemType="PropertySubType"/> 	
 </xsd:simpleType>

So it looks like you can't use lists on enumeration facets that
contain whitespace because it will validate each token.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.