W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2007

RE: any vs. xs:element ref for including external schemas

From: Michael Kay <mike@saxonica.com>
Date: Thu, 7 Jun 2007 23:28:17 +0100
To: "'Pete Cordell'" <petexmldev@tech-know-ware.com>, <xmlschema-dev@w3.org>
Message-ID: <01b301c7a953$254dbda0$6401a8c0@turtle>

> I've been chatting to someone on a separate list, and they 
> want to include whole XHTML documents with their instances 
> (e.g. start with <xhtml>...).
> The choices seem to be:
> <xs:any namespace="http://www.w3.org/1999/xhtml"/>
> but this allows any global element from the XHTML namespace.
> Or you can do:
> <xs:element xmlns:xhtml="http://www.w3.org/1999/xhtml" 
> ref="xhtml:xthml"/>
> This only allows the <xhtml> node.
> The downside of the latter ...

It seems to me that one option says "allow an XHTML document here" and the
other says "allow an XHTML fragment here", and you should use the option
that describes which of these you want to do. You said that "they" want to
include whole XHTML documents, and that suggests the xs:element option is
the right answer for them.

Michael Kay
Received on Thursday, 7 June 2007 22:28:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:43 UTC