Re: Problems with definingt simple restriction

"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 UTC