Subject: RE: [xsl] Re: Using XSLT to add markup to a document From: "McNally, David" <David.McNally@xxxxxxxxxx> Date: Mon, 7 Jul 2003 14:59:04 -0400 |
Dimitre, The only reason I posted this code was because it is something I use, I like it, and I wondered if the apparent lack of recursion had any benefits (the answer is no). I don't think there's any doubt that FXSL, and Jeni's markup utility, are both vastly more general and powerful ways of approaching the problem, and I certainly wasn't suggesting that. However... > While this is a nice solution, it will not produce good > results in the case when one of the search strings is the > start of another of the search strings. I don't think this is true - it just requires intelligent ordering of the xsl:when statements. You'd want the check for the longer string to appear first. Unless I don't understand how xsl:choose works. > Also, all possible search strings are hard-coded in the code > within an xsl:choose. Yes. Not very general, but adequate for everything that I need to do. > This is not going to help in the case when we need to call > this template, passing it a parameter containing an unknown > number of search strings. Yes. I guess you could have a different stylesheet that generated the code of the choose for you. > > Even if you try to use the xsl:choose approach with a > moderate number of predefined strings (e.g. 5 - 10), the code > will increase quadratically to the number of search strings. I don't understand this. For each string you are interested in, there is one xsl:when statement. Why is that quadratic? Thanks, David. --------------------------------------- The information contained in this e-mail message, and any attachment thereto, is confidential and may not be disclosed without our express permission. If you are not the intended recipient or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution or copying of this message, or any attachment thereto, in whole or in part, is strictly prohibited. If you have received this message in error, please immediately notify us by telephone, fax or e-mail and delete the message and all of its attachments. Thank you. Every effort is made to keep our network free from viruses. You should, however, review this e-mail message, as well as any attachment thereto, for viruses. We take no responsibility and have no liability for any computer virus which may be transferred via this e-mail message. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Re: Using XSLT to add mar, Dimitre Novatchev | Thread | [xsl] Re: Re: Using XSLT to add mar, Dimitre Novatchev |
AW: [xsl] interesting? problem, Markus Abt | Date | RE: Is XML a Language? (was RE: [xs, Mulberry Technologie |
Month |