[Bug 3756] Pre-canonicalize the testsuite

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3756





------- Comment #5 from per@bothner.com  2006-09-21 16:56 -------
(In reply to comment #4)
> How would fragments be handled? Those are messy since c14n tools will choke on
> non-XML input(I guess). One could wrap them with an element and leave it there
> but that would require existing drivers to be changed, and also require them to
> wrap their output in a particular way. Another approach is to try to remove the
> document element afterwards, but this is all getting messy. As I currently see
> it, XML fragments are a show stopper for this enhancement.

First, we may not need a tool, if most of the tests are already canonicalized,
which they seem to be.  The number of mis-ordered namespace declarations that I
found is quite modest.  Attribute order may be another (unknown) problem.  And
there may be soem whitespace issues.  If the discrepancies are modest, we could
just fix them manually.  I can certainly submit patches for the
namespace-declaration "errors".

Secondly, I don't see that handling Fragments shoudl be difficult.  Surround
the Fragment by some magical header like <xqts-magic-frag-wrapper> ...
</xqts-magic-frag-wrapper> before running the canonicalizer.  Removing the
header afterwards should just be a trivial sed/perl script.  Am I missing
something?

Received on Thursday, 21 September 2006 16:56:13 UTC