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

Re: Text markup for web forums, eg. [b]bold text[/b]

Subject: Re: Text markup for web forums, eg. [b]bold text[/b]
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 01 Jun 2004 11:49:52 -0400
Re:  Text markup for web forums
At 06:31 AM 6/1/2004, George wrote:
How about translating also <> to [] in the first pass and apply in a second pass a copy stylesheet with the output method set to xml this time that will translate the [] back to <> ?

George is being very cunning, but the bottom line here is that none of these approaches have yet proposed a good way of dealing with pseudo-markup that does not map directly to well-formed XML. And by definition, you have no intrinsic way of knowing that all the pseudo-markup you have, does map.


(The reason you can't just change markup delimiters around in XSLT is that internally, the XSLT engine sees no markup; it has all been parsed away in the tree-building process.)

Whether you work at the character level (translating back and forth between different markup delimiters) or try to implement a parser in XSLT (M. David's first approach) -- unless you have a generic solution for converting not-well-formed near-XML into true XML (and it won't be XSLT ;-), this isn't going to work outside controlled environments where you can either preclude badly-formed pseudo-markup altogether (in which case why not use real markup?), or where you can trap it and fix it when it turns up.

Cheers,
Wendell

<?xml version="1.0" encoding="UTF-8"?>
<text>
<value>Text may &lt; contain [b]bold text[/b], [i]italics[/i] or both
[b][i]bold and italics[/i][/b].</value>
</text>


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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.