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

Getting information from two disjunt subdivisions of a

Subject: Getting information from two disjunt subdivisions of a document.
From: <Jeroen.Hellingman@xxxxxxxxxxxx>
Date: Mon, 13 Jan 2003 16:03:12 +0100 (CET)
subdivisions in bohol
I have the following xml snippet, describing a work of which page
images are available

<work>
	<contents>
		<div id="ch01" page="p01"><head>First Chapter</head></div>

		...

		<div id="ch09" page="p89"><head>Last Chapter</head></div>
	</contents>
	<pages>
		<page id="p01" />

		...

		<page id="p99" />
	</pages>
</work>

Using Saxon, I want to generate a HTML page for each page element,
containing (among others) the following:

1. A link to the previous and next page (if available)
2. The title of the current chapter (at the top of the page)
	Defined as the first head of the first div (in document order) which
links to the current page; 
	or the head of the last (in document order) div that links to a
preceding page if no div links to this page.
3. Links to the start of the current chapter and the next and previous
chapter.
4. Links to all pages within the current chapter.

My idea is for each page to use xsl:preceding-sibling to search for a
page to which div refers, but have worries
about the efficiency of this. Isn't there a way to select the right
bunch of pages for each chapter in a single 
XPath statement.

Note that the case of a multiple chapters on a single page can occur.

I currently do the same with a Perl script and a non-XML format:
results of that can be seen on 
http://www.bohol.ph/indolence/indo_004.html



 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.