Project

Profile

Help

Problem with Saxon breaking up lines in html

Added by Anonymous about 20 years ago

Legacy ID: #2780220 Legacy Poster: Gregory Pierce (gregorypierce)

When trying to transform the following, Saxon is breaking up the lines at a certain number of characters. If you transform the following document you will find that the assignment for javascript variable x gets broken up. Same goes for the generic 'counter string' under the xsl:template match. This goes away when the output method isn't set to html, but it shouldn't be a problem in output method html. <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html" encoding="iso-8859-1" /> <xsl:template match="/"> "123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789" <xsl:text disable-output-escaping="yes"><![CDATA[ <script type="text/javascript" language="JavaScript1.2"> x = "123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789" </script> ]]></xsl:text> </xsl:template> </xsl:stylesheet>


Replies (1)

RE: Problem with Saxon breaking up lines in h - Added by Anonymous about 20 years ago

Legacy ID: #2780251 Legacy Poster: Michael Kay (mhkay)

Which version of Saxon are you using? This breaking of lines shouldn't happen in a script section, but you have disguised your script section by writing the <script> tags using disable-output-escaping rather than writing it as a proper element node in the result tree. Why are you doing this? If necessary, you can specify indent="no" in xsl:output to suppress this behaviour. Michael Kay http://www.saxonica.com/

    (1-1/1)

    Please register to reply