[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Best way to handle multiple string replacements?
Wow, you guys are taking this a lot further than I'd originally considered. As Paulo Gaspar pointed out, XSLT is probably not the ideal tool for this kind of processing anyway, and David Carlisle may yet remove the need to transcode the ``high'' characters anyway - I'm not quite there yet. Jeni Tennison wrote: > > My second objection was that it would get a bit more complicated when you > had substitutions of things that were of arbitrary length (i.e. strings > rather than single characters). That wasn't a problem in Warren's example, > but I was aiming for reusability. A look-ahead mechanism could probably > get around that? Actually, this is becoming a problem with another stylesheet I've been playing with for the last few months - one that pretty-prints DTDs in HTML (where the DTDs are embedded in an XML document, and all <'s are escaped, so that you just get text nodes and comments.) I'm currently processing the text nodes almost character by character and using starts-with() to look ahead occasionally to see what sort of objects I've reached. I'm currently leaning towards this approach for the latex processing too, because of the ordering problems that Sebastain mentioned. I mainly use Saxon, so if Mike says that it uses tail recursion, then the ridiculous levels of recursion that this approach frequently involves should hopefully not be a serious problem. Thank you both for your input. -- Warren Hedley XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|