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

Re: Rephrasing the problem [was Re: Second try: Search

Subject: Re: Rephrasing the problem [was Re: Second try: Search and replace many strings that may not be present in target
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 21 May 2002 19:04:47 -0400
rephrasing
At 03:19 PM 5/20/2002, Greg wrote:
I figured it out just after sending... I was calling substring-before() and substring-after(), both of which convert a node to a string. An alternate (and more successful) way of doing what you want is to use d-o-e and CDATA sections, though it makes many XSLT'ers blood boil. Remember that d-o-e is not a mandatory option for an XSLT engine.

It's not that it makes our blood boil (why should you care about the state of my cardiovascular system? :-) or even that it's not universally supported ... it's that it locks the application into one processing model, namely one in which the output is written to a file. If you ever use XSLT another way -- maybe pipelining transforms or browsing client-side in Mozilla -- it'll break.


Personally I find d-o-e far less troublesome when I can be assured that writing to a file will Always Always happen. But that's a big thing to assume, especially when helping a friendly stranger who may not yet have become perfectly familiar with all the ins-and-outs of XSLT minutiae, and why one needs to ask such obscure questions about the operational scenario.

I agree with Stuart that this is only an XSLTish problem at a stretch. Partly because it's designed to be side-effect-free and not depend on a particular processing order, XSLT has trouble with such notions as "the first time a string occurs in the document, in any <p> element". It can be done but it involves some pretty creative twisting-and-turning. As Greg is kindly showing. :->

Regards,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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.