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

RE: Generating beautiful HTML Source Code

Subject: RE: Generating beautiful HTML Source Code
From: "Martinez, Brian" <brian.martinez@xxxxxxxxxxx>
Date: Wed, 15 Oct 2003 11:15:26 -0600
beautiful html
> From: Karl J. Stubsjoen [mailto:karl@xxxxxxxxxxxxx]
> Sent: Wednesday, October 15, 2003 8:56 AM
> Subject:  Generating beautiful HTML Source Code
> 
> 
> Hello,
> 
> I'd be interested in any reference (websites - faq...) you 
> might be able to
> point me to regarding Whitespace.  Call me anal, but I'm very 
> interested in
> generating very attractive HTML source code results, you know 
> - line breaks,
> tabs, comments, etc...

Generating pretty-printed HTML can be difficult, if not impossible, with
most processors.  You can try using the following output element:

<xsl:output method="html" indent="yes"/>

but implementations are not required to honor the indent attribute, and
there's no definition of that output in the spec.  The best method would be
to run the HTML output through Tidy or another pretty-print utility after
transformation.

If you want comments to show up in your *output*, you need to use
<xsl:comment/>, which will cause the contents of the element to appear in
the result document within HTML comment tags (<!-- -->).  Since these also
represent comment nodes in XML, using them directly in your stylesheet
causes the processor to strip them out during compilation.

hth,
b.

| brian martinez                           brian.martinez@xxxxxxxxxxx |
| lead gui programmer                                    303.357.3548 |
| cheap tickets, part of trip network                fax 303.357.3380 |
| 6560 greenwood plaza blvd., suite 400           englewood, co 80111 |
| cendant travel distribution services   http://www.cheaptickets.com/ |

 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.