|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] First occurrence of glossary term in whole document
Hi, I've done well. I've now created the recursive template that replaces glossary terms throughout the <p> tags with cross-references. That is fine... but... I only want to process the first occurrence of each glossary term in the document and at the moment, because the XSLT is declarative, I can't keep track of whether a particular term has been used. My XSL goes like this: root template launch named template with parameter containing whole document named template (recurses document and glossary list) stop condition: when glossary list is empty/exhausted return whole document otherwise process first item in glossary list and update document (apply templates) remove first item from glossary list and pass back list and updated document to (this) named template template to process p/text() for glossary term template identity transform for rest of document nodes and attributes Is that enough for you to go on or should I post xsl? I suspect that I require a rewrite with this requirement deciding the fundamental structure of the XSL but can't think how to get started. Thanks again, Richard
|
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
|






