You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by bl...@locus.apache.org on 2000/12/05 18:28:55 UTC

cvs commit: xml-cocoon/src/org/apache/cocoon/selection CodedSelectorFactory.java

bloritsch    00/12/05 09:28:54

  Modified:    src/org/apache/cocoon/components/language/markup/sitemap/java
                        Tag: xml-cocoon2 sitemap.xsl
               src/org/apache/cocoon/selection Tag: xml-cocoon2
                        CodedSelectorFactory.java
  Log:
  Logging logging logging.  Sitemap has profuse DEBUG logging, and the duplicate
  getLoggerFor() call has been removed.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.66  +11 -2     xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl
  
  Index: sitemap.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl,v
  retrieving revision 1.1.2.65
  retrieving revision 1.1.2.66
  diff -u -r1.1.2.65 -r1.1.2.66
  --- sitemap.xsl	2000/12/04 12:06:58	1.1.2.65
  +++ sitemap.xsl	2000/12/05 17:28:12	1.1.2.66
  @@ -77,7 +77,7 @@
        *
        * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
        * @author <a href="mailto:bloritsch@apache.org">Berin Loiritsch</a>
  -     * @version CVS $Revision: 1.1.2.65 $ $Date: 2000/12/04 12:06:58 $
  +     * @version CVS $Revision: 1.1.2.66 $ $Date: 2000/12/05 17:28:12 $
        */
       public class <xsl:value-of select="@file-name"/> extends AbstractSitemap {
         static final String LOCATION = "<xsl:value-of select="translate(@file-path, '/', '.')"/>.<xsl:value-of select="@file-name"/>";
  @@ -326,7 +326,7 @@
                   try {
                     return error_process_<xsl:value-of select="$pipeline-position"/> (environment, objectModel, e);
                   } catch (Exception ex) {
  -                  log.error("Sitemap", ex);
  +                  log.error("Sitemap Error Process", ex);
                   }
                 </xsl:when>
                 <xsl:otherwise>
  @@ -421,6 +421,7 @@
       <!-- this is the actual code produced -->
       if ((list = <xsl:value-of select="translate($matcher-type, '- ', '__')"/>Match(<xsl:value-of select="$matcher-name"/>_expr,
             objectModel)) != null) {
  +      log.debug("Matched <xsl:value-of select="$matcher-name"/>");
         listOfLists.add (list);
         <xsl:apply-templates/>
         listOfLists.remove (list);
  @@ -495,6 +496,7 @@
           else
         </xsl:if>
         if (<xsl:value-of select="translate($selector-type, '- ', '__')"/>Select (<xsl:value-of select="$selector-name"/>_expr, objectModel)) {
  +       log.debug("Select <xsl:value-of select="$selector-name"/>");
          <xsl:apply-templates/>
         }
       </xsl:for-each>
  @@ -502,6 +504,7 @@
       <!-- this is the actual code produced on the otherwise element -->
       <xsl:for-each select="./map:otherwise">
         else {
  +        log.debug("Select Otherwise");
         <xsl:apply-templates/>
         }
       </xsl:for-each>
  @@ -555,6 +558,7 @@
       <xsl:choose>
         <xsl:when test="./*">
           if ((list = <xsl:value-of select="$action-name"/> (environment, objectModel, substitute(listOfLists,<xsl:value-of select="$action-source"/>), <xsl:value-of select="$component-param"/>)) != null) {
  +          log.debug("Action <xsl:value-of select="$action-name"/>");
             listOfLists.add (list);
             <xsl:apply-templates/>
             listOfLists.remove(list);
  @@ -804,6 +808,7 @@
         <xsl:if test="$prefix='serializer'">
           <xsl:for-each select="/map:sitemap/map:views/map:view[@from-position='last']">
             if ("<xsl:value-of select="@name"/>".equals(cocoon_view)) {
  +            log.debug("View <xsl:value-of select="@name"/>");
               return view_<xsl:value-of select="translate(@name, '- ', '__')"/> (pipeline, listOfLists, environment);
             }
           </xsl:for-each>
  @@ -850,11 +855,13 @@
       <!-- collect the parameters -->
       <xsl:apply-templates select="parameter"/>
   
  +    log.debug("Component <xsl:value-of select="$prefix"/>:<xsl:value-of select="$component-type"/>(<xsl:value-of select="$component-param"/>)");
       <!-- determine the right invokation according to "has a src attribute" and "has a mime-type attribute" -->
       <xsl:choose>
         <xsl:when test="$component-source='null'">
           <xsl:choose>
             <xsl:when test="$mime-type!=''">
  +            log.debug("Mime-type: <xsl:value-of select="$mime-type"/>");
               pipeline.<xsl:value-of select="$method"/> ("<xsl:value-of select="$prefix"/>:<xsl:value-of select="$component-type"/>",
                 null, <xsl:value-of select="$component-param"/>,"<xsl:value-of select="$mime-type"/>"
               );
  @@ -867,8 +874,10 @@
           </xsl:choose>
         </xsl:when>
         <xsl:otherwise>
  +        log.debug("Source=<xsl:value-of select="$component-source"/>");
           <xsl:choose>
             <xsl:when test="$mime-type!=''">
  +            log.debug("Mime-type: <xsl:value-of select="$mime-type"/>");
               pipeline.<xsl:value-of select="$method"/> ("<xsl:value-of select="$prefix"/>:<xsl:value-of select="$component-type"/>",
                   substitute(listOfLists,"<xsl:value-of select="$component-source"/>"),
                   <xsl:value-of select="$component-param"/>,"<xsl:value-of select="$mime-type"/>");
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +2 -4      xml-cocoon/src/org/apache/cocoon/selection/Attic/CodedSelectorFactory.java
  
  Index: CodedSelectorFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/selection/Attic/CodedSelectorFactory.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- CodedSelectorFactory.java	2000/12/04 19:41:49	1.1.2.2
  +++ CodedSelectorFactory.java	2000/12/05 17:28:35	1.1.2.3
  @@ -17,7 +17,7 @@
    * embedded java code within the 'test' clause of the select.
    *
    * @author <a href="mailto:Marcus.Crafter@osa.de">Marcus Crafter</a>
  - * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/12/04 19:41:49 $
  + * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/12/05 17:28:35 $
    */
   public class CodedSelectorFactory implements CodeFactory
   {
  @@ -52,9 +52,7 @@
       {
           StringBuffer sb = new StringBuffer();
   
  -        sb.append("org.apache.log.Logger log = ")
  -        .append("org.apache.log.LogKit.getLoggerFor(\"cocoon\");")
  -        .append("try {")
  +        sb.append("try {")
           .append("return pattern.evaluate(objectModel);")
           .append("} catch (Exception e) {")
           .append("log.error(\"CodedSelector Exception : \" + e.getMessage() + \", returning false\");")