[prev in list] [next in list] [prev in thread] [next in thread]
List: xsl-list
Subject: [xsl] Re:[xsl] disappearing line breaks within an element
From: "cavecatem () directbox ! com" <cavecatem () directbox ! com>
Date: 2009-01-27 15:59:50
Message-ID: 0CC807D9011B0F3B26ED () directbox ! com
[Download RAW message or body]
Hi Michael,
thanks for your suggestions.
I had to do some checking up, as I couldn't reproduce your results with my xslt.
Today I ran some tests with a simple file and a new XSL stylesheet. And things turn \
out to be even more confusing that I though: This is my input file:
<?xml version="1.0" encoding="UTF-8"?>
<test>a
b
C
D</test>
With this stylesheet
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output name="inhalt" method="xml" omit-xml-declaration="yes" />
<xsl:preserve-space elements="*"/>
<xsl:template match="test">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>
I get
<?xml version="1.0" encoding="UTF-8"?>
<test>a
b
C
D</test>
If the template is
<xsl:template match="test">
<html>
<xsl:copy-of select="."/>
</html>
</xsl:template>
the result is this:
<html>
<test>abCD</test>
</html>
As I'm using Oxygen, I checked if the results were the same if I called saxxon from \
the command line, and they are.
I do hope the #xd codes are not converted into line breaks when I send this mail. So, \
probably to prevent problems with browsers, the line-break codes are eliminated \
whenever I output to a descendent of an html-element.
Regards
CJ
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@lists.mulberrytech.com>
--~--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic