Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - How do I add a new line in a XML file rendered using xsl file [Thread Next] Re: How do I add a new line in a XML file rendered using xsl fileTo: 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'><</xsl:text>">
<!ENTITY greater-than "<xsl:text
disable-output-escaping='yes'>></xsl:text>">
<!ENTITY line-break "<xsl:text
disable-output-escaping='yes'><br/></xsl:text>">
<!ENTITY space-marker "<xsl:text
disable-output-escaping='yes'>&nbsp;</xsl:text>">
<!ENTITY break "<xsl:text
disable-output-escaping='yes'>
</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 < and > also and 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.
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
