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

Re: Building complex, hierarchical html datasets

Subject: Re: Building complex, hierarchical html datasets
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 19 May 2009 12:16:20 +0100
Re:  Building complex
	<xsl:when test="ancestor::exp-level-1">
		<xsl:value-of select="(if (ancestor::exp-level-1/heading[@type =
'electronic-only']) then ancestor::exp-level-1/heading[@type =
'electronic-only'] else ancestor::exp-level-1/heading[@type =
	<xsl:when test="ancestor::misc-level-1">
		<xsl:value-of select="ancestor::misc-level-1/heading[1][@type !=
	<xsl:when test="ancestor::law">
		<xsl:value-of select="ancestor::law/heading[@type = 'electronic-only']"/>
	<xsl:when test="ancestor::reg">
		<xsl:value-of select="(if (ancestor::reg/heading[@type =
'electronic-only']) then ancestor::reg/heading[@type =
'electronic-only'] else ancestor::reg/heading[@type =
	<xsl:when test="ancestor::group">
		<xsl:value-of select="(if
(ancestor::group[1][not(descendant::misc-level-1 or
descendant::exp-level-1)]/heading[@type = 'electronic-only']) then
ancestor::group[1]/heading[@type = 'electronic-only'] else
ancestor::group[not(descendant::misc-level-1 or
		<xsl:value-of select="parent::*/heading[1]"/>

I think that says to choose in order of preference
ancestor,exp-level-1,misc-level-1,law,reg,group,any parent
then choose in order of prefernce the heading with type
electronic-only,running-head, anything

which is

		<xsl:value-of select="
(heading[@type ='electronic-only'],heading[@type ='running-head'],heading)[1]"/>

actually that's not quite the same (for the particularly intricate
ancestor::group case but it's neary enough while I'm having lunch...


The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 

Current Thread


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.
First Name
Last Name
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.