schema help needed (3 questions)

Hi,
  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:complexType>
							<xsd:simpleContent>
								<xsd:restriction base="xsd:double">
									<xsd:attribute name="value" default="0">
										<xsd:simpleType>
											<xsd:restriction base="xsd:double">
												<xsd:minInclusive value="-100000"/>
												<xsd:maxExclusive value="100000"/>
											</xsd:restriction>
										</xsd:simpleType>
									</xsd:attribute>
								</xsd:restriction>
							</xsd:simpleContent>
						</xsd:complexType>
					</xsd:element>



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"/>
 </restriction>
</simpleType>


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

Thanks for any info/pointers.

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

<complexType name="derivedType">
  <complexContent>
    <extension base="baseType">
      <attribute name="that" type="someenum"
fixed="specficenum"/>
    </extension>
  </complexContent>
</complexType>



Thanks for any hints/tips/pointers



=====


__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

Received on Thursday, 6 December 2001 19:29:43 UTC