xsl-list
[Top] [All Lists]

Re: [xsl] Text based stage play scripts to XML

2011-01-24 05:28:49
I am not trying to get someone to write my solution for me. I simply
gave a full account of my problem in the hope that an expert may give
me proper guidance. It's better to describe a complete problem to an
expert, than to try and guess a solution and ask an expert to guide
you further down the (possibly wrong) track. The solution you are
describing is similar to
http://www.dpawson.co.uk/xsl/rev2/regex2.html#d15957e181 given by Dave
and Michael. My problem is more complex than that.

In short:
I need to identify strings of text (probably using regular
expressions) and wrap them as XML elements. However, the problem is
sufficiently complex that I may need to find text based on text- and
structural patterns before and after the text. I then need to
encapsulate this text with tags.

Example pattern and replacement:
<pattern-before>XXYY</pattern-before>
<pattern-after>---</pattern-after>
<wrap-with>cool</pattern>

So in this sample text:
bla bla bla bla XXYY this is the stuff ---

??After using whatever XSLT solution.??

Result will be:
bla bla bla bla XXYY <cool> this is the stuff </cool> ---

I can't find the solution to this in a manual or online.

Regards,
Jacobus

--~------------------------------------------------------------------
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>
--~--