Re: Includes with different target namespace?

Hamish,

     If you <import> the XHTML schema, your instance documents can look
like:
<yp:yourElement>
  <xh:anXHTMLElement>
  </xh:anXHTMLElement>
</yp:yourElement>

     If you want to use the same namespace prefix, (or no prefix) to mean
both sets of elements, you cannot do this.

     A loose justification: Part of the goal of having namespaces was that
programs could look at XML documents and unambiguously understand what each
element tag is about, in the particular sense of avoiding name collisions,
with awareness that the sets of tags defined in namespace probably should
not change after the namespace is published, but that this particular "no
change" restriction cannot be guaranteed.

                    Bob

Bob Schloss
IBM Thomas J. Watson Research Center
Yorktown Heights, New York, USA
http://www.research.ibm.com/XML


Hamish Eisler <HEisler@2roam.com>@w3.org on 10/01/2001 12:07:46 PM

Sent by:  xmlschema-dev-request@w3.org


To:   xmlschema-dev@w3.org
cc:
Subject:  Includes with different target namespace?



Hi -

I am trying to create a schema using the XHTML modularization strategy and
I
have a couple questions I hope some of you can help me with.

Essentially what I am trying to do is define a bunch of my own elements,
and
then specify that they may have XHTML children.

Suppose my schema has targetnamespace="foo" and the XHTML schema
(downloaded
from http://www.w3.org/TR/2001/WD-xhtml-m12n-schema-20010322/" has
targetnamespace "http://www.w3.org/1999/xhtml".  Is it legal to import this
schema into mine?  What would be the resulting namespace?  If not, is there
any recourse short of creating my own XHTML schema with an identical
targetnamespace?

On a side note - the referenced XHTML schema is written in the old
specification and I can't get XML Spy to convert it happily to the new
spec.
Anyone know of an updated version which is publicly available?

Thanks,

-Hamish

Received on Monday, 1 October 2001 12:32:40 UTC