xsl-list
[Top] [All Lists]

Re: [xsl] Search and Replace Help [now slightly OT]

2007-05-20 13:31:35
If your JavaScript procedure runs in the "onload" event, you could write it to 
load all the text in the <body> element and have the JavaScript regex functions 
remove the <![CDATA[]]> tags, then re-display the result.

I haven't tried it, but I think it would work.
-- 
Charles Knell
cknell(_at_)onebox(_dot_)com - email



-----Original Message-----
From:     Matthew Ebbertt <mje004(_at_)uncp(_dot_)edu>
Sent:     Sun, 20 May 2007 12:51:26 -0400
To:       <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject:  Re: [xsl] Search and Replace Help

I may just leave it as is.  I'm trying to make it as simple as possible so
other people can use it pretty easily.

I've got a JavaScript that will do the conversion for [quote=] [/quote] to
the proper tags, but with that <![CDATA[]]> restriction, it won't do much
good, correct?

Is there a way to somehow ignore the <![CDATA[]]> element so that the web
browser will parse the HTML tags within there?  If so, I may be able to use
the JavaScript to get it done then, correct?


On 5/20/07 11:41 AM, "cknell(_at_)onebox(_dot_)com" 
<cknell(_at_)onebox(_dot_)com> wrote:

When you say that you are relying on the XSLT processors supplied as part of
the web browser, then you will either have to:

1) Write a least-common-denominator stylesheet. That is to say one that relies
only on features common to all processors. That is most likely an XSLT 1.0
processor with no extension functions.

2) Write a different stylesheet for each browser, using the features available
for each browser's XSLT engine.

XSLT 1.0's string handling features are fairly basic. That's why I suggested
XSLT 2.0 and the regex functions.

One could, of course pound the strings to death with the primitive XSLT 1.0
string handling functions in order to get what you need. After all, you could
pull your own bad tooth yourself with a pair of pliers, but I wouldn't.



--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [xsl] Search and Replace Help [now slightly OT], cknell <=