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

Subject: Re: [xsl] Search and Replace Help [now slightly OT]
From: cknell@xxxxxxxxxx
Date: Sun, 20 May 2007 16:31:18 -0400
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@xxxxxxxxxx - email



-----Original Message-----
From:     Matthew Ebbertt <mje004@xxxxxxxx>
Sent:     Sun, 20 May 2007 12:51:26 -0400
To:       <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxx" <cknell@xxxxxxxxxx> 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.

Current Thread