W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2002

Re: Problems with definingt simple restriction

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 16 Dec 2002 13:53:44 +0000
To: <sre@bizpartner.no>
Cc: <xmlschema-dev@w3.org>
Message-ID: <f5bbs3mf4t3.fsf@erasmus.inf.ed.ac.uk>

"Steinar Rune Eriksen" <sre@bizpartner.no> writes:

> hi
> 
> This construction used to work 6 months ago... (using XML Spy 3.5 under
> xmlns="http://www.w3.org/2001/XMLSchema" )
> 
> 	<complexType name="Price">
> 		<simpleContent>
> 			<restriction base="double">
> 				<fractionDigits value="2"/>
> 				<attribute name="currency" type="string"
> use="required"/>
> 			</restriction >
> 		</simpleContent>
>       </complexType>
> 
> Using XML Spy 5, I get a validation error on restriction _base_, seeming
> that this is not valid anymore. I cannot find any examples either of
> restrction being used as child under simpleContent, though it seems like it
> should be valid according to spec. Am I wrong?

The old behaviour was a bug -- you're trying to restrict (with a
facet) and extend (with an attribute) at the same time -- not allowed,
sorry.  You'll have to do it in two steps, either order is OK.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2002, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Monday, 16 December 2002 08:53:39 GMT

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