kpiroumian    02/04/26 09:17:38

  Modified:    src/webapp/samples/i18n menu2html.xsl simple.xsl simple.xsp
                        site2html.xsl sitemap.xmap
               src/webapp/samples sitemap.xmap
  Log:
  Minor additions and corrections to i18n samples.
  
  Revision  Changes    Path
  1.2       +0 -6      xml-cocoon2/src/webapp/samples/i18n/menu2html.xsl
  
  Index: menu2html.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/i18n/menu2html.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- menu2html.xsl     25 Apr 2002 16:34:32 -0000      1.1
  +++ menu2html.xsl     26 Apr 2002 16:17:37 -0000      1.2
  @@ -11,12 +11,6 @@
           <table class="menu">
               <tr>
                   <td>
  -                    Locale: <xsl:value-of select="$locale" /><br/>
  -                    Page: <xsl:value-of select="$page" /><br/>
  -                </td>
  -            </tr>
  -            <tr>
  -                <td>
                           <ul>
                               <xsl:apply-templates select="menu"/>
                           </ul>
  
  
  
  1.3       +15 -10    xml-cocoon2/src/webapp/samples/i18n/simple.xsl
  
  Index: simple.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/i18n/simple.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- simple.xsl        25 Apr 2002 16:34:32 -0000      1.2
  +++ simple.xsl        26 Apr 2002 16:17:37 -0000      1.3
  @@ -9,18 +9,9 @@
                                        <font color="navy">
                                                <xsl:value-of select="title"/>
                                        </font>
  +                                  <xsl:apply-templates select="form" />
                                </h2>
                                <h5><xsl:value-of select="sub-title"/></h5>
  -                             <table width="100%">
  -                                     <tr>
  -                                             <td align="left">
  -                                                     <xsl:apply-templates 
select="menu[1]"/>
  -                                             </td>
  -                                             <td align="right">
  -                                                     <xsl:apply-templates 
select="menu[2]"/>
  -                                             </td>                                  
         
  -                                     </tr>
  -                             </table>
                                <hr align="left" noshade="noshade" size="1"/>
                                <small><font color="red"><i><xsl:apply-templates 
select="annotation"/></i></font></small>
                                
  @@ -61,6 +52,20 @@
        
        <xsl:template match="bottom">
                <small><b><xsl:value-of select="copyright"/></b></small>               
 
  +     </xsl:template>
  +     
  +     <xsl:template match="form">
  +         <form>
  +             <xsl:copy-of select="@*" />
  +             <xsl:apply-templates />
  +         </form>
  +     </xsl:template>
  +     
  +     <xsl:template match="input">
  +         <input>
  +             <xsl:copy-of select="@*" />
  +             <xsl:apply-templates />         
  +         </input>
        </xsl:template>
        
   </xsl:stylesheet>
  
  
  
  1.3       +15 -7     xml-cocoon2/src/webapp/samples/i18n/simple.xsp
  
  Index: simple.xsp
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/i18n/simple.xsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- simple.xsp        25 Apr 2002 16:34:32 -0000      1.2
  +++ simple.xsp        26 Apr 2002 16:17:37 -0000      1.3
  @@ -13,6 +13,12 @@
           <title>
               <i18n:text>titletext</i18n:text>
           </title>
  +        <form method="GET">
  +            <input type="text" name="username">
  +                <xsp:attribute name="value"><xsp-request:get-parameter 
name="username" default="[yourname]" as="string" 
form-encoding="UTF-8"/></xsp:attribute>
  +            </input>
  +            <input type="submit" name="submit" value="Submit" />
  +        </form>
           <annotation>
               <i18n:text>doclink</i18n:text>
               <link>
  @@ -23,7 +29,8 @@
           <sub-title>
               <i18n:translate>
                   <i18n:text>count_title</i18n:text>
  -                <i18n:param type="number" pattern="000000">
  +                <!-- FIXME (KP): change the type to 'number' -->
  +                <i18n:param type="currency" pattern="000000">
                       <xsp:expr>count</xsp:expr>
                   </i18n:param>
                   <i18n:param type="date-time" src-pattern="EEE MMM dd hh:mm:ss zzz 
