W3C home > Mailing lists > Public > www-xsl-fo@w3.org > June 2001

Re: replacing cdata in nodes q.

From: Dave Pawson <daveP@dpawson.freeserve.co.uk>
Date: Sat, 02 Jun 2001 05:42:37 +0100
Message-Id: <5.1.0.14.2.20010602054141.00ae44e0@127.0.0.1>
To: "W3 Xsl List (E-mail)" <www-xsl-fo@w3.org>
At 10:35 AM 6/1/01, Kerin Cosford wrote:
>Well, sort of.
> 
>I'm writing a XSL sheet to process a large volume of XML files into HTML. Every XML file has a node ("Summary") which contains a large block of text. Within that text, there are various reference numbers (these are scientific documents) in the format [1234567]. What I need to do is have each occurance of the ref. number wrapped in a <a href="1234567"></a> in the resulting HTML. Unfortunately I can't search for a certain string of digits, as the reference numbers are not always 7 characters long - so what I need to do is have a template which looks for the square brackets, and returns what is held inside them to the result tree like so: [<a href="1234567">1234567</a>].
> 
>I am, unfortunately, clueless as to how I would go about searching through a large body of text in XSL. Can anybody point me in the right direction?
> 
>{FYI - we are aware that this is a very clunky thing to be doing. New data added to the database will have these references marked up as <ref/>, and we are looking into converting the legacy data to this format.

It can be done, but since its a one off task, how about using Omnimark
or perl to do it? Perhaps a more suitable tool?

Regards DaveP
Received on Saturday, 2 June 2001 00:42:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:08 GMT