cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From step...@apache.org
Subject cvs commit: cocoon-2.1/src/documentation/xdocs/howto howto-i18n-xmlform.xml
Date Thu, 01 May 2003 14:38:00 GMT
stephan     2003/05/01 07:38:00

  Modified:    src/documentation/xdocs/howto howto-i18n-xmlform.xml
  Log:
  Update i18n-xmlform howto, see
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13114
  
  Revision  Changes    Path
  1.2       +38 -21    cocoon-2.1/src/documentation/xdocs/howto/howto-i18n-xmlform.xml
  
  Index: howto-i18n-xmlform.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/documentation/xdocs/howto/howto-i18n-xmlform.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- howto-i18n-xmlform.xml	9 Mar 2003 00:07:59 -0000	1.1
  +++ howto-i18n-xmlform.xml	1 May 2003 14:38:00 -0000	1.2
  @@ -156,30 +156,47 @@
          <source><![CDATA[
   <?xml version="1.0"?>
   <xsl:stylesheet version="1.0"
  -    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  -    xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002"
  -    xmlns:i18n="http://apache.org/cocoon/i18n/2.0">
  +                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  +                xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002"
  +                xmlns:i18n="http://apache.org/cocoon/i18n/2.0">
   
  -<xsl:template match="document">
  -     <document>
  -           <xsl:apply-templates/>
  -     </document>
  -</xsl:template>
  +  <xsl:template match="document">
  +    <document>
  +      <xsl:apply-templates/>
  +    </document>
  +  </xsl:template>
   
  -<xsl:template match="xf:violation">
  -     <xf:violation>
  -           <i18n:text>
  -                 <xsl:value-of select="."/>
  -           </i18n:text>
  -     </xf:violation>
  -</xsl:template>
  +  <xsl:template match="xf:violation">
  +    <xf:violation>
  +      <i18n:text>
  +        <xsl:value-of select="."/>
  +      </i18n:text>
  +    </xf:violation>
  +  </xsl:template>
   
  -<xsl:template match="node()" priority="-1">
  -     <xsl:copy>
  -           <xsl:copy-of select="@*"/>
  -           <xsl:apply-templates/>
  -     </xsl:copy>
  -</xsl:template>
  +  <xsl:template match="xf:output[@type='number']">
  +    <xsl:variable name="value"><xsl:value-of select="xf:value"/></xsl:variable>
  +    <xsl:variable name="caption"><xsl:value-of select="xf:caption"/></xsl:variable>
  +    <xsl:variable name="ref"><xsl:value-of select="@ref"/></xsl:variable>
  +
  +    <xf:output ref="{$ref}">
  +      <xf:caption><i18n:text><xsl:value-of select="$caption"/></i18n:text></xf:caption>
  +      <xf:violations class="error"/>
  +      <xf:value>
  +        <xsl:element name="i18n:number">
  +          <xsl:attribute name="src-locale">en</xsl:attribute>
  +          <xsl:attribute name="value"><xsl:value-of select="$value"/></xsl:attribute>
  +        </xsl:element>
  +      </xf:value>
  +    </xf:output>
  +  </xsl:template>
  +
  +  <xsl:template match="node()" priority="-1">
  +    <xsl:copy>
  +      <xsl:copy-of select="@*"/>
  +      <xsl:apply-templates/>
  +    </xsl:copy>
  +  </xsl:template>
   </xsl:stylesheet>
   ]]></source>
   <note>       
  
  
  

Mime
View raw message