Hello,
I've a journal, which stores its data in an XML file. I use XSLT to dynamically
transform this into various output formats - XHTML in this case, based on
various criteria such as the date to display and so on. The XSLT used to do this
transformation is available here http://nedmartin.org/journal/xsl/ , although it
is probably not very relevant to my question. 'day.xsl' shows single days;
'full.xsl' shows full years and so forth. 'journal-imports.xsl' does the actual
transformation.
I also have an XML list of acronyms used throughout my journal, formatted thus:
Cascading Style Sheet
Common Gateway Interface (web scripting facility) or Computer-Generated Imagery (movie industry)
...
I wish to be able to automatically replace any occurrence of an acronym in the
XHTML output with the appropriate XHTML CSS tag.
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.
In case it matters, my journal is in the format:
blah blah
...
...
...
or view the schema: http://nedmartin.org/journal/xsl/journal.xsd
There has to be a good way to do this?
Help much appreciated,
Ned
Printed on 100% recycled electrons.
http://nedmartin.org
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list