Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Default values of attributes
Default values of attributes [message #576131] Sun, 24 August 2003 08:09
Hayden Marchant is currently offline Hayden Marchant
Messages: 90
Registered: July 2009
Member
I am trying to parse an XSD containing the following attribute definition,
and am getting an error:

<xs:attribute name="mustUnderstand" default="0">
<xs:simpleType>
<xs:restriction base="xs:boolean">
<xs:pattern value="0|1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>

The same error also occurs with:

<xs:attribute name="mustUnderstand" type="xs:boolean" default="0" />

The error is:
XSD: The value '0' of attribute 'default' must be of type
'http://www.w3.org/2001/XMLSchema#boolean'

The schema I'm trying to parse is the official W3C Soap:
http://www.w3.org/2001/06/soap-envelope

Any reason why this shouldn't work. I looked at
http://www.w3.org/TR/xmlschema-2/#boolean and it seems that this it's
syntax to refer to a boolean literal as 0 or 1. After changing the default
to false or true, it parsed ok.

Thanks,
Hayden Marchant
Previous Topic:sequence in extesion type ignored
Next Topic:A Search for a more gentle approach to error handling using Eclipse XSD
Goto Forum:
  


Current Time: Wed Oct 01 22:24:18 GMT 2014

Powered by FUDForum. Page generated in 0.02502 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software