Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: How do I add a new line in a XML file rendered using xsl file

From: "Kevin Spencer" <unclechutney@--------.--->
To: NULL
Date: 1/4/2007 7:02:00 AM

Use an ENTITY reference. Here are a few I've used:

<!DOCTYPE xsl:stylesheet  [
 <!ENTITY less-than  "<xsl:text 
disable-output-escaping='yes'>&lt;</xsl:text>">
 <!ENTITY greater-than "<xsl:text 
disable-output-escaping='yes'>&gt;</xsl:text>">
 <!ENTITY line-break  "<xsl:text 
disable-output-escaping='yes'>&lt;br/&gt;</xsl:text>">
 <!ENTITY space-marker "<xsl:text 
disable-output-escaping='yes'>&amp;nbsp;</xsl:text>">
 <!ENTITY break   "<xsl:text 
disable-output-escaping='yes'>&#013;</xsl:text>">
]>

-- 
HTH,

Kevin Spencer
Microsoft MVP
Bit Player
http://unclechutney.blogspot.com

Where there's a Will, there's a William.

<glenpeterthompson@h...> wrote in message 
news:1167904637.638790.151260@i......
> This is my xml file:
> <root>
>  <node>
>    <text>Line 1
> Line 2
> Line 3
>    </text>
>  </node>
>  <node>
>    <text>Line 1
> Line 2
>    </text>
>  </node>
> </root>
>
> This is the output I want:
> Line 1
> Line 2
> Line 3
>
> Line 1
> Line 2
>
> How do I construct my xsl so that it produces a new lines because html
> ignores white space? When using <xsl:value-of
> select="/root/node/text"/>
> I have tried using <br /> in my xml however this does not parse. I have
> tried uising &lt; and &gt; also &#10; and &#13; I have tried using a
> dummy character such as '{n}' in the xml and used the translate xpath
> function to replace the '{n}' with '<br />' however get the dreaded '<'
> is an invalid character error.
> 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent