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

Re: breaking up XML on page break element [RETRY 3]

Subject: Re: breaking up XML on page break element [RETRY 3]
From: "G. Ken Holman g.ken.holman@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 5 Jul 2014 16:05:00 -0000
Re:  breaking up XML on page break element [RETRY 3]
[RETRY 3]

At 2014-07-04 14:43 +0000, Geert Bormans geert@xxxxxxxxxxxxxxxxxxx wrote:
Hi all,

Here is a fun one I thought I could share

I have a nicely nested XML (a bit TEI like)
and markers for page breaks can happen everywhere in the document (as empty elements)


Now I want to break the document per page, reconstructing the structure
So in a first step, I want to isolate the pagebreak to the highest level

<book>
<title>...</title>
<section>
<para>aaa<pb/>bbb</para>
</section>
</book>

to become

<book>
<title>...</title>
<section>
<para>aaa</para>
</section>
<pb/>
<section>
<para>bbb</para>
</section>
</book>

Bearing in mind I need a generic solution
and pagebreaks can happen at every level

Any thoughts?
I am not looking for code, just curious on how people would attack this

Use "<<" and ">>" to determine those elements that are before, after and in-between page breaks, then recreate the document structure up to those points.


Are we not allowed to post code for this? :{)} It sounds like fun. It might come in handy for my PSMI construct.

. . . . . . . Ken


-- Contact us for world-wide XML consulting and instructor-led training | Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm | Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ | G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx | Google+ profile: http://plus.google.com/+GKenHolman-Crane/about | Legal business disclaimers: http://www.CraneSoftwrights.com/legal |


--- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com

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.