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

Re: XML -> HTML beautifier...

Subject: Re: XML -> HTML beautifier...
From: Mike Brown <mike@xxxxxxxx>
Date: Tue, 23 Oct 2001 15:07:11 -0600 (MDT)
html beautifier
Oleg Tkachenko wrote:
> Dr. Kaos wrote:
> 
> > I was just wondering if there is XSLT (or any tool) that would transform
> > an XML file to an HTML file that following features:
> > 
> > (1) color coded
> > (2) indented
> > (3) long lines wrapped
> > 
> > More like IE or Mozilla view of an XML file.
> 
> Why not use the same default stylesheet IE apply to xml files?
> See xslt version in faq: 
> http://www.dpawson.co.uk/xsl/sect2/microsoft.html#d156e206

The problem with this is that it is an HTML (DHTML+CSS) result of an XSLT
transformation, which means the XML has been parsed first, and thus you do
not see the document's original representation. So if you want to see the
XML declaration, character and entity references, the DTD, and whitespace
that has not been collapsed into a word separator (a single space,
typically), then you're out of luck.

To get a pretty HTML representation of the original, unparsed XML, you'll
need to use a tool that treats it as raw text. This would be a fun
exercise for a language like Perl or Python, an ordeal in Java, and
impossible in XSLT without an extension function to read a file without
parsing it. I personally don't know of any such utilities, but I haven't 
looked too hard either.

   - Mike
____________________________________________________________________________
  mike j. brown, fourthought.com  |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  personal: http://hyperreal.org/~mike/

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


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.