You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Timothy Kelly <tm...@ecs.soton.ac.uk> on 2000/11/17 10:24:32 UTC
attribute problem.
I have the following XML:
<Color colorNo = "1">RED</Color>
And I want to write a schema for it, now the latest XML Schema draft says
that it should be done something like this (I may have this slightly
wrong, I have not got my notes on me!... also I know xerces does not
support this):
<element name="color">
<complexType>
<simpleContent>
<extension base = "string"/>
</simpleContent>
<attribute name = "colorNo" type = "string">
</complexType>
</element>
Now the April draft did not define <simpleContent>, so I am just wondering
if it is possible to represent this schema in a way that the current
version of XERCES supports? Also does anyone know when a version of XERCES
supporting a more recent draft, or even the candidate release will be
ready?
Thankyou in advance,
---------------------------------
Tim Kelly
tmk198@soton.ac.uk
Re: attribute problem.
Posted by Elena Litani <hl...@jtcsv.com>.
Hi, Timothy,
I believe it should be:
<element name='Color'>
<complexType base=string' derivedBy='extension'>
<attribute name='colorNo' type='string' />
</complexType>
</element>
For more information see WD specifications -
http://www.w3.org/TR/2000/WD-xmlschema-0-20000407/
Elena
Timothy Kelly wrote:
>
> I have the following XML:
>
> <Color colorNo = "1">RED</Color>
>
> And I want to write a schema for it, now the latest XML Schema draft says
> that it should be done something like this (I may have this slightly
> wrong, I have not got my notes on me!... also I know xerces does not
> support this):
>
> <element name="color">
> <complexType>
> <simpleContent>
> <extension base = "string"/>
> </simpleContent>
> <attribute name = "colorNo" type = "string">
> </complexType>
> </element>
>
> Now the April draft did not define <simpleContent>, so I am just wondering
> if it is possible to represent this schema in a way that the current
> version of XERCES supports? Also does anyone know when a version of XERCES
> supporting a more recent draft, or even the candidate release will be
> ready?
>
> Thankyou in advance,
>
> ---------------------------------
> Tim Kelly
> tmk198@soton.ac.uk
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org