Re: n squared behavior with XT for 'preceding' tests?

Subject: Re: n squared behavior with XT for 'preceding' tests?
From: "Sebastian Rahtz" <sebastian.rahtz@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 21 Jul 1999 23:40:59 +0100 (BST)
If I understand David Carlisle's code aright, he explicitly processes
the first <hd> element:

<xsl:template match="test">
  <xsl:apply-templates select="hd[1]"/>

and then processes the following identical ones:
      <xsl:apply-templates mode="later"

followed by the next non-identical one


Two questions:

 1. why doesn't the the second stage
    skip over the non-identical siblings? so if I have

     doesn't the "Foo" one pick up the #3 "Foo" and then the #2 "Bar"?
     they are all "following-siblings", and the select isn't a _while
     test is true_, but a _select all that match_ test, no?
     or did the original spec say that the things were pre-sorted?
 2. I was reading this hoping I could use a similar technique to clean 
    up some MathML:


    which I want as 

    but since this can occur in many places, I don't have the luxury
    of the top-level "go process the <x> elements". I could do
    "select the text of all the <mi> following-siblings" in the <mi>
    template, but then if I have


    I run up againt the same problem, that "following <mi> siblings"
    will pick up ALL the <mi>s in this sequence, and not stop at the

Am I confusing myself, and you, dear reader? Can I simplify
<mi>A</mi><mi>v</mi> in straight XSL?


 XSL-List info and archive:

Current Thread