|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] double indirection with keys?
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








