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

regrouping split elements

Subject: regrouping split elements
From: James Cummings <james@xxxxxxxxxxxxxxxxx>
Date: Mon, 21 Dec 2009 17:01:14 +0000
 regrouping split elements
Hi there,

I'm trying to up-scale some bibliographic output converted with a
docxtotei stylesheet and then tidy it up somewhat.  The problem is
that the output seems to randomly break in the middle of words.  So
the current output I have is:

<div>
    <p>
        <hi rend="bold">Dibdin</hi>
        <hi rend="bold">, Thomas Jo</hi>
        <hi rend="bold">hn</hi>
    </p>
    <p>
        <hi rend="italic">The </hi>
        <hi rend="italic">widow and the w</hi>
        <hi rend="italic">ill</hi>, published as <hi
rend="italic">Four legs and two l</hi>
        <hi rend="italic">egs</hi>
        <hi rend="italic">.</hi>
    </p>
    <p>1826</p>
<!-- and many more -->
</div>

and obviously I want it more to be something like:


<div>
    <p>
        <hi rend="bold">Dibdin, Thomas John</hi>
    </p>
    <p>
        <hi rend="italic">The widow and the will</hi>, published as
<hi rend="italic">Four legs and two legs.</hi>
    </p>
    <p>1826</p>
<!-- and many more -->
</div>

(and you can guess that I'm going to change anything in bold to be
authors and anything in italics to be a title...then group them into
individual entries.)

But to get this first step done, I've started out a number of
different ways before hitting stumbling blocks with
previous/following-sibling.  Is the right approach (in XSLT2) instead
to do something like xsl:for-each-group on the value of hi/@rend
inside each 'p'?

Any thoughts appreciated,
-James

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.