[xml] Default attribute when using xmlValidateDtd



I've got a .dtd file that I want to use to validate an xml document.

I started off doing this by including an external reference in the xml and passing the document through xmlValidateDocument().

The dtd file now needs to be stored on local embedded systems and it's location will vary between them. To handle this I have switched to using xmlParseDTD() and xmlValidateDtd(). This also works to the extent that the document is validated.

However, the generation of default attribute values is not the same using these two methods. xmlValidateDocument() provides the default values, but xmlValidateDtd() does not.

Is it possible to get the default values in to the output document when using xmlValidateDtd()? I suspect I need to set something to include XML_COMPLETE_ATTRS, but I've not been able to find where or if I'm even on the right track ;-)

Any pointers would be greatly appreciated !

Chris Tapp

opensource keylevel com
www.keylevel.com






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]