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

Re: your mail

From: Boris Kolpackov <boris@codesynthesis.com>
Date: Fri, 25 Apr 2008 21:18:14 +0200
To: Marco Faustinelli <marco_faustinelli@yahoo.com>
Cc: xmlschema-dev@w3.org
Message-ID: <20080425191814.GC29447@karelia>
Re: your mail

Hi Marco,

Marco Faustinelli <marco_faustinelli@yahoo.com> writes:

> - If the XSD of the envelope defines the payload as
> <any namespace="##targetNamespace"> the validator expects to find
> inside elements of the envelope

Yes, that's the expected behavior; ##targetNamespace means the namespace
of the schema in which the wildcard is defined (envelope schema in your
case).

If I were designing such a protocol I would probably use substitution
groups instead of wildcard to provide extensibility. That is, I would
define an abstract 'payload' type (which may include some common
elements and/or attributes that all payloads should have) and 'payload'
element which will be the substitution group root. Then I would define
the 'envelope' type as containing this 'payload' element. Then each
specific payload would extend the abstract 'payload' type and define
an element of this type that substitutes 'payload'.

Boris

-- 
Boris Kolpackov, Code Synthesis Tools   http://codesynthesis.com/~boris/blog
Open source XML data binding for C++:   http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde
Received on Friday, 25 April 2008 19:39:26 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.