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] Is there a way to reuse and extend an enumeration in XML s

[ Lists Home | Date Index | Thread Index ]
  • To: "William J. Kammerer" <wkammerer@novannet.com>, "XML Developers List" <xml-dev@lists.xml.org>
  • Subject: RE: [xml-dev] Is there a way to reuse and extend an enumeration in XML schema
  • From: "Chiusano Joseph" <chiusano_joseph@bah.com>
  • Date: Sun, 6 Mar 2005 11:47:21 -0500
  • Thread-index: AcUiayVm2WTx/VwzRGa6j6PBpof/MwAAI3qw
  • Thread-topic: [xml-dev] Is there a way to reuse and extend an enumeration in XML schema

I took the reference to "without altering the original definition" as
referring to the definition of the simple type (the "A", "B", and "C"
choices) - in which case the solution I proposed would meet that
requirement. But I agree that it is unclear as to whether the original
poster intended *any* definition, in which case I would ask that they
clarify.

Given a situation in where there are existing schemas, I don't see how
this can be done without changing *some declaration/definition*. If the
original schemas were written to - for example, somehow reference a URL
for the code lists, then that would a situation in which it might be
possible to meet such a requirement without updating changing any parts
of the existing schemas.

Kind Regards,
Joseph Chiusano
Booz Allen Hamilton
Strategy and Technology Consultants to the World
 

> -----Original Message-----
> From: William J. Kammerer [mailto:wkammerer@novannet.com] 
> Sent: Sunday, March 06, 2005 11:35 AM
> To: XML Developers List
> Subject: Re: [xml-dev] Is there a way to reuse and extend an 
> enumeration in XML schema
> 
> But if Kenneth Stephen's requirement (" without altering the 
> original [schema] definition") is anything like UBL's (John 
> Bosak said "the code list [is to] be extended without 
> modifying the UBL schemas." ), then you don't have the 
> freedom "to change element declarations accordingly - i.e. 
> elements that are currently declared as being of your 
> original simple type would have to be of your new simple 
> type."  The UBL documents are described by a huge rat's nest 
> of schemas and it is not at all practical for the UBL user to 
> be making changes in multiple places within those schemas 
> (unless he had a powerful modeling and schema editing tool 
> like Gefeg's EDIFIX).
> 
> I'd also take as a strongly implied requirement that element 
> and attribute names used in the *instance* data should not 
> change either.
> In the UBL situation, as soon as the underlying code list has 
> been updated by the maintenance authority, you'd want to 
> easily remove the "override" and "revert" to the (new) 
> standard off-the-shelf UBL schemas.
> The only freedom you have is to refer to a new schema in the 
> instance data (whose only purpose is to cause the "override" 
> of the enumeration to include new allowable code values).
> 
> William J. Kammerer
> Novannet
> Columbus, OH 43221-3859 . USA
> +1 (614) 487-0320
> 
> ----- Original Message -----
> From: "Chiusano Joseph" <chiusano_joseph@bah.com>
> To: "Kenneth Stephen" <marvin.the.paranoid@gmail.com>; "XML 
> Developers List" <xml-dev@lists.xml.org>
> Sent: Saturday, 05 March, 2005 11:01 PM
> Subject: RE: [xml-dev] Is there a way to reuse and extend an 
> enumeration in XML schema
> 
> 
> Try using the W3C Schema "union" datatype for this (if that's not the
> correct approach, Jeni Tennison, Henry Thompson or others 
> will be along
> shortly to correct me, I'm sure).
> 
> So you would define an additional simple type as follows (note that
> "your_current_simple_type_name" refers to the simpleType you 
> referred to
> when you said "I have a simpleType defined as..."):
> 
> <simpleType name="new_simple_type_name">
>   <union memberTypes="your_current_simple_type_name">
>     <simpleType>
>       <restriction base="NMTOKEN">
>         <enumeration value="D"/>
>       </restriction>
>     </simpleType>
>   </union>
> </simpleType>
> 
> You would then need to change element declarations accordingly - i.e.
> elements that are currently declared as being of your original simple
> type would have to be of your new simple type.
> 
> Kind Regards,
> Joseph Chiusano
> Booz Allen Hamilton
> Strategy and Technology Consultants to the World
> 
> ----- Original Message ----- 
> From: "Kenneth Stephen" <marvin.the.paranoid@gmail.com>
> To: "XML Developers List" <xml-dev@lists.xml.org>
> Sent: Saturday, 05 March, 2005 06:28 PM
> Subject: [xml-dev] Is there a way to reuse and extend an 
> enumeration in
> XML schema
> 
> 
> Hi,
> 
>     I have a simpleType defined as having an enumerated type having
> (for example) values 'A','B', and 'C'. I want to be able to reuse this
> type elsewhere and also add an additional value of 'D' without
> altering the original definition. Is there a way to do that?
> 
> Thanks,
> Kenneth
> 
> 
> -----------------------------------------------------------------
> 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://www.oasis-open.org/mlmanage/index.php>
> 
> 




 

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

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