[xsde-users] How to config xsde to parse without namespace check / How to gain a better error message

Boris Kolpackov boris at codesynthesis.com
Wed Oct 24 12:45:09 EDT 2007


Hi Bin,

Jiang, Bin (Bin) <binjiang at alcatel-lucent.com> writes:

> [Jiang, Bin (Bin)] This may not work if there is more than one
> namespace definitions in a instance document, right?

It can still work but it gets harder. You will need to know
which element is in which namespace (e.g., have a map of
element names to namespaces).

Also, since there are several namespaces involved, all but
one must have some prefix assigned to them. You can configure
Expat to ignore namespaces in which case it will pass names
with namespace prefixes (e.g., "nsp:name"). You can use
the prefix to figure out the corresponding namespace.


> [Jiang, Bin (Bin)] It's not so urgent now, since there is
> line/column information and we can always locate the error
> position. But if I can provide name or namespace, the error
> message would be more user-friendly and complete. Is there
> any work-around I can use?

I can't think of an easy way to make it work. The schema
validation code is generated by the compiler so you will
have to modify that. I guess the easiest way is to use XSD
in the meantime (which uses exceptions to propagate errors
and includes name/namespace information).


Boris




More information about the xsde-users mailing list