Hello all,
I have tried to validate a simple xml document with a simple schema,
too. If have only 1 Element with one attribute, which i have defines as
optional, but with an default content.
I had exepected, that xerces would add the default attribute into the
psvi (n my case a streamresult-object), but the result is a xml document
without the default attribute.
Here is my Java-Code:
##################################################################
final Result res = new StreamResult(new FileWriter(new
File("d:\\output.xml")));
final Source source = new StreamSource(new FileReader(new
File(input.toURI())));
SchemaFactory sf = SchemaFactory.newInstance(NAMESPACE);
Schema f = sf.newSchema(schema);
Validator val = f.newValidator();
val.validate(source, res);
##################################################################
Did i miss something?
Thx
mfw
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]