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

Is this an ancestor problem?

Subject: Is this an ancestor problem?
From: "f. nikita thomas" <nikita.the.tzadik@xxxxxxxxx>
Date: Mon, 14 Sep 2009 17:11:50 -0400
 Is this an ancestor problem?
Hey. First the preliminaries: Saxon 9 Java; XSLT 2.0 & XPath 2.0. I
have been attempting to select the title text of a DocBook table title
,with no success, like so:

   <xsl:param name="u" select="(//db:row[xs:string(@role) eq
xs:string($x)]/*)//ancestor::db:title[1]/*" as="node()*"/>

the path in the parentheses will match the table row I want, however I
can not get the table title.

The XML for the DocBook file is:

 <table>
        <title role="adhoc">This is what I want to match</title>

        <tgroup cols="7">
          <tbody role="1">
            <row>
              <entry align="center"><emphasis role="bold">xxx</emphasis></entry>

              <entry align="center"><emphasis role="bold">yyy</emphasis></entry>

              <entry align="center"><emphasis role="bold">zzz</emphasis></entry>

              <entry align="center"><emphasis role="bold">uuu</emphasis></entry>

              <entry align="center"><emphasis role="bold">kkk</emphasis></entry>

              <entry align="center"><emphasis role="bold">nnn</emphasis></entry>

              <entry align="center"><emphasis role="bold">qqq</emphasis></entry>
            </row>

            <row role="1"><!--this is where I start from-->
              <entry align="center" >u</entry>

              <entry align="center" >k</entry>

              <entry align="center" >e</entry>

              <entry align="center" >i</entry>

              <entry align="center" >p</entry>

              <entry align="center" >z</entry>

              <entry align="center" >a</entry>
            </row>
          </tbody>
        </tgroup>
      </table>

Maybe I have misunderstood the role of ancestor::? It wouldn't be the
first time I made a bad assumption about XPath or XSLT. Any salient
help will be greatly appreciated. I apologize if I didn't follow the
proper posting etiquette. Thanks.

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.