[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] Conditional indentation?
Subject: [xsl] Conditional indentation? From: Ned Batchelder <nedbatchelder@xxxxxxxxx> Date: Sun, 7 Apr 2002 15:02:17 -0700 (PDT) |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] using parameter in xsl cr, Diego Padilla Brito | Thread | Re: [xsl] Conditional indentation?, Christopher R. Maden |
[xsl] Counting proceding elements w, Niklas Gustavsson | Date | [xsl] Removing namespaces from sour, Stephen Ng |
Month |