Subject: RE: Text markup for web forums, eg. [b]bold text[/b]
From: "Daniel Joshua" <daniel.joshua@xxxxxxxxxxxx>
Date: Tue, 1 Jun 2004 15:03:14 +0800
|
Woah, thanks for the fast reply...
... will give it a look!
Regards,
Daniel
-----Original Message-----
From: M. David Peterson [mailto:m.david@xxxxxxxxxx]
Sent: Tuesday, 01 June, 2004 2:51 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Text markup for web forums, eg. [b]bold text[/b]
Hey Daniel,
Heres a solution I posted a while back that will solve your problem...
http://www.biglist.com/lists/xsl-list/archives/200401/msg00337.html
Hope this helps!
<M:D/>
----- Original Message -----
From: "Daniel Joshua" <daniel.joshua@xxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, June 01, 2004 12:25 AM
Subject: Text markup for web forums, eg. [b]bold text[/b]
> Hi all,
>
> I am trying to use XSL to do the common mark-up found in web forums,
> etc (I am making my own mini-forum integrated into my application).
>
>
>
> XML (input):
>
> <text>
> <value>Text may contain [b]bold text[/b], [i]italics[/i] or both
> [b][i]bold and italics[/i][/b].</value>
> </text>
>
> (X)HTML (desired output):
>
> <div class="text">Text may contain <b>bold text</b>, <i>italics</i> or
> both <b><i>bold and italics</i></b>.</div>
>
>
> XSLT (incomplete):
>
> <xsl:template match="text">
> <div class="text">
> <xsl:value-of select="value"/>
> </div>
> </xsl:template>
>
>
> I am stumped on how to continue... maybe just give me some
> ideas and I will continue from there...
>
> Also, how should I handle incomplete or wrongly nested tags
> (eg. <value>[b]blah blah [b][i]blah blah[/b][/i]</value>)
>
> Most web forums normally just do not convert "bad" tags and
> leave them for users to edit and fix them, so I guess I
> should try to do the same.
>
>
> Regards,
> Daniel
>
>
> --+------------------------------------------------------------------
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
> --+--
>
--+------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
--+--
|