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

schema help needed (3 questions)

From: sk ask <arigapudi_s@yahoo.com>
Date: Wed, 5 Dec 2001 04:39:33 -0500 (EST)
Message-ID: <20011205093911.37619.qmail@web13502.mail.yahoo.com>
To: xmlschema-dev@w3.org
  I have lots of elements like that below. So,
I would like to define a type and reuse it. Not
sure how to give different values to min and
max Exclusive facets each time. Is it possible to
do that?

<xsd:element name="Elevation">
								<xsd:restriction base="xsd:double">
									<xsd:attribute name="value" default="0">
											<xsd:restriction base="xsd:double">
												<xsd:minInclusive value="-100000"/>
												<xsd:maxExclusive value="100000"/>

2) How to simulate a c/c++ enum in schema.

I would like the named constants to be A,B,C.

My attempt obviously fails:

<simpleType name="some">
 <restriction base="xsd:short"> <!-- ofcourse
xsd:string will work -->
   <enumeration value="A"/>
   <enumeration value="B"/>
   <enumeration value="C"/>

3)Is it possible to declare an attribute in an
abstract base class that will
fixed in the derived schema (so, it doen't need to
appear in the xml

Thanks for any info/pointers.

 <complexType name="baseType"
    <attribute name="that" type="someenum"/>

<complexType name="derivedType">
    <extension base="baseType">
      <attribute name="that" type="someenum"

Thanks for any hints/tips/pointers


Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
Received on Thursday, 6 December 2001 19:29:43 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:54 UTC