[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Best way to handle multiple string replacements?

Subject: Re: Best way to handle multiple string replacements?
From: Warren Hedley <w.hedley@xxxxxxxxxxxxxx>
Date: Wed, 07 Jun 2000 10:37:59 -0400
warren hedley
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.