vgritsenko    2002/06/16 19:20:44

  Modified:    .        Tag: cocoon_2_0_3_branch changes.xml
               
src/java/org/apache/cocoon/components/language/markup/sitemap/java
                        Tag: cocoon_2_0_3_branch sitemap.xsl
               src/webapp/mount/lint Tag: cocoon_2_0_3_branch sitemap.xmap
  Log:
  fix bug 8658
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.138.2.23 +5 -3      xml-cocoon2/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/changes.xml,v
  retrieving revision 1.138.2.22
  retrieving revision 1.138.2.23
  diff -u -r1.138.2.22 -r1.138.2.23
  --- changes.xml       17 Jun 2002 01:21:18 -0000      1.138.2.22
  +++ changes.xml       17 Jun 2002 02:20:44 -0000      1.138.2.23
  @@ -37,10 +37,12 @@
     <person name="John Morrison" email="[EMAIL PROTECTED]" id="JM"/>
    </devs>
   
  -
    <release version="@version@" date="@date@">
  +  <action dev="VG" type="fix" fixes-bug="8658" due-to="Michael Melhem" 
due-to-email="[EMAIL PROTECTED]">
  +   Fix sitemap compilation error when matchers are used within view or 
resource.
  +  </action>
     <action dev="VG" type="fix" fixes-bug="8509" due-to="Michael Melhem" 
due-to-email="[EMAIL PROTECTED]">
  -   Fix sitemap compilation error when action used within view.
  +   Fix sitemap compilation error when actions are used within view.
     </action>
     <action dev="VG" type="fix" fixes-bug="3782">
      TraxTransformer and XSLTProcessor components now correctly handle
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.11.2.3  +9 -5      
xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl
  
  Index: sitemap.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl,v
  retrieving revision 1.11.2.2
  retrieving revision 1.11.2.3
  diff -u -r1.11.2.2 -r1.11.2.3
  --- sitemap.xsl       17 Jun 2002 01:21:18 -0000      1.11.2.2
  +++ sitemap.xsl       17 Jun 2002 02:20:44 -0000      1.11.2.3
  @@ -9,6 +9,8 @@
    
*****************************************************************************
   -->
   
  +<!-- $Id$-->
  +
   <!-- Sitemap Core logicsheet for the Java language -->
   <xsl:stylesheet
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  @@ -227,7 +229,7 @@
         /** HashMap relating labels to view names */
         private HashMap view_label_map = new HashMap(<xsl:value-of 
select="count(/map:sitemap/map:views/map:[EMAIL PROTECTED])"/>);
   
  -      <xsl:for-each select="/map:sitemap/map:pipelines//map:match">
  +      <xsl:for-each select="(/map:sitemap/map:views | 
/map:sitemap/map:resources | /map:sitemap/map:pipelines)//map:match">
           <!-- Generate variables for patterns -->
           <xsl:variable name="matcher-name">
             <xsl:call-template name="generate-name">
  @@ -427,7 +429,7 @@
         /** Prepare patterns of PreparableMatchers. */
         public void prepareMatchers() throws Exception {
         <!-- Generate variables for patterns -->
  -      <xsl:for-each select="/map:sitemap/map:pipelines//map:match">
  +      <xsl:for-each select="(/map:sitemap/map:views | 
/map:sitemap/map:resources | /map:sitemap/map:pipelines)//map:match">
           <!-- get the type of matcher used -->
           <xsl:variable name="matcher-type">
             <xsl:call-template name="get-parameter">
  @@ -754,12 +756,14 @@
           return false;
         }
   
  +      <xsl:for-each select="/map:sitemap/map:views/map:view | 
/map:sitemap/map:resources/map:resource | 
/map:sitemap/map:pipelines/map:pipeline">
  +        <!-- Generate methods (if required) for all components nested into 
views/resources/pipelines -->
  +        <xsl:apply-templates select="*" mode="method"/>
  +      </xsl:for-each>
  +
         <xsl:for-each select="/map:sitemap/map:pipelines/map:pipeline">
           <xsl:call-template name="line-number"/>
           <xsl:variable name="pipeline-position" select="position()"/>
  -        <!-- Generate methods (if required) for all components nested into 
