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

Re: xsl:output method="xhtml", indent, linefeeds probl

Subject: Re: xsl:output method="xhtml", indent, linefeeds problem
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Aug 2013 10:26:59 -0400
Re:  xsl:output method="xhtml"
At 2013-08-15 16:17 +0200, Raimund Kammering wrote:
An example:

XML
<root>
  ...
  <text></text>

</root>

XSL

...
  <xsl:template match="text">
    <textarea name="text" style="width: 100%" rows="14" cols="100">
        <xsl:value-of select="."/>
    </textarea>
  </xsl:template>


leads to the 'textarea' tag not being closed
properly and therefor the rest of the produced
output appears in the textarea! Adding an
artificial empty space solves this but gives in
this case a predefined space in the textarea, which is not nice!

I had this kind of "bleed" beyond the end of an empty element with coloured text that coloured the text through to the end of the page.

I forced an end tag by adding innocuous comment inside of the element.

Have you tried the following?

    <textarea name="text" style="width: 100%" rows="14" cols="100">
        <xsl:value-of select="."/>
        <xsl:comment/>
    </textarea>

Hopefully the comment will be ignored by the
browser, but the comment will force there to be an end tag.

I hope this helps.

. . . . . . . Ken

--
Public XSLT, XSL-FO, and UBL classes in the Netherlands     Oct 2013 |
Public XSLT, XSL-FO, UBL and code list classes in Australia Oct 2013 |
Contact us for world-wide XML consulting and instructor-led training |
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm |
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/s/ |
G. Ken Holman                   mailto:gkholman@xxxxxxxxxxxxxxxxxxxx |
Google+ profile: https://plus.google.com/116832879756988317389/about |
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal |

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.