Subject: Re: [xsl] navigation, TEI From: "kirunews" <kirunews@xxxxxxxxxxx> Date: Wed, 23 Jun 2004 23:11:40 +0200 |
Thanks for the answers! At the moment, the solution i found: step 1. - indexing the generated ids of the div/head <xsl:key name="divs" match="//*[substring-after(name(),'div') < 5]/head" use="generate-id()" /> (one problem here: i couldn't use variable here, so match="//*[ substring-after(name(),'div') < $oneNumber ]/head" doesn't work.) step 2. - get the generated ids instead of fragment trees and using the general $splitLevel variable instead of listing each div levels (in one hand it's more slower than i expected but in the other hand it uses a very useful parameter...) <xsl:when test="preceding-sibling::*[substring-after(name(),'div')<$splitLevel]/head"> <xsl:value-of select="generate-id( (preceding::*[substring-after(name(),'div')<$splitLevel]/head)[last()] )" /> </xsl:when> step 3. - 'dereferencing' [it's a kind of Perl-ish expression] the id with the 'key' function (eliminating the problems came from fragment trees) instead of the very-very slow '//node()[generate-id()=$generatedID]' expression <xsl:apply-templates select="key('divs', $prev)/self::*" /> The life and XSL are great! (and so hard as well) All the best! Kiraly Peter http://www.arcanum.hu
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] navigation, TEI, Wendell Piez | Thread | Re: [xsl] alternate backgrounds pro, james walker |
RE: [xsl] a beginner question, Michael Kay | Date | Getting, Peter Janker |
Month |