W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2008

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>

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

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 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 UTC

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