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

Conditional indentation?

Subject: Conditional indentation?
From: Ned Batchelder <nedbatchelder@xxxxxxxxx>
Date: Sun, 7 Apr 2002 15:02:17 -0700 (PDT)
html indent
I'm using XSLT to produce HTML from XML for my
website.  I transform locally, then FTP the result to
the server.  When checking over the results of the
transform, I'd like to use

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

but to save space in the final result, I'd like to
use:

<xsl:output method='html' indent='no' />

I tried setting a parameter to the stylesheet and then
using:

<xsl:output method='html' indent='{$indent}' />

but the indent attribute is not an attribute value
template.  First question: why not?  Why aren't all
attributes AVTs?  It isn't hard to check for the
presence of a brace, so there's little overhead when
literal values are used (as they will be almost all
the time).

I tried creating two small stylesheets, with just
those <xsl:output> elements in them, and then
including them:

<xsl:include href='{$outputsheet}' />

But again, the href attribute is not an AVT.

Is there any way to accomplish what I want?  Am I
overlooking something simple?

--Ned.


=====
Ned Batchelder, http://www.nedbatchelder.com

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.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.