xerces-2j and qualified optional default attributes

R

Robert W.

Hi,
I have written a schema, specifying attributeFormDefault and
elementFormDefault to be "qualified". If I parse an instance document
validating against this schema with the DOMParser from xerces2-j (2.8.0)
and then serialising the DOM-tree again into a file, all optional attributes
are added with their default values, but they are not qualified with a
namespace-prefix, which finally prevents the serialised document from
being valid with respect to the schema.
How to tell xerces, to qualify the optional attributes with their
namespace when they are added to the DOM-tree?
 
M

Martin Honnen

Robert said:
I have written a schema, specifying attributeFormDefault and
elementFormDefault to be "qualified". If I parse an instance document
validating against this schema with the DOMParser from xerces2-j (2.8.0)
and then serialising the DOM-tree again into a file, all optional attributes
are added with their default values, but they are not qualified with a
namespace-prefix, which finally prevents the serialised document from
being valid with respect to the schema.
How to tell xerces, to qualify the optional attributes with their
namespace when they are added to the DOM-tree?

How exactly do you serialize the DOM tree? I can think of lots of ways
that might or might not be Xerces specific. If you have problems with
your serialization then show us the code you use to serialize.
 
R

Robert W.

How exactly do you serialize the DOM tree? I can think of lots of ways
that might or might not be Xerces specific. If you have problems with
your serialization then show us the code you use to serialize.

Ehm, I tried to reproduce the problem with a simple java-application.
This failed, although the problem persists in a tomcat environment. I
think, I should retry to solve my problem in another NG. However,
thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top