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

Lee requested me to post this mail to comments list

-----Original Message-----
From: Lee Humphries [mailto:Lee_Humphries@softworks.com.au]
Sent: Sunday, June 16, 2002 6:56 PM
To: asirv@webmethods.com
Subject: RE: XML Schema 1.1 suggestion - allow defining of namespaces
for named elements or attributes


Hi Asir,

Sorry, obviously I didn't put in enough detail.

Here's a very simple example of what I'm looking to do (deliberately
sans namespace prefixes):
<Envelope xmlns="www.myenvelope.com">
	<From>Me</From>
	<To>You</To>
	<MessageBody>
		<SomethingSpecific xmlns="www.mymessage.com">
	</MessageBody>
</Envelope>

The thinking at the moment is that we'd define the contents of
<MessageBody> as xsd:any with a namespace="##other" for example.
What I'm dealing with though, is that I know in advance all the
different element names within <MessageBody> and I also know their
namespaces.  What I want to be able to do is to define both the element
name and the namespace, whereas at the moment I can only define one or
the other.
In other words I can have:
...
<xsd:element name="MessageBody">
	<xsd:complexType>
		<xsd:choice>
			<xsd:element name="SomethingSpecific"
type="SomethingSpecificType"/>
			<xsd:element name="SomeError"
type="SomeErrorType"/>
		</xsd:choice>
	</xsd:complexType>
</xsd:element>
...

or:

...
<xsd:element name="MessageBody">
	<xsd:complexType>
		<xsd:sequence>
			<xsd:any namespace="www.mymessage.com
www.myerror.com"/>
		</xsd:sequence>
	</xsd:complexType>
</xsd:element>
...

But what I really want is:
...
<xsd:element name="MessageBody">
	<xsd:complexType>
		<xsd:choice>
			<xsd:element name="SomethingSpecific"
namespace="www.mymessage.com" type="SomethingSpecificType"/>
			<xsd:element name="SomeError"
namespace="www.myerror.com" type="SomeErrorType"/>
		</xsd:choice>
	</xsd:complexType>
</xsd:element>
...

Regards,
Lee Humphries
SOFTWORKS Australia
email: Lee_Humphries@softworks.com.au
phone: +61-7 3511 7000
Level 1, 33 Park Road, Milton, Queensland 4064, Australia

-----Original Message-----
From: Asir S Vedamuthu [mailto:asirv@webmethods.com]
Sent: Saturday, 15 June 2002 2:27 AM
To: Lee Humphries; W3C XML Schema Comments list
Subject: RE: XML Schema 1.1 suggestion - allow defining of namespaces
for named elements or attributes


Lee,

I do not understand your suggestion. May I request you to elaborate with
one
or two examples?

Asir

-----Original Message-----
From: www-xml-schema-comments-request@w3.org
[mailto:www-xml-schema-comments-request@w3.org]On Behalf Of Lee
Humphries (by way of "C. M. Sperberg-McQueen" <cmsmcq@acm.org>)
Sent: Friday, June 14, 2002 11:18 AM
To: W3C XML Schema Comments list
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 Tuesday, 18 June 2002 07:33:52 UTC