Related
s
DOM
HTML
HTML5
MSXML
NAMESPACES
NOT SGML
SAX
SCHEMA
SGML
SVG
TEX
UNICODE
XML CHINESE
XML CONDENSED
XML DUTCH
XSL
B.4 Where can I get an XML browser?
Current state of existing browser support for XML (1 January 2006):
Microsoft Internet Explorer
5.0 and 5.5 handled XML, processing it by default using a
built-in stylesheet written in a Microsoft-specific,
obsolete predecessor of XSLT called XSL (not to be
confused with the real XSLT). The output of the
stylesheet is DHTML, which, when rendered in the
browser, shows a coloured, syntax-highlighted version of
the XML document, with collapsible views. If the XML
document references a stylesheet, that stylesheet will
be used instead, within the limitations of MSIE's
incomplete implementation of CSS. MSIE 5.0 and 5.5 can
also use stylesheets in another obsolete syntax called
WD-xsl, which should be avoided. These versions can be
upgraded to support real XSLT: see the MSXML
FAQ
.
MSIE 6.0 and later use real XSLT 1.0, but can use both the obsolete syntaxes as well.
Mozilla Firefox 0.9 up, Netscape 6 and 7 (there is no Netscape 5), and Galeon all have full XML support with XSLT and CSS. In general, Firefox is more robust than MSIE, and provides better standards adherence.
I have a user report that Netscape 4.6 and 4.8 supports XML, but no independent verification.
The authors of the former MultiDoc Pro SGML browser, CITEC (whose engine was also used in Panorama and other browsers), joined forces with Mozilla to produce a multi-everything browser called DocZilla, which reads HTML, XML, and SGML, with XSLT and CSS stylesheets. This runs under Windows and Linux and is currently at release 1.0. See http://www.doczilla.com for details. This is by far the most ambitious browser project, and is backed by very solid markup-handling expertise.
Contrary to earlier reports, Opera does not appear to support XML. The browser size is tiny by comparison with the others, but HTML/CSS features are good and the speed is excellent, although the earlier slavish insistence on mimicking everything old (pre-Mozilla) Netscape did, especially the bugs, still shows through in places.
Don't use Netscape 4.* or Internet Explorer 4.* or earlier, or early versions of Mozilla if you want XML support: they don't have it (unless the report above on Netscape 4.6/8 is correct). Upgrade to Firefox as soon as possible.
I have less information on the XML capabilities of the new (OS/X) Mac browser (Safari), which is based on the KHTML engine used in Konqueror. Konqueror itself does not appear to support XML or XSLT (at least in KDE under Fedora Core 4, for example), but Safari 1.3.2 (v312.6) under OS 10.3 does provide partial support for XML, but does not honour an external DTD modified by an internal subset (thanks to John Haynie for testing this).
The concept of ‘browsing’ is primarily
the result of HTML having the semantics that it does. In
an HTML document there are sections of text called anchors
that are ‘hyperlinked’ to other documents
that might be at remote locations on a network or
filesystem. HTML documents provide cues to a web browser
regarding how the document should be displayed and what
kind of behaviors are expected of the browser when the
user interacts with it. The HTML specification provides
many suggestions and requirements for the browser, and
provides specific meanings for many different examples of
markup, such as the fact that an
<img> element
refers to an image that should be retrieved by the browser
and rendered inline with the adjacent text.
Unlike HTML, XML does not have such inherent semantics at all. There is no prescribed method for rendering XML documents. Therefore, what it means to ‘browse’ XML is open to interpretation. For example, an XML document describing the characteristics of a machine part does not carry any information about how that information should be presented to a user. An application is free to use the data to produce an image of the part, generate a formatted text listing of the information, display the XML document's markup with a pretty color scheme, or restructure the data into a format for storage in a database, transmission over a network, or input to another program.
However, despite the fact that XML documents are purely descriptive data files, it is possible to ‘browse’ them in a sense, by rendering them with stylesheets. A stylesheet is a separate document that provides hints and algorithms for rendering or transforming the data in the XML document. HTML users may be familiar with Cascading Style Sheets (CSS). The CSS stylesheet language is general and powerful enough to be applied to XML documents, although it is oriented toward visual rendering of the document and does not allow for complex processing of the document's data. By associating an XML document with a CSS stylesheet, it may be possible to load an XML document in a CSS-aware web browser, and the browser may be able to provide some kind of rendering of it, even if the browser does not otherwise know how to read and process XML documents. However, not all web browsers will load an XML document correctly, and they are not required to recognize the XML markup that associates the document with a stylesheet, so one cannot assume that XML documents can be opened with just any web browser.
A more complex and powerful question C.24, stylesheet language is XSLT, the Transformations part of the Extensible Stylesheet Language, which can be used to transform XML to other formats, including HTML, other forms of XML, and plain text. If the output of this transformation is HTML, it can be viewed in a web browser as any other HTML document would.
The degree of support for XML and stylesheets in web browsers varies greatly. Although loading and rendering XML in the browser is possible in some cases, it is not universally supported. Therefore, much XML content on the web is translated to HTML on the servers. It is this generated HTML that is delivered to the browsers. Most of Microsoft's web site, for example, exists as XML that is converted to HTML on the fly. The web browser never knows the difference.
See also the notes on software for authors and XML for developers, and the more detailed list on the XML pages in the SGML Web site at http://xml.coverpages.org/.