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

ancestor query

Subject: ancestor query
From: "Tanzila Mohammad" <tmohammad@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Nov 2001 15:08:08 -0000
jeni arab name
I have the following xml:

	<query-result>
   		<yearbook id="fzyb" volume="49" year="1999">
			<name lang="CH">English Name...</name>
                         .....
			<table-header>
				<table-header-literals>
					<literal name="number">22</literal>
                                        <literal
name="startpage">57</literal>
					<literal name="table" lang="EN">TABLE</literal>
					....
					<unit name="fzybk-MT-N" lang="ES">TM N</unit>
				</table-header-literals>
				<table-column-headers>
					<table-column-header-row>
						<column-header lang="AR" name="ELEMENT">Arabic name
...</column-header>
						<column-header lang="CN" name="ELEMENT">Chinese name</column-header>
						<column-header lang="EN" name="ELEMENT">PRODUCTION</column-header>
						<column-header lang="FR" name="ELEMENT">PRODUCTION</column-header>
						<column-header lang="ES" name="ELEMENT">PRODUCCION</column-header>
					</table-column-header-row>
					<table-column-header-row>
                                         .........

My xsl:
 .........
 <xsl:for-each
select="./table-header/table-column-headers/table-column-header-row/column-h
eader[@name='ELEMENT']">
       <xsl:sort select="concat(substring(./@lang='ES',1,1),./@lang)"
data-type="text" order="ascending"/>
             <fo:table-cell>
              <fo:block text-align="center" space-after.optimum="5pt"
font-weight="bold" space-before.optimum="10pt">
                 <xsl:value-of select="concat(.,' ', '<<unit details>>')"/>
              </fo:block>
              </fo:table-cell>
     </xsl:for-each>
.........

I want to have the 'unit' node value in the concatenation. Is there a way
that I can either:

- get to the root path directly then work my way down to the node.

e.g. root/query-result/yearbook/table-header/table-header-literals/unit

- or go up the node tree, by making use of ancestor (I have had trouble with
this).

Thanks

Tanz


 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.