XML doesn't prettyprint if it contains at least one XHTML element.

RESOLVED DUPLICATE of bug 314487

Status

()

Core
XML
--
minor
RESOLVED DUPLICATE of bug 314487
12 years ago
11 years ago

People

(Reporter: Jon Barnett, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4

If an XML document contains at least one element in the XHTML namespace, the document doesn't prettyprint.

Instead of showing the XML tree, the document is printed as if a CSS stylesheet is applied.

Same is true if a single SVG element appears in the document.  (Probably also true for any other Gecko-rendered namespace, like XUL)

Reproducible: Always

Steps to Reproduce:
Look at this document:
<myxml xmlns="http://www.example.com">
 <test>Insert many many more elements here</test>
 <content><p xmlns="http://www.w3.org/1999/xhtml">A paragraph</p></content>
 <test>Insert many many more elements here</test>
</myxml>

Actual Results:  
Instead of showing the XML tree, the document is printed as if a CSS stylesheet is applied.

Expected Results:  
Since the root namespace is not normally rendered by Gecko, the XHTML namespace only appears rarely in the document, and there are no xml-stylesheet processing instructions, a prettyprint tree should be shown.

This makes debugging and testing a little difficult for a developer.  One case would be debugging a server-generated Atom feed that contains XHTML in its <summary> elements.

This might be confusing to random surfers who stumble across said Atom feed and see what looks like a garbled web page.

This may be by design, but I'm curious why.
*** Bug 343474 has been marked as a duplicate of this bug. ***

Updated

11 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 314487
You need to log in before you can comment on or make changes to this bug.