[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]
Hi,
Just an idea, I do not know if that helps, but... you can translate the [] in <> and after this you should have well formed XML and process it as you like with another stylesheet: <text> <value>Text may contain <b>bold text</b>, <i>italics</i> or both <b><i>bold and italics</i></b>.</value> </text> <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:template match="/"> <xsl:text><processedValue></xsl:text> <xsl:value-of select="translate(text/value, '[]', '<>')"/> <xsl:text></processedValue></xsl:text> </xsl:template> </xsl:stylesheet> <processedValue>Text may contain <b>bold text</b>, <i>italics</i> or both <b><i>bold and italics</i></b>.</processedValue>
Daniel Joshua wrote: I was reading through this, gave me some ideas.>> [...]
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|