[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: JDK 5 XSLTC handling of namespace prefixes

Subject: Re: JDK 5 XSLTC handling of namespace prefixes
From: andrew welch <andrew.j.welch@xxxxxxxxx>
Date: Mon, 19 Dec 2005 15:40:32 +0000
xml c14n jdk
> 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 &apos; 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.