[xsd-users] anyAttribute without processContents: generated code fails to parse

Boris Kolpackov boris at codesynthesis.com
Tue Jan 9 15:03:27 EST 2007


Hi Jeroen,

Jeroen N. Witmond <jnw at xs4all.nl> writes:

> When in my schema I use <anyAttribute namespace="##other"/> without
> processContents attribute, the code generated from it refuses to parse
> the related xml file (error: Attribute
> '{http://www.w3.org/XML/1998/namespace}base' is not declared for
> element 'item'), while DOMPrint -n -s -f -v=always does not complain.
> Adding processContents="lax" solves this problem.  I don't know where
> the default for processContents is or should be defined, but I'm
> intrigued by the difference in behavior between xsd's generated code
> and (Xerces-C++ 2.6) DOMPrint.

If you do not specify the processContents attribute, it defaults to
"strict" so the XSD is correct here. I am not sure why DOMPrint
behaves differently. Could be due to some differences in how parsing
is set up.


hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20070109/b18536f5/attachment.pgp


More information about the xsd-users mailing list