lenya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gre...@apache.org
Subject cvs commit: cocoon-lenya/src/webapp/lenya navigation.xmap
Date Wed, 13 Aug 2003 15:10:43 GMT
gregor      2003/08/13 08:10:43

  Modified:    src/webapp/lenya/xslt/navigation breadcrumb.xsl tabs.xsl
                        menu.xsl
               src/webapp/lenya navigation.xmap
  Log:
  made navigation elements pick up the right language
  
  Revision  Changes    Path
  1.8       +12 -4     cocoon-lenya/src/webapp/lenya/xslt/navigation/breadcrumb.xsl
  
  Index: breadcrumb.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/xslt/navigation/breadcrumb.xsl,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- breadcrumb.xsl	11 Aug 2003 14:46:28 -0000	1.7
  +++ breadcrumb.xsl	13 Aug 2003 15:10:42 -0000	1.8
  @@ -17,6 +17,7 @@
       
   <xsl:param name="url"/>
   <xsl:param name="chosenlanguage"/>
  +<xsl:param name="defaultlanguage"/>
   <xsl:param name="breadcrumbprefix"/>
   
   <xsl:template match="nav:site">
  @@ -40,17 +41,24 @@
   <xsl:template name="step">
     <xsl:choose>
       <xsl:when test="substring(@href, (string-length(@href) - string-length($url)) +
1) = $url">
  -      <xsl:apply-templates select="nav:label[lang($chosenlanguage)]"/>
  +      <xsl:apply-templates select="nav:label"/>
       </xsl:when>
       <xsl:otherwise>
  -      <a href="{@href}"><xsl:apply-templates select="nav:label[lang($chosenlanguage)]"/></a>
  +      <a href="{@href}"><xsl:apply-templates select="nav:label"/></a>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
   
       
  -<xsl:template match="nav:label[lang($chosenlanguage)]">
  -  <xsl:apply-templates select="node()"/>
  +<xsl:template match="nav:label">
  +   <xsl:choose>
  +      <xsl:when test="self::*[lang($chosenlanguage)]">
  +      	<xsl:value-of select="self::*[lang($chosenlanguage)]"/>
  +      </xsl:when>
  +      <xsl:otherwise>
  +      	<xsl:value-of select="self::*[lang($defaultlanguage)]"/>
  +      </xsl:otherwise>
  +   </xsl:choose>	
   </xsl:template>
   
   
  
  
  
  1.8       +11 -3     cocoon-lenya/src/webapp/lenya/xslt/navigation/tabs.xsl
  
  Index: tabs.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/xslt/navigation/tabs.xsl,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- tabs.xsl	29 Jul 2003 14:52:07 -0000	1.7
  +++ tabs.xsl	13 Aug 2003 15:10:42 -0000	1.8
  @@ -17,6 +17,7 @@
   
   <xsl:param name="url"/>
   <xsl:param name="chosenlanguage"/>
  +<xsl:param name="defaultlanguage"/>
   
   <xsl:template match="nav:site">
   
  @@ -54,12 +55,19 @@
   
   
   <xsl:template name="label">
  -  <a href="{@href}"><xsl:apply-templates select="nav:label[lang($chosenlanguage)]"/></a>
  +  <a href="{@href}"><xsl:apply-templates select="nav:label"/></a>
   </xsl:template>
   
   
  -<xsl:template match="nav:label[lang($chosenlanguage)]">
  -  <xsl:apply-templates select="node()"/>
  +<xsl:template match="nav:label">
  +   <xsl:choose>
  +      <xsl:when test="self::*[lang($chosenlanguage)]">
  +      	<xsl:value-of select="self::*[lang($chosenlanguage)]"/>
  +      </xsl:when>
  +      <xsl:otherwise>
  +      	<xsl:value-of select="self::*[lang($defaultlanguage)]"/>
  +      </xsl:otherwise>
  +   </xsl:choose>	
   </xsl:template>
   
   
  
  
  
  1.10      +12 -4     cocoon-lenya/src/webapp/lenya/xslt/navigation/menu.xsl
  
  Index: menu.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/xslt/navigation/menu.xsl,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- menu.xsl	29 Jul 2003 14:52:07 -0000	1.9
  +++ menu.xsl	13 Aug 2003 15:10:42 -0000	1.10
  @@ -17,6 +17,7 @@
       
   <xsl:param name="url"/>
   <xsl:param name="chosenlanguage"/>
  +<xsl:param name="defaultlanguage"/>
   
   <xsl:template match="nav:site">
     <div id="menu">
  @@ -57,20 +58,27 @@
   
   <xsl:template name="item-default">
     <div class="menuitem-{count(ancestor-or-self::nav:node)}">
  -    <a href="{@href}"><xsl:apply-templates select="nav:label[lang($chosenlanguage)]"/></a>
  +    <a href="{@href}"><xsl:apply-templates select="nav:label"/></a>
     </div>
   </xsl:template>
       
       
   <xsl:template name="item-selected">
     <div class="menuitem-selected-{count(ancestor-or-self::nav:node)}">
  -    <xsl:apply-templates select="nav:label[lang($chosenlanguage)]"/>
  +    <xsl:apply-templates select="nav:label"/>
     </div>
   </xsl:template>
   
   
  -<xsl:template match="nav:label[lang($chosenlanguage)]">
  -  <xsl:apply-templates select="node()"/>
  +<xsl:template match="nav:label">
  +   <xsl:choose>
  +      <xsl:when test="self::*[lang($chosenlanguage)]">
  +      	<xsl:value-of select="self::*[lang($chosenlanguage)]"/>
  +      </xsl:when>
  +      <xsl:otherwise>
  +      	<xsl:value-of select="self::*[lang($defaultlanguage)]"/>
  +      </xsl:otherwise>
  +   </xsl:choose>	
   </xsl:template>
       
       
  
  
  
  1.12      +2 -0      cocoon-lenya/src/webapp/lenya/navigation.xmap
  
  Index: navigation.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/navigation.xmap,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- navigation.xmap	11 Aug 2003 14:46:27 -0000	1.11
  +++ navigation.xmap	13 Aug 2003 15:10:43 -0000	1.12
  @@ -28,6 +28,7 @@
           <map:transform src="pubs/{../publication-id}/lenya/xslt/navigation/{../stylesheet}.xsl">
             <map:parameter name="url" value="{../url}"/>
             <map:parameter name="chosenlanguage" value="{page-envelope:document-language}"/>
  +          <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
             <map:parameter name="breadcrumbprefix" value="{page-envelope:breadcrumb-prefix}"/>
           </map:transform>
           <map:serialize type="xml"/>
  @@ -37,6 +38,7 @@
         <map:transform src="xslt/navigation/{stylesheet}.xsl">
           <map:parameter name="url" value="{url}"/>
           <map:parameter name="chosenlanguage" value="{page-envelope:document-language}"/>
  +         <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
           <map:parameter name="breadcrumbprefix" value="{page-envelope:breadcrumb-prefix}"/>
         </map:transform>
         <map:serialize type="xml"/>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org


Mime
View raw message