[xml] Problem in Default Namespace handling defined in DTD



Hi ,

For the xml file attached the corresponding DTD contains the namespace declaration as a default attribute of the element svg. However when I parse the xml file using Sax Api’s for the second svg element I do not get the default nspace as part of the start element Ns callback, for the firstvelement I get nspace attribute….On debugging I found the problem occurred when the namespace has been pushed on the stack if the name space occurs a second time the namespace attribute counter is updated, maybe this is the expected behaviour, if so there is no problem, however if it is not so then the namespace attribute counter nbNs needs to be incremented. I am attaching the patch for the problem.

 

Regards

Ashwin

 

Attachment: viewport-nest.xml
Description: Text Data

Attachment: svg.dtd
Description: Text Data

Attachment: parsernsfix.txt
Description: Text document



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