drkm wrote:
Julian Reschke wrote:
Because the whole point of the stylesheet is to get rid of prefixes,
because their output is used to compare test results (where prefixes
are
irrelevant).
If I understand, you want to compare two XML documents
(with diff(1) or similar), so you want to strip out the
prefixes. IMHO, there are a lot of XML caracteristics that
make it unusable with diff(1) (withespaces, namespaces,
character entities, etc.).
That's why I am running them through a normalization step (sigh).
You have no chance unless you implement your own serializer because of
many reasons, one being that attribute order isn't significant - the
order in which they get written out is allowed to be different each
time (others include the namespace prefix problem you've come across,
entites and character references eg ' versus ', & #160; versus '
' etc).
XML canonicalization is a big topic and has its very own w3c rec:
http://www.w3.org/TR/xml-c14n
Could you not compare in memory structures and do the work in whatever
tool is comparing the XML? That way serialization issues aren't
involved.
cheers
andrew
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--