yyyy" src-locale="en" pattern="MEDIUM">
  @@ -40,9 +47,9 @@
               </para>
               <para title="third" name="article" i18n:attr="title name">
                   <i18n:translate>
  -                    <i18n:text>Hello, {0}! Glad to see you!</i18n:text>
  -                    <i18n:param name="username">
  -                        <xsp-request:get-parameter name="user" default="none" 
as="string"/>
  +                    <i18n:text>Hello</i18n:text>
  +                    <i18n:param>
  +                        <xsp-request:get-parameter name="username" default="none" 
as="string" form-encoding="UTF-8"/>
                       </i18n:param>
                   </i18n:translate>
               </para>
  @@ -65,13 +72,14 @@
               <para title="Number formatting (not translated)" name="article" 
i18n:attr="name">
                   <i18n:translate>
                                        Number : {0} | Currency: {1} | Percent: {2}, 
processed on: {3}
  -                                     <i18n:param type="number" src-locale="en">
  +                                     <!-- FIXME (KP): change the type to 'number' 
-->
  +                                     <i18n:param type="percent" pattern="#" 
src-locale="en">
                           <xsp:expr>17 + 3 + 1974</xsp:expr>
                       </i18n:param>
  -                    <i18n:param type="number" sub-type="currency" src-locale="en">
  +                    <i18n:param type="currency" src-locale="en">
                           <xsp:expr>2002.0 / 28.0</xsp:expr>
                       </i18n:param>
  -                    <i18n:param type="number" sub-type="percent" 
src-locale="en">1.205</i18n:param>
  +                    <i18n:param type="percent" src-locale="en">1.205</i18n:param>
                       <i18n:param type="date-time" pattern="MEDIUM"/>
                   </i18n:translate>
               </para>
  
  
  
  1.2       +1 -1      xml-cocoon2/src/webapp/samples/i18n/site2html.xsl
  
  Index: site2html.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/i18n/site2html.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- site2html.xsl     25 Apr 2002 16:34:32 -0000      1.1
  +++ site2html.xsl     26 Apr 2002 16:17:37 -0000      1.2
  @@ -1 +1 @@
  -<?xml version="1.0"?>
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

    <xsl:param name="locale" />
    
<xsl:param name="page" />

    <xsl:template match="site">
        <html>
            
<head>
                <title>
                    <xsl:value-of select="page/title" 
/>
                </title>
                <link rel="stylesheet" href="page.css" 
type="text/css"/>
            </head>
            <body>
                <table 
class="path">
                    <tr><td>Apache Cocoon Internationalization (i18n) 
and Localization (l10n) Samples</td></tr>
                </table>            
        
        <table class="topline"><tr><td>&#160;</td></tr></table>
                <table 
cellspacing="0" cellpadding="0" summary="content pane">
                    <tr>
      
                  <td width="5" class="navbar">&#160;</td>
                        <td 
rowspan="2" valign="top" nowrap="nowrap" width="300">
                            
<xsl:apply-templates select="table[@class='menu']"/>
                        </td>
    
                    <td valign="top" class="navbar" align="left">
                     
       Locale: <xsl:value-of select="$locale" />
                        </td>
        
                <td width="*" valign="top" class="navbar" align="right">
              
              Page: <xsl:value-of select="$page" />
                        </td>
     
               </tr>
                    <tr>
                        <td>&#160;</td>
 
                       <td class="content" valign="top" colspan="2">
                  
          <xsl:apply-templates select="page"/>
                        </td>
          
          </tr>
                </table>
                <table>
                    
<tr>
                        <td class="copyright">
                            
Copyright (c) 1999-2002 <a href="http://www.apache.org/";>Apache Software 
Foundation</a>. All Rights Reserved.
                        </td>
                    
</tr>
                </table>
            </body>
        </html>
    </xsl:template>
    
    <xsl:template match="node()|@*" priority="-1">
        <xsl:copy>
            
<xsl:apply-templates select="@*"/>
            <xsl:apply-templates/>
        
</xsl:copy>
    </xsl:template>
    
</xsl:stylesheet>
  \ No newline at end of file
  +<?xml version="1.0"?>
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

    <xsl:param name="locale" />
    
