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

Generic template for collapsing arbitrary length runs

Subject: Generic template for collapsing arbitrary length runs of same tag into one tag?
From: Richard Bondi <rbondi@xxxxxxxxxx>
Date: Thu, 15 Aug 2002 12:59:35 -0400
characters of pombe
[This is hopefully a clearer re-post of a post that was understood differently be different people.]

Dear All,

Consider the following example xml:

<root>
<Paragraph>While <Characters>S. cerevisiae</Characters> is the most commonly studied yeast, it is not the only yeast that has been studied. Two
<i>o</i><i>t</i><i>h</i><i>e</i><i>r</i>
yeasts have also been studied to an
<i>e</i><i>x</i><i>t</i><i>e</i><i>n</i><i>s</i><i>i</i><i>v</i><i>e</i>
degree. First, studies of <Characters>Schizosaccharomyces pombe</Characters> have made extremely important contributions to our understanding of the eukaryotic cell cycle.
</Paragraph>
</root>


This needs to be transformed to:

<root>
<Paragraph>While <Characters>S. cerevisiae</Characters> is the most commonly studied yeast, it is not the only yeast that has been studied. Two
<i>other</i>
yeasts have also been studied to an
<i>extensive</i>
degree. First, studies of <Characters>Schizosaccharomyces pombe</Characters> have made extremely important contributions to our understanding of the eukaryotic cell cycle.
</Paragraph>
</root>


This is an extract. Throughout the manuscript, there are runs of unpredictable length of always adjacent <i> tags. I cannot come up with a template which will collapse any such arbitrary-length run of adjacent <i>s into a single <i> tag. Can anyone here?

MTIA,
Richard Bondi


Keywords for archive search engine: merge tags, merging tags, collapse tags


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.