stevedlawrence opened a new pull request #675:
URL: https://github.com/apache/daffodil/pull/675


   When converting SAX events to text using our built-in ContentHandler, we
   intentionally do not output namespace prefix mappings if a prefix has
   already been mapped to the same namespace. This differs from the
   XMLTextInfosetOutputter behavior, which does not do this duplicate
   removal. So for example, the XMLTextInfosetOutputter might output an
   infoset like this with duplicate namespace mappings:
   
       <ns:a xmlns:ns="foo">
         <ns:b xmlns:ns="foo">test</ns:b>
       </ns:a>
   
   But when using SAX we would output this, with the duplicate mapping
   removed:
   
       <ns:a xmlns:ns="foo">
         <ns:b>test</ns:b>
       </ns:a>
   
   Although these two infosets are functionally the same, our TDMLRunner
   requires that they be exactly the same, including the namespace prefix
   mappings on every element. Otherwise the TDMLRunner throws an exception
   and the test fails.
   
   Ideally, these two infoset outputters would always have the same output.
   Also, one could argue that our SAX ContentHandler should more closely
   match the SAX events, so if we get events with duplicate mappings, the
   ContentHandler should output duplicate mappings. So this modifies the
   ContentHandler so that it does not remove duplicate mappings, and it
   matches the XMLTextInfosetOutputter behavior/output, allowing tests to
   pass.
   
   DAFFODIL-2568


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to