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 UTC