This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: String parsing in XSLT/XPath?


If all you want to do is to preserve the formatting of the address lines
the html <pre> tag may give you what you want, for example

<xsl:template match="ADDRESS">
<pre><xsl:value-of select="."/></pre>
</xsl:template>


Dan

-----Original Message-----
From: Ying Qin [mailto:yqin@portal.com]
Sent: Friday, September 07, 2001 9:33 PM
To: 'xsl-list@lists.mulberrytech.com'
Subject: [xsl] String parsing in XSLT/XPath?


Hi, gurus,

Could anyone please shed some light on the problem I've been struggling
for
a while?

I need to transform an XML doc to an HTML doc.  There is one element
that
contains multiple lines and will need to be shown in the HTML doc as
multiple lines as well.  Bascially I will need to put <BR/> to the end
of
each line of that element.

Here is the piece of XML
----------------------------
...
<ADDRESS>address line1
address line2
address line3</ADDRESS>
...
----------------------------

And I expect the HTML piece to be,
--------------------------------------
address line1<BR/>
address line2<BR/>
address line3<BR/>
--------------------------------------

Any idea?
Thanks,
Ying.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]