[xsl] Re: Re: pretty-printing XML into HTML

Subject: [xsl] Re: Re: pretty-printing XML into HTML
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Thu, 18 Dec 2003 21:15:05 +0100
"Lars Huttar" <lars_huttar@xxxxxxx> wrote in message
> Thanks for the pointer. I thought this seemed like something that would
> have been done years ago!
> The Mozilla version of XPath Visualizer is especially useful as it doesn't
> use processor-specific extensions.
> (Albeit the output DHTML doesn't work in IE, but I don't need
> collapsing tree functionality anyway, so I can just take it out.)
> One note on correctness of displaying namespaces:
> XPath Visualizer doesn't give correct results for an attribute that's
> in a namespace that no ancestor element has (or has for the same prefix).
> E.g. the XML document
>   <test xmlns:foo="bigrabbit" foo:squid="fish" />
> is displayed as
>   <test foo:squid="fish"/>
> i.e. the foo: prefix is used but never declared.

That's really the case with The XPV for Mozilla -- the XPV for IE displays

> Another example input for which incorrect output is generated is
>   <foo:test xmlns:foo="bigrabbit">
>     <bar xmlns:foo="littlerabbit" foo:squid="fish" />
>   </foo:test>
> The generated output is:
>   <foo:test xmlns:foo="bigrabbit">
>     <bar xmlns="" foo:squid="fish"/>
>   </foo:test>
> I.e. foo:squid is in the wrong namespace.

That's really the case with The XPV for Mozilla -- the XPV for IE displays

Thank you for this feedback -- I'll have a look and fix this.

> By the way, a few (actual or possible) textual errata I ran across
> in the process of looking up XPath Visualizer:
> There's a broken link on the XPath Visualizer page
> at http://www.vbxml.com/xpathvisualizer/:
>   http://dpawson.co.uk/xsl/N75.html
> should be
>   http://dpawson.co.uk/xsl/sect2/N75.html#d1637e284

Quite possible -- this page has not been touched for three years and the
links in the XSL FAQ have changed several times since then.

I will probably create a new page for the XPV on sourceforge.net (if and
when I have free time for this), which will compensate temporarily for the
time lag. But please, do not expect this anytime soon as the XPV is history
and not high priority for me at the moment.

> Also, the Readme.txt file for the Mozilla version of XPath Visualizer
> 1.4 (which I found at
> says:
>   This is a customisation of the original XMLPrettyPrint.xsl
>   written by Jonas Sicking <sicking@xxxxxxxxxxx>.
> I can't find references to any XSL file by that name, but there
> is a file called XMLPrettyPrint.xml (note extension)
> by Jonas Sicking, at
> ml
> Maybe the Readme.txt file needs to be corrected?

I have in E:\Program Files\mozilla.org\Mozilla\bin\res\xml the following two


Needless to say, I have not renamed any original files. Even if somebody
renamed the file in a subsequent release of Mozilla, it is only correct to
leave unchanged in the readme.txt the name of the original file that served
as a base for the XPV for Mozilla.

> Lastly, the file XPathMainNS.htm (in the Mozilla version)
> has a title of "XPath Visualiser Ver. 1.0" (note both spelling and
> version number) -- whereas the Readme.txt file says the latest
> version is 1.4. Presumably XPathMainNS.htm needs to have its title
> changed?

So, what is wrong with the spelling? That it is not american? :o)

The text about the latest version is referring to the XPV for IE -- and it
is true that 1.4 is the latest version for the XPV for IE.

The readme.txt file does explicitly say:

"Files in this distribution (XPathVisualiser for Mozilla -- Ver. 1.0)".

To summarize:

  Thank you for finding the bug(s) related to displaying of namespace
definitions by the XPV for Mozilla. The fix will be part of the next

Dimitre Novatchev.
FXSL developer.

http://fxsl.sourceforge.net/ -- the home of FXSL
Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread