cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/python xsp.xsl
Date Sat, 20 Apr 2002 03:38:20 GMT
vgritsenko    02/04/19 20:38:20

  Modified:    src/java/org/apache/cocoon/components/language/markup/xsp/python
                        xsp.xsl
  Log:
  optimize a bit
  
  Revision  Changes    Path
  1.2       +11 -24    xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/python/xsp.xsl
  
  Index: xsp.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/python/xsp.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- xsp.xsl	18 Apr 2002 13:48:40 -0000	1.1
  +++ xsp.xsl	20 Apr 2002 03:38:20 -0000	1.2
  @@ -1,6 +1,6 @@
   <?xml version="1.0"?>
   
  -<!-- $Id: xsp.xsl,v 1.1 2002/04/18 13:48:40 vgritsenko Exp $-->
  +<!-- $Id: xsp.xsl,v 1.2 2002/04/20 03:38:20 vgritsenko Exp $-->
   <!--
    *****************************************************************************
    * Copyright (C) The Apache Software Foundation. All rights reserved.        *
  @@ -15,7 +15,7 @@
    * XSP Core logicsheet for the Python language
    *
    * @author <a href="mailto:vgritsenko@apache.org>Vadim Gritsenko</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2002/04/18 13:48:40 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/04/20 03:38:20 $
   -->
   
   <xsl:stylesheet version="1.0"
  @@ -532,24 +532,16 @@
     <xsl:template match="*[not(namespace-uri(.) = $xsp-uri)]">
       <xsl:param name="indent"/>
   
  -    <xsl:variable name="text-siblings" select="preceding-sibling::xsp:text[string-length(XSLTExtension:suffix($extension,
.)) &gt; 0]"/>
  -    <xsl:variable name="textn-siblings" select="preceding-sibling::text()[string-length(XSLTExtension:suffix($extension,
.)) &gt; 0]"/>
  +    <xsl:variable name="text-sibling" select="preceding-sibling::xsp:text[string-length(XSLTExtension:suffix($extension,
.)) &gt; 0][1]"/>
  +    <xsl:variable name="textn-sibling" select="preceding-sibling::text()[string-length(XSLTExtension:suffix($extension,
.)) &gt; 0][1]"/>
       <xsl:variable name="zindent">
         <xsl:choose>
  -        <xsl:when test="$text-siblings">
  -          <xsl:value-of select="XSLTExtension:suffix($extension, $text-siblings[1])"/>
  +        <xsl:when test="$text-sibling">
  +          <xsl:value-of select="XSLTExtension:suffix($extension, $text-sibling)"/>
           </xsl:when>
  -        <xsl:when test="$textn-siblings">
  -          <xsl:value-of select="XSLTExtension:suffix($extension, $textn-siblings[1])"/>
  +        <xsl:when test="$textn-sibling">
  +          <xsl:value-of select="XSLTExtension:suffix($extension, $textn-sibling)"/>
           </xsl:when>
  -<!--
  -        <xsl:when test="string-length(XSLTExtension:suffix($extension, preceding-sibling::xsp:text[1]))
&gt; 0">
  -          <xsl:value-of select="XSLTExtension:suffix($extension, preceding-sibling::xsp:text[1])"/>
  -        </xsl:when>
  -        <xsl:when test="string-length(XSLTExtension:suffix($extension, preceding-sibling::text()[1]))
&gt; 0">
  -          <xsl:value-of select="XSLTExtension:suffix($extension, preceding-sibling::text()[1])"/>
  -        </xsl:when>
  --->
           <xsl:otherwise>
             <xsl:value-of select="$indent"/>
           </xsl:otherwise>
  @@ -647,20 +639,15 @@
     <xsl:template match="xsp:text">
       <xsl:param name="indent"/>
   
  -    <xsl:variable name="text-siblings" select="preceding-sibling::xsp:text[string-length(XSLTExtension:suffix($extension,
.)) &gt; 0]"/>
  +    <xsl:variable name="text-sibling" select="preceding-sibling::xsp:text[string-length(XSLTExtension:suffix($extension,
.)) &gt; 0][1]"/>
       <xsl:variable name="zindent">
         <xsl:choose>
           <xsl:when test="string-length(XSLTExtension:prefix($extension, .)) &gt;
0">
             <xsl:value-of select="XSLTExtension:prefix($extension, .)"/>
           </xsl:when>
  -        <xsl:when test="$text-siblings">
  -          <xsl:value-of select="XSLTExtension:suffix($extension, $text-siblings[1])"/>
  -        </xsl:when>
  -<!--
  -        <xsl:when test="string-length(XSLTExtension:suffix($extension, preceding-sibling::xsp:text[1]))
&gt; 0">
  -          <xsl:value-of select="XSLTExtension:suffix($extension, preceding-sibling::xsp:text[1])"/>
  +        <xsl:when test="$text-sibling">
  +          <xsl:value-of select="XSLTExtension:suffix($extension, $text-sibling)"/>
           </xsl:when>
  --->
           <xsl:otherwise>
             <xsl:value-of select="$indent"/>
           </xsl:otherwise>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message