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] dynamically extensible schema

[ Lists Home | Date Index | Thread Index ]

Christian,

This is kludgy, and there may be a better way to do it (if so, someone
will suggest it shortly I am sure).

(1) Declare type XY as an abstract type, in the "extended" namespace

(2) Use the xsd:any wildcard element, as you suggest below

(3) With the xsd:any element, specify a "namespace" attribute of the
"extended" namespace identifier - Ex:

<any namespace="extended_namespace_identifier_goes_here"
...rest of declaration.../>

I also don't believe that your namespace identifiers of "core" and
"extended" are valid URIs, as required.

Kind Regards,
Joe Chiusano
Booz | Allen | Hamilton

Christian Sell wrote:
> 
> Hello,
> 
> I have a question I am banging my head against. I am looking for a way
> to validate instances like the following:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <dtw xmlns="core" xmlns:ext="extended">
> 
>      <echo message="this is a message"/>
> 
>      <ext:echo/>
> 
> </dtw>
> 
> The special thing is that the potential number of namespaces/schemas
> appearing in instances (beyond the core schema) is undetermined, and I
> therefore do not want to include a reference to the "extended" schema(s)
> inside the "core" schema. Instead, I would like to have a definition in
> the core schema that says something like:
> 
> "after the echo element, let there follow any number of elements from
> any namespace whose type extends the type XY" (where XY would also be
> defined in the core schema).
> 
> The only meachnism that I found in XML schema that comes close is the
> xsd:any element, but that does not alow me to specify the derivation
> constraint I mentioned above.
> 
> Does anyone have a hint?
> 
> thanks,
> Christian
> 
> -----------------------------------------------------------------
> 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>
begin:vcard 
n:Chiusano;Joseph
tel;work:(703) 902-6923
x-mozilla-html:FALSE
url:www.bah.com
org:Booz | Allen | Hamilton;IT Digital Strategies Team
adr:;;8283 Greensboro Drive;McLean;VA;22012;
version:2.1
email;internet:chiusano_joseph@bah.com
title:Senior Consultant
fn:Joseph M. Chiusano
end:vcard




 

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

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