<xsl:param name="page" />

    <xsl:template match="site">
        <html>
            
<head>
                <title>
                    <xsl:value-of select="page/title" 
/>
                </title>
                <link rel="stylesheet" href="page.css" 
type="text/css"/>
            </head>
            <body>
                <table 
class="path">
                    <tr>
                        <td>
                   
         <!-- FIXME (KP): change to '..' -->
                            <a 
href="../welcome">Apache Cocoon Samples</a>&#160;&gt;&#160;<span 
class="current">Internationalization (i18n) and Localization (l10n)</span>             
           
                        </td>
                    </tr>
                
</table>            
                <table 
class="topline"><tr><td>&#160;</td></tr></table>
                <table 
cellspacing="0" cellpadding="0" summary="content pane">
                    <tr>
      
                  <td width="5" class="navbar">&#160;</td>
                        <td 
rowspan="2" valign="top" nowrap="nowrap" width="300">
                            
<xsl:apply-templates select="table[@class='menu']"/>
                        </td>
    
                    <td valign="top" class="navbar" align="left">
                     
       Locale: <xsl:value-of select="$locale" />
                        </td>
        
                <td width="*" valign="top" class="navbar" align="right">
              
              Page: <xsl:value-of select="$page" />
                        </td>
     
               </tr>
                    <tr>
                        <td>&#160;</td>
 
                       <td class="content" valign="top" colspan="2">
                  
          <xsl:apply-templates select="page"/>
                        </td>
          
          </tr>
                </table>
                <table>
                    
<tr>
                        <td class="copyright">
                            
Copyright (c) 1999-2002 <a href="http://www.apache.org/";>Apache Software 
Foundation</a>. All Rights Reserved.
                        </td>
                    
</tr>
                </table>
            </body>
        </html>
    </xsl:template>
    
    <xsl:template match="node()|@*" priority="-1">
        <xsl:copy>
            
<xsl:apply-templates select="@*"/>
            <xsl:apply-templates/>
        
</xsl:copy>
    </xsl:template>
    
</xsl:stylesheet>
  \ No newline at end of file
  
  
  
  1.3       +1 -1      xml-cocoon2/src/webapp/samples/i18n/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/i18n/sitemap.xmap,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sitemap.xmap      25 Apr 2002 16:34:32 -0000      1.2
  +++ sitemap.xmap      26 Apr 2002 16:17:37 -0000      1.3
  @@ -123,7 +123,7 @@
           <map:pipeline>
               
               <!-- Display this sitemap source-->
  -            <map:match pattern="content/sitemap.xmap">
  +            <map:match pattern="sitemap.xmap">
                   <map:generate src="sitemap.xmap"/>
                   <map:serialize type="xml"/>
               </map:match>            
  
  
  
  1.3       +7 -2      xml-cocoon2/src/webapp/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/sitemap.xmap,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sitemap.xmap      25 Mar 2002 18:55:46 -0000      1.2
  +++ sitemap.xmap      26 Apr 2002 16:17:38 -0000      1.3
  @@ -43,6 +43,11 @@
    <map:pipelines>
     <map:pipeline>
   
  +   <!-- FIXME (KP): Uncomment when matching is fixed -->
  +   <!-- map:match pattern="">
  +    <map:redirect-to uri="cocoon:/welcome" />
  +   </map:match -->
  +
      <map:match pattern="welcome">
       <map:generate src="samples.xml"/>
       <map:transform src="common/style/xsl/html/simple-samples2html.xsl"/>
  @@ -73,7 +78,7 @@
      </map:match>
   
      <!-- ================== Common fallthrough ===================== -->
  -
  +   <!--
      <map:match pattern="*/images/*.gif">
       <map:read src="common/resources/images/{2}.gif" mime-type="image/gif"/>
      </map:match>
  @@ -85,7 +90,7 @@
      <map:match pattern="*/images/*.png">
       <map:read src="common/resources/images/{2}.png" mime-type="image/png"/>
      </map:match>
  -   
  +   -->
      <!-- ======================== Samples =============================== -->
      
      <!-- samples automount -->  
  
  
  

----------------------------------------------------------------------
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