[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: UBB Code and XSLT

Subject: Re: UBB Code and XSLT
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Sun, 11 Jan 2004 22:46:26 +0100
ubb codes
Karl J. Stubsjoen wrote:

J.Pietschmann:
What does this mean:
Again, that's not too difficult with an S&R template.

You can try plain string substitution [b] -> <b> [/b] -> </b> [u] -> <u> and so on, using for example code from the XSL FAQ (as usual): http://www.dpawson.co.uk/xsl/sect2/replace.html#d6768e37 You'll have to hack the code in order to disable output escaping, otherwise you'd get &lt;b&gt; instead of <b> and so on. This pretty much requires the transformation result serialized immediately, but you certainly know this. You can try to fold substitution of the UBB codes into one template using a lookup, rather than running the template for every UBB code you want to handle.

Codes like [img=http://foo/bar] need some more attention but can
be handled with a simple extension of the FAQ answer code.

If you can't use d-o-e, things become complicated. Furthermore, if
the UBB source is, well, malformed, the resulting HTML will be
malformed too. And don't think your users will pay attention, visit
an arbitrary forum and you'll find bad stuff in the first not-too-short
thread you'll visit.

J.Pietschmann


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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.