W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2002

Re: XML Schema 1.1 suggestion - allow defining of namespaces for named elements or attributes

From: <noah_mendelsohn@us.ibm.com>
Date: Fri, 14 Jun 2002 12:00:29 -0400
To: "Lee Humphries" <Lee_Humphries@softworks.com.au> (by way of "C. M. Sperberg-McQueen" <<Lee_Humphries@softworks.com.au<Lee_Humphries>)
Cc: www-xml-schema-comments@w3.org
Message-ID: <OFD4E8E2AC.B9023D86-ON85256BD8.00587A3E@lotus.com>

I think I understand what you're asking:  can you write an element 
declaration without specifying a namespace, and then use it as the basis 
of declarations for similar looking elements in multiple  namespaces:

Yes, at least for certain purposes.  If you put the original definition in 
a schema document with no target namespace, and then <include> that into a 
schema document with targetNamepace="ns", then all the element, attribute 
and other definitions and declarations will be given the "includer's" 
namespace.  If you include the same source document in yet another with 
targetNamepace="ns2", then your element will be defined in that namespace 
as well.  This capability is sometimes informally called "chameleon 
include", since the original declaration takes on the characteristics of 
its including surroundings.  Hope this helps.

------------------------------------------------------------------
Noah Mendelsohn                              Voice: 1-617-693-4036
IBM Corporation                                Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------







"Lee Humphries" <Lee_Humphries@softworks.com.au> (by way of "C. M. 
Sperberg-McQueen" <cmsmcq
Sent by: www-xml-schema-comments-request@w3.org
06/14/02 11:18 AM

 
        To:     W3C XML Schema Comments list <www-xml-schema-comments@w3.org>
        cc:     (bcc: Noah Mendelsohn/Cambridge/IBM)
        Subject:        XML Schema 1.1 suggestion - allow defining   of namespaces for named 
elements or attributes





At the moment only the 'any' allows for its namespace to be defined.
This is a real pain in the neck when you can name the element (or
attribute) but you need to define it as existing in a different
namespace.
Adding the 'any' namespace declaration to 'element' and 'attribute'
would
go a long way to enabling full cross-namespace validation.

Lee Humphries
SOFTWORKS Australia
email: Lee_Humphries@softworks.com.au 
Received on Friday, 14 June 2002 12:18:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:01 GMT