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

RE: code review

Subject: RE: code review
From: "Jim Fuller" <jim.fuller@xxxxxxxxxxxxxx>
Date: Fri, 20 Feb 2004 20:56:58 -0000
code review
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Theresa Devine
> Sent: 20 February 2004 19:48
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  code review

> I was wondering if ya'll might review my xslt and see if 
> there is a more efficient way of doing this transformation. 
> The part I have questions about is the search and replace.... 

You can also use the generic xslt template at EXSLT for str:replace
found at
http://www.exslt.org/str/functions/replace/index.html or perhaps its
preceding ancestor at Jeni Tennison's page on
http://www.jenitennison.com/xslt/utilities/markup.html

w/o knowing if you have control over your xml data structure ( or seeing
it ) I cant really suggest much...

With your 3rd call-template you might have better joy using a matching
template on text() that does the global replace of ampersands and
special characters using translate() function...though u might also just
use some external process like HTML Tidy to achieve this type of
cleanup.

Your desire to replace text data ( ex. #accred# ) might be better served
by simply using an element as replacement; this is interesting approach
and something that the following article shows though in the context of
character representation

http://www.xml.com/pub/a/2003/01/02/xmlchar.html

Basically u want to have a token in your markup, why not use xml as the
token instead of locking it up in some text format...though maybe u want
to also have some other non xml find and process such tokens...not sure.


gl, Jim Fuller


 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.