Canonical XML 2.0 test cases and default for TrimTextNodes

Hello,

I'm currently implementing Canonical XML 2.0 according to this document:
https://www.w3.org/TR/2013/NOTE-xml-c14n2-20130411/
(Was the latest published at https://www.w3.org/TR/xml-c14n2/ at the 
time of writing)

I am using the test cases from this page to verify my implementation:
https://www.w3.org/TR/2013/NOTE-xml-c14n2-testcases-20130618/
(Was the latest published at https://www.w3.org/TR/xml-c14n2-testcases/ 
at the time of writing)

However, it seems to me that the test cases assume that TrimTextNodes 
defaults to false, while the actual specification defaults it to true.

This also means that "c14nDefault.xml" and "c14nTrim.xml" would be 
equivalent, but they do have different example outputs 
(out_inC14N4_c14nDefault.xml and out_inC14N4_c14nTrim.xml).

Am I misunderstanding something, or were those test cases not updated 
when the specification changed the TrimTextNodes default from false to true?

And if that is the case, can I just add 
"<c14n2:TrimTextNodes>false</c14n2:TrimTextNodes>" to all 
CanocalizationMethod files, remove the element from c14nTrim.xml, and 
then expect all the test cases to pass?

Thank you,
Michael

Received on Tuesday, 13 March 2018 07:11:48 UTC