Join GitHub today
CommentLessSource throws Exception with >= XSLT 2.0 engine (As Saxon 9.8) #99
Due to stylesheet explicitly targets version="1.0", using an engine that discontinued support of this version end up with an Exception.
So for instance we can't use matcher with ignoreComments() with Saxon >= 9.8. As a workaround we rely on DiffBuilder, providing a specific (fixed) Content wrapper.
Not sure it's easy to deal with the correct version as TransformerFactory don't provide such information.
Maybe XmlUnit could for that particular case, embrace version 2.0 for matcher convenience and provide a CommentLessSourceV1Compatibility to be use with DiffBuilder for old version. After all, 2.0 is released since 2007.
added a commit
Aug 26, 2017
I've just pushed to a branch to see whether the build breaks for openjdk6 in Travis (I haven't got a JDK6 around myself anymore).
In either case it would probably be cleaner to make the version configurable, if the build passes for OpenJDK6 (and a similar change for XMLUnit.NET would pass as well), I'd be willing to make 2.0 the new default.