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

RE: Replacing specific acronyms in output

Subject: RE: Replacing specific acronyms in output
From: Jarno.Elovirta@xxxxxxxxx
Date: Fri, 13 Feb 2004 10:42:10 +0200
html replace trademark
Hi,

> I also have an XML list of acronyms used throughout my journal,
> formatted thus:
> <acronyms>
>   <acronym acronym="CSS">Cascading Style Sheet</acronym> 
>   <acronym acronym="CGI">Common Gateway Interface (web scripting
> facility) or Computer-Generated Imagery (movie industry)</acronym>
>   ...
> </acronyms>
> 
> I wish to be able to automatically replace any occurrence of 
> an acronym
> in the XHTML output with the appropriate XHTML <acronym 
> title="Cascading
> Style Sheet">CSS</acronym> tag.

This is normal search and replace, see the FAQ <http://www.dpawson.co.uk/xsl/sect2/replace.html>. It would make your life easier, though, if you marked up the arconyms in your source with the XHTML element "acronym" without the title and then just add the "title" attribute.

> I have thought about it and I can't think of any way to do this that
> wouldn't involve parsing my journal and on every single word of my
> journal, parsing every single acronym in my acronyms list - thus for
> every word in my journal my entire acronym list would be parsed -
> something I assume would be highly inefficient.

Depends how many times a second the transformation needs to be done, it might be ineffient, but in that case you might want to think about caching the transformation results.

Cheers,

Jarno - Imminent Starvation: Tentack One

 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.