[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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>
RE: any vs. xs:element ref for including external schemas

> 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
http://www.saxonica.com/
Received on Thursday, 7 June 2007 22:28:25 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.