OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Who can implement W3C XML Schema ?

[ Lists Home | Date Index | Thread Index ]

Title: RE: [xml-dev] Who can implement W3C XML Schema ?

<Snip>
what is the point of allowing an xsd:restriction element with no children?
</Snip>

If I read your question correctly (apologies if I'm not), here's a case where this *might* be useful:

Suppose I've defined a simple type of string length 5 as follows:

        <xsd:simpleType name = "StringLength5Type">
                <xsd:restriction base = "xsd:string">
                        <xsd:maxLength value = "5" fixed = "true"/>
                </xsd:restriction>
        </xsd:simpleType>

I can reuse this definition in other simple type definitions - for instance, to declare another simple type that is also string length 5:

<xsd:simpleType name = "SomeNewCodeType">
     <xsd:restriction base = "StringLength5Type"/>
</xsd:simpleType>

Regards,
Joe Chiusano
LMI

> **************************************************************************
>   Joseph M. Chiusano
>   Logistics Management Institute
>   2000 Corporate Ridge
>   McLean, VA 22102
>   Email: jchiusano@lmi.org
>   Tel: 571.633.7722
> **************************************************************************
>


-----Original Message-----
From: Ronald Bourret [mailto:rpbourret@rpbourret.com]
Sent: Friday, March 22, 2002 4:21 PM
To: xml-dev@lists.xml.org
Subject: Re: [xml-dev] Who can implement W3C XML Schema ?


OK. Now that I finally understand why this is invalid, what is the point
of allowing an xsd:restriction element with no children? Is it
specifically to allow me to restrict content down to emptiness and yet
still get the OO advantages (?) of using a restriction?

-- Ron

-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS