Fwd: RE: Attribute use in XML schemas

I thought that a fixed value is also a default value.
 
--Stefan
> 
> 
> > Where in your link does it say that if an attribute is re
> > quired then it cannot have a fixed value? 
> > 
> > 	-----Origi
> > nal Message----- 
> > 	From: Stefan Wachter [mailto:Stefan.W
> > achter@gmx.de] 
> > 	Sent: Tue 8/27/2002 3:42 AM 
> > 	To: Mesa
> >  Capela Encarnacion; xmlschema-dev@w3.org 
> > 	Cc: 
> > 	Subje
> > ct: Re: Attribute use in XML schemas
> > 	
> > 	
> > 
> > 
> > 	Attribut
> > es that are required are not allowed to have a fixed or d
> > efault
> > 	value. This was discussed  in this newsgroups so
> > me days ago. The relevant link
> > 	is: http://www.w3.org/TR
> > /xmlschema-1/#src-attribute.
> > 	
> > 	--Stefan
> > 	
> > 	>
> > 	>
> > 	>
> > 
> > 	>
> > 	> Hello!
> > 	>
> > 	> I am trying to define an XML docu
> > ment that conforms to a particular
> > 	> schema, and I have
> >  the following problem: I define a first XML schema, and
> > 
> > 	in
> > 	> this schema I define a complex type with three a
> > ttributes. I set the use
> > 	of
> > 	> these attributes to req
> > uired, and I set one of this attributes to a fixed
> > 	> va
> > lue.
> > 	>
> > 	> Then I define a second XML schema, based on 
> > the first schema. In this
> > 	> second schema, I define an 
> > element of the previous complex type, and set
> > 	> another
> >  attribute to a fixed value.
> > 	>
> > 	> Finally I define an 
> > XML document based on the second schema. In this XML
> > 	> 
> > document I see the element with the following values for 
> > the attributes:
> > 	the
> > 	> attribute I defined in the firs
> > t schema appears in the XML document as
> > 	> required, wit
> > h the fixed value. Nevertheless, the attribute that I set
> >  to
> > 	a
> > 	> fixed value in the second schema appears in t
> > he XML document as optional,
> > 	> instead of required, wit
> > h the fixed value. Why this attribute is not
> > 	included
> > 	> as required in the XML document?. In the initial defin
> > ition of the
> > 	> attribute, the use was set to required, 
> > and I only add a fixed value for
> > 	it, but I
> > 	> didn't c
> > hange the use of the attribute. Moreover, the use of the 
> > first
> > 	> attribute is very similar, and this attribute i
> > s included as required,
> > 	with the
> > 	> fixed value, in th
> > e XML document.
> > 	>
> > 	> On the other hand, when I define 
> > a complex type in an XML schema, I define
> > 	> an XML docu
> > ment based on this schema, with an element of the complex
> >  type,
> > 	> and try to derive by restriction the complex t
> > ype, I cannot modify the
> > 	> facets of the attributes. Is
> >  it not possible to do this?. Why?.
> > 	>
> > 	> Thanks.
> > 	>
> > 	> Best wishes,
> > 	>
> > 	> Encarna
> > 	>
> > 	>
> > 	
> > 	
> > 
> 
> 

Received on Tuesday, 27 August 2002 16:01:42 UTC