Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Derivation by restriction from complexType/simpleContent

From: George Cristian Bina <george@---------.--->
To: Simon.Cox@-----.--
Date: 12/2/2004 4:21:00 PM
Hi Simon,

 > 1. Is the "double" simpleContent preserved or not?

Yes, that is the {content type} property.
See
http://www.w3.org/TR/xmlschema-1/#declare-type
3.4.2 XML Representation of Complex Type Definitions
Complex Type Definition with simple content Schema Component
{content type}

The {content type} for MeasureType is double:
***
4 otherwise (the type definition =B7resolved=B7 to by the =B7actual value=
=B7 of 
the base [attribute] is a simple type definition and the <extension> 
alternative is chosen), then that simple type definition.
***
And so it is the content type for LenghtType:
***
1 If the type definition =B7resolved=B7 to by the =B7actual value=B7 of t=
he base 
[attribute] is a complex type definition whose own {content type} is a 
simple type definition and the <restriction> alternative is chosen, then 
starting from either
1.1 the simple type definition corresponding to the <simpleType> among 
the [children] of <restriction> if there is one;
1.2 otherwise (<restriction> has no <simpleType> among its [children]), 
the simple type definition which is the {content type} of the type 
definition =B7resolved=B7 to by the =B7actual value=B7 of the base [attri=
bute]
a simple type definition which restricts the simple type definition 
identified in clause 1.1 or clause 1.2 with a set of facet components 
corresponding to the appropriate element information items among the 
<restriction>'s [children] (i.e. those which specify facets, if any), as 
defined in Simple Type Restriction (Facets) (=A73.14.6);
***

 > 2. Is there any way I can restrict the value of uom?

<complexType name="LengthType">
     <simpleContent>
         <restriction base="gml:MeasureType">
             <attribute name="uom" use="required">
                 <simpleType>
                     <restriction base="token">
                         <xs:enumeration value="meter"/>
                     </restriction>
                 </simpleType>
             </attribute>
         </restriction>
     </simpleContent>
</complexType>

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
www.---.com


Simon.Cox@c... wrote:
> What is the correct syntax for derivation from complexType/simpleConten=
t
> types?
> For example, if I write
> 
> <complexType name="MeasureType">
> 	<simpleContent>
> 		<extension base="double">
> 			<attribute name="uom" type="token"
> use="required"/>
> 		</extension>
> 	</simpleContent>
> </complexType>
> 
> <complexType name="LengthType">
> 	<simpleContent>
> 		<restriction base="gml:MeasureType"/>
> 	</simpleContent>
> </complexType>
> 
> 1. Is the "double" simpleContent preserved or not?
> 2. Is there any way I can restrict the value of uom?
> 
> Simon Cox
> ______
> Simon.Cox@c...  CSIRO Exploration & Mining
> 26 Dick Perry Avenue, Kensington WA 6151
> PO Box 1130, Bentley WA 6102  AUSTRALIA
> T: +61(8) 6436 8639  F: +61(8) 6436 8555  
> C: +61(4) 0330 2672 callto://dr_shorthair 
> http://www.em.csiro.au 
>   
> 

From nobody@w... Thu Dec 02 15:55:38 2004
Received: from wiggum.w3.org ([128.30.52.23])
	by frink.w3.org with esmtp (


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent