[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: "Paulo Gaspar" <paulo.gaspar@xxxxxxxxxxxx>
Date: Wed, 7 Jun 2000 14:54:15 +0200
perl multiple string replacements
My choice would still be to make those replacements with something
else.

When all you have is an hammer everything looks like a nail. But are
you sure you HAVE to do that in with XSLT???

I am sure I could implement something faster in C, Pascal, Perl,
Basic, Java... ok, I wouldn't go into assembler, but maybe even that
would be easier to code and maintain than those strange things you
are coding!


Anyway, it was a great mind exercise and I loved it.
(Yes... I also made some exercise trying to understanding it all...)


Have fun,

Paulo
(paulo.gaspar@xxxxxxxxxxxx)


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Sebastian Rahtz
> Sent: Tuesday, June 06, 2000 22:06
> To: Jeni.Tennison@xxxxxxxxxxxxxxxx
> Cc: xsl-list@xxxxxxxxxxxxxxxx
> Subject: Re: Best way to handle multiple string replacements?
>
>
> Jeni Tennison writes:
>  > My first objection was that I thought it would be relatively
> inefficient if
>  > you have a long piece of text and not very many substitutions
> to be made
>  > within it.  I could well be wrong on that (I'm no computer
> scientist) - out
>  > of interest, did you compare the performance of the two stylesheets?
>
> No, I am afraid I did not. I quite take the point, though. I was more
> concerned with (my notion of!) elegance, than performance.
>
> Lets face it, all these approaches are messy, like dogs walking on hind
> legs. This isn't what XSL is good at...
>
>  > 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).
>
> I can imagine using "starts-with()" on each fresh chunk of text, but I
> have not though that through
>
>  > True, although the order of events would also be crucial (and implicit)
>  > within your method in the case where more than one character was being
>  > replaced.
>
> I think I was describing a solution to a traditional transcoding
> problem, which was what Warren *seemed* to have; you described a
> solution to a fairly spare replacment, which may well be what he does
> have.
>
>  > I would be interested to see the results of
>  > the performance comparison, if you do it.
>
> Sorry, I have to write an article for my daughters primary school
> newsletter
> tonight, about the family links programme. amazingly, it uses no XSL
> at all
>
> Sebastian
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 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.