Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help - XML new line

Status
Not open for further replies.

anyideas

Programmer
May 2, 2002
127
GB
Hello All.

I'm tring to include a tag in an XML document to start a new line when it gets rendered in XSL.

strDocSentXML = &quot;<Notes>a, &quot; & vbcrlf & &quot; b</Notes>&quot;

output should be:
a,
b

I've tried using the following and listed the results:

vbcrlf, cr, lf, chr(13) - does nothing: a, b
<br>: a,<br>b

Has anyone got any ideas - I've hit a brick wall!!

Mark

 
<xsl:text> will preserve characters.

so
<xsl:text>a,
b</xsl:text>

 
cheers Mr Tom

strDocSentXML is actually a value taken from a textarea on a html page which.

Occasionally the textarea is more than 1 line.. therefore at the end of each line vbcrlf is included.

This is saved to a database table, then retreived as an xml element <Notes>:

strXML = <Event>

strXML = strXML &&quot;<DocDesc>&quot; & rsDocSent(&quot;DocumentTypeDescription&quot;).Value) & &quot;</DocDesc>&quot;

strXML = strXML & &quot;<Notes>&quot; & rsDocSent(&quot;DocumentHistoryNotes&quot;).Value) & &quot;</Notes>&quot;

strXML = strXML & </Event>

In the XSL file I'm using:

<xsl:stylesheet xmlns:xsl=&quot; language=&quot;VBScript&quot;>

<xsl:template match=&quot;/&quot;><xsl:apply-templates select=&quot;*&quot;/></xsl:template>

<xsl:template match=&quot;Event&quot;>

<xsl:value-of select=&quot;DocDesc&quot;/>
<xsl:value-of select=&quot;Notes&quot;/>

</xsl:template>
</xsl:stylesheet>

In the I.E. browser Notes gets displayed as:

a, b

not

a,
b

any ideas?

Thanks so far

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top