[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Replacing specific acronyms in output
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|