Subject: Re: Best way to handle multiple string replacements? From: "Sebastian Rahtz" <sebastian.rahtz@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 6 Jun 2000 21:06:05 +0100 (BST) |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Best way to handle multiple str, Jeni Tennison | Thread | RE: Best way to handle multiple str, Paulo Gaspar |
Re: Javascript invokation in XSL, Samir Narendra Sarda | Date | Re: Keys across multilple input fil, Ann Marie Rubin - Su |
Month |