Re: replacing cdata in nodes q.

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 UTC