[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] ancestor query
Subject: [xsl] ancestor query From: "Tanzila Mohammad" <tmohammad@xxxxxxxxxxxxxxxxxxxx> Date: Fri, 16 Nov 2001 15:08:08 -0000 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Re: Re: Re: Re: order of , Jeni Tennison | Thread | Re: [xsl] ancestor query, Jörg Heinicke |
[xsl] match + default namespace, philippe drix | Date | [xsl] sum function, Hesselberth, Jan |
Month |