cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject cvs commit: cocoon-2.2/src/java/org/apache/cocoon/components/cprocessor sitemap2xconf.xsl
Date Tue, 27 Jan 2004 09:05:13 GMT
unico       2004/01/27 01:05:12

  Modified:    src/java/org/apache/cocoon/components/cprocessor
                        sitemap2xconf.xsl
  Log:
  fix default selector/matcher again
  
  Revision  Changes    Path
  1.5       +32 -12    cocoon-2.2/src/java/org/apache/cocoon/components/cprocessor/sitemap2xconf.xsl
  
  Index: sitemap2xconf.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/cprocessor/sitemap2xconf.xsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- sitemap2xconf.xsl	26 Jan 2004 16:07:18 -0000	1.4
  +++ sitemap2xconf.xsl	27 Jan 2004 09:05:09 -0000	1.5
  @@ -163,12 +163,22 @@
       </xsl:variable>
       <match-node id="{$id}" logger="sitemap.processor">
         <xsl:apply-templates select="@*" mode="copy" />
  -      <xsl:if test="@type">
  -        <xsl:attribute name="type">
  -          <xsl:value-of select="@type"/>
  -          <xsl:text>-matcher</xsl:text>
  -        </xsl:attribute>
  -      </xsl:if>
  +      <xsl:choose>
  +        <xsl:when test="@type">
  +          <xsl:attribute name="type">
  +            <xsl:value-of select="@type"/>
  +            <xsl:text>-matcher</xsl:text>
  +          </xsl:attribute>
  +        </xsl:when>
  +        <xsl:otherwise>
  +          <xsl:if test="/map:sitemap/map:components/map:matchers/@default">
  +            <xsl:attribute name="type">
  +              <xsl:value-of select="/map:sitemap/map:components/map:matchers/@default"/>
  +              <xsl:text>-matcher</xsl:text>
  +            </xsl:attribute>
  +          </xsl:if>
  +        </xsl:otherwise>
  +      </xsl:choose>
         <xsl:for-each select="map:match|map:select|map:act|map:call|map:aggregate|map:generate|map:transform|map:serialize|map:read|map:mount|map:redirect-to">
           <xsl:element name="{local-name()}">
             <xsl:attribute name="id-ref">
  @@ -192,12 +202,22 @@
       </xsl:variable>
       <select-node id="{$id}" logger="sitemap.processor">
         <xsl:apply-templates select="@*" mode="copy" />
  -      <xsl:if test="@type">
  -        <xsl:attribute name="type">
  -          <xsl:value-of select="@type" />
  -          <xsl:text>-selector</xsl:text>
  -        </xsl:attribute>
  -      </xsl:if>
  +      <xsl:choose>
  +        <xsl:when test="@type">
  +          <xsl:attribute name="type">
  +            <xsl:value-of select="@type"/>
  +            <xsl:text>-selector</xsl:text>
  +          </xsl:attribute>
  +        </xsl:when>
  +        <xsl:otherwise>
  +          <xsl:if test="/map:sitemap/map:components/map:selectors/@default">
  +            <xsl:attribute name="type">
  +              <xsl:value-of select="/map:sitemap/map:components/map:selectors/@default"/>
  +              <xsl:text>-selector</xsl:text>
  +            </xsl:attribute>
  +          </xsl:if>
  +        </xsl:otherwise>
  +      </xsl:choose>
         <xsl:apply-templates select="map:parameter" mode="copy" />
         <xsl:apply-templates select="map:when|map:otherwise" mode="config">
           <xsl:with-param name="parent-id">
  
  
  

Mime
View raw message