Re: Text based stage play scripts to XML
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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format