pipeline -->
  -        <xsl:apply-templates select="*" mode="method"/>
  -
           <!-- Generate methods for every map:handle-errors elements in all 
map:pipeline elements -->
           <xsl:for-each select="map:handle-errors">
             <!-- Default error handler's type is 500 -->
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.1   +53 -25    xml-cocoon2/src/webapp/mount/lint/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/mount/lint/sitemap.xmap,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- sitemap.xmap      17 Jan 2002 03:51:38 -0000      1.2
  +++ sitemap.xmap      17 Jun 2002 02:20:44 -0000      1.2.2.1
  @@ -17,6 +17,31 @@
       </map:selectors>
     </map:components>
   
  +  <map:views>
  +    <map:view name="content" from-label="content">
  +      <!--
  +        Views can have same stuff as other pipelines except generator,
  +        reader, mount, redirect.
  +      -->
  +      <map:match pattern="test">
  +        <map:transform src="test"/>
  +      </map:match>
  +      <map:act type="request"/>
  +      <map:serialize type="xml"/>
  +    </map:view>
  +  </map:views>
  +
  +  <map:resources>
  +    <map:resource name="slides">
  +      <map:generate src="test"/>
  +      <map:match pattern="test">
  +        <map:transform src="test"/>
  +      </map:match>
  +      <map:act type="request"/>
  +      <map:serialize/>
  +    </map:resource>
  +  </map:resources>
  +
     <map:pipelines>
       <!-- The only working pipeline here -->
       <map:pipeline>
  @@ -142,6 +167,7 @@
             </map:match>
           </map:when>
           <map:when test="four">
  +          <map:generate src="one"/>
             <map:select>
               <map:when test="one-one">
                 <map:transform src="five"/>
  @@ -150,6 +176,7 @@
                 <map:transform src="six"/>
               </map:otherwise>
             </map:select>
  +          <map:serialize/>
           </map:when>
           <map:when test="five">
             <map:mount uri-prefix="one/" src="one/" check-reload="yes"/>
  @@ -159,34 +186,36 @@
           </map:otherwise>
         </map:select>
   
  -      <!-- 3. actions allow any nested components -->
  -      <map:act type="request">
  -        <map:generate src="one"/>
  -        <map:match pattern="test-one-2-nested">
  -          <map:transform src="two"/>
  -        </map:match>
  +      <map:match pattern="test">
  +        <!-- 3. actions allow any nested components -->
           <map:act type="request">
  -          <map:transform src="three"/>
  +          <map:generate src="one"/>
  +          <map:match pattern="test-one-2-nested">
  +            <map:transform src="two"/>
  +          </map:match>
  +          <map:act type="request">
  +            <map:transform src="three"/>
  +          </map:act>
  +          <map:select>
  +            <map:when test="one">
  +              <map:transform src="four"/>
  +            </map:when>
  +            <map:otherwise>
  +              <map:transform src="five"/>
  +            </map:otherwise>
  +          </map:select>
  +          <map:transform src="six"/>
  +          <map:serialize/>
           </map:act>
  -        <map:select>
  -          <map:when test="one">
  -            <map:transform src="four"/>
  -          </map:when>
  -          <map:otherwise>
  -            <map:transform src="five"/>
  -          </map:otherwise>
  -        </map:select>
  -        <map:transform src="six"/>
  -        <map:serialize/>
  -      </map:act>
   
  -      <map:act type="request">
  -        <map:mount uri-prefix="one/" src="one/" check-reload="yes"/>
  -      </map:act>
  +        <map:act type="request">
  +          <map:mount uri-prefix="one/" src="one/" check-reload="yes"/>
  +        </map:act>
   
  -      <map:act type="request">
  -        <map:read src="one"/>
  -      </map:act>
  +        <map:act type="request">
  +          <map:read src="one"/>
  +        </map:act>
  +      </map:match>
   
         <!-- 4. direct components are also allowed at the top level -->
         <map:generate src="test-four"/>
  @@ -216,7 +245,6 @@
           <map:transform src="five"/>
           <map:serialize/>
         </map:handle-errors>
  -
       </map:pipeline>
   
       <!-- Test substitutions -->
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to