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

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

Subject: Re: n squared behavior with XT for 'preceding' tests?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 22 Jul 1999 01:21:30 +0100 (BST)
n squared
I wisely wrote 

> (and not try doing it at 0015 in the morning)

I less wisely did:

=====================================================
<math>

<mrow>
<mi>a</mi><mi>b</mi><mi>c</mi><mn>1</mn>
<mi>x</mi><mi>y</mi><mi>z</mi><mn>2</mn>
</mrow>

</math>


=====================================================
<math>
<mrow>
<mi>abc</mi>
<mn>1</mn>
<mi>xyz</mi>
<mn>2</mn>
</mrow>
</math>
=====================================================

<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
                default-space="strip"
                indent-result="yes">

<xsl:template match="*" >
 <xsl:copy>
     <xsl:apply-templates/>
 </xsl:copy>
</xsl:template>


<xsl:template match="mi" >
 <xsl:if test="not(from-preceding-siblings(*[position()=1 and  from-self(mi)]))">
     <xsl:apply-templates mode="grab" select="."/>
 </xsl:if>
</xsl:template>

<xsl:template mode="grab" match="mi">
<xsl:param-variable name="x" expr="''"/>
<xsl:choose>
  <xsl:when test="from-following-siblings(*[position()=1 and from-self(mi)])">   
     <xsl:apply-templates mode="grab" select="from-following-siblings(*[1])">
       <xsl:param name="x" expr="concat($x,.)"/>
     </xsl:apply-templates>
   </xsl:when>
   <xsl:otherwise>
     <mi><xsl:value-of select="concat($x,.)"/></mi>
   </xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>




 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.