I don't think the optimizer will do very much with this: it should run pretty efficiently without any special optimizations.

For your second question, may sure that if you are using s9api you start off with

new Processor(true)

or in JAXP, that you use com.saxonica.EnterpriseTransformerFactory (not net.sf.saxon.TransformerFactoryImpl).

Michael Kay

On 11/07/2011 13:37, Alex Muir wrote:

I'm wondering if this code could be improved or if saxonee generally speaking would optimize this code to a large extent.

Also to utilize the optimizations from a java application using saxon9EE is there code or settings that would need to be written that would be different from a java application written using saxon9HE?

<xsl:template name="CategorizeAndgroupLines">
      <xsl:for-each-group select="line" group-adjacent="if (not(xs:boolean(@z_isFuzCD3))) then 1
         else if (xs:boolean(@z_isFuzCD3)) then 2
         else 0">
            <xsl:when test="current-grouping-key() = 1 and count(current-group()) ge 3">
               <xsl:element name="Paragraphs">
                  <xsl:attribute name="numberLine" select="count(current-group())"/>
                  <xsl:copy-of select="current-group()"/>
            <xsl:when test="current-grouping-key() = 1 and count(current-group()) lt 3">
               <xsl:element name="NonColumnData">
                  <xsl:attribute name="numberLine" select="count(current-group())"/>
                  <xsl:copy-of select="current-group()"/>
            <xsl:when test="current-grouping-key() = 2">
               <xsl:element name="LikelyColumnData">
                  <xsl:attribute name="numberLine" select="count(current-group())"/>
                  <xsl:copy-of select="current-group()"/>
                     <xsl:copy-of select="@*"/>

Alex Muir
Instructor | Program Organizer - University Technology Student Work Experience Building
University of the Gambia


Low budget software development benefiting development in the Gambia, West Africa
Experience of a lifetime, come to Gambia and Join UTSWEB - http://sites.utg.edu.gm/utsweb/

------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/saxon-help