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

double indirection with keys?

Subject: double indirection with keys?
From: Tobias.Grundmann@xxxxxxxxxxxxxxxxx (Tobias Grundmann)
Date: Fri, 02 Feb 2001 17:23:53 +0100
double indirection
Hello everybody,

I have the problem to access (actually to test
the existence of) an attribute via doubly linked references.
Ideally this would be done with an xsl:key like the following:
(a key would simplify my code significantly)

<xsl:key name="ttStyle"
match="/office:document/*/style:style/style:properties/@fo:font-name
       [/office:document/office:font-decls/style:font-decl
          [style:font-pitch='fixed']/@style:name=.]"
use="../../@style:name"
/>

But the XPath-Spec seems to indicate that predicates are not allowed
inside predicates. I've also tried to use another key to index the
first one but this doesn't work either.

The relevant pieces of the my source-document 
(from StarOffice-XML):

<office:document>
 <office:font-decls>
  <style:font-decl style:name="Courier" style:font-pitch="fixed"/>
 </office:font-decls>
 <office:automatic-styles>
   <style:style style:name="P4">
    <style:properties style:font-name="Courier"/>
   </style:style>
 </office:automatic-styles>
 <office:body>
  <text:p text:style-name="P4">typewriter</text:p>
 </office:body>
</office:document>

Now, with text:p as context-node, I would like to use 
key(ttStyle,@text:style-name) to test if typewriter 
has a fixed-width font.

Any Ideas?

regards
        Tobias

PS: The use-attribute my be flawed also but I haven't testet it.

 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.