You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by st...@apache.org on 2003/12/17 10:59:12 UTC

cvs commit: cocoon-2.1/src/blocks/chaperon/samples/stylesheets grm2xgrm.xsl grm2xlex.xsl mathexp2html.xsl mathexp.xsl

stephan     2003/12/17 01:59:12

  Modified:    src/blocks/chaperon/samples sitemap.xmap
               src/blocks/chaperon/samples/grammars mathexp.xgrm
               src/blocks/chaperon/samples/misc mathexp.xsp
               src/blocks/chaperon/samples/stylesheets grm2xgrm.xsl
                        grm2xlex.xsl mathexp2html.xsl
  Removed:     src/blocks/chaperon/samples/stylesheets mathexp.xsl
  Log:
  Fixing problem of unresolved prefix.
  
  Revision  Changes    Path
  1.14      +1 -1      cocoon-2.1/src/blocks/chaperon/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/sitemap.xmap,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- sitemap.xmap	7 May 2003 16:50:40 -0000	1.13
  +++ sitemap.xmap	17 Dec 2003 09:59:11 -0000	1.14
  @@ -123,7 +123,7 @@
   
      <map:match pattern="mathexp.html">
       <map:generate type="serverpages" src="misc/mathexp.xsp"/>
  -    <map:transform                src="stylesheets/mathexp.xsl"/>
  +<!--    <map:transform                src="stylesheets/mathexp.xsl"/>-->
       <map:transform type="lexer"   src="grammars/mathexp.xlex"/>
       <map:transform type="parser"  src="grammars/mathexp.xgrm"/>
       <map:transform                src="stylesheets/mathexp2html.xsl"/>
  
  
  
  1.2       +1 -1      cocoon-2.1/src/blocks/chaperon/samples/grammars/mathexp.xgrm
  
  Index: mathexp.xgrm
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/grammars/mathexp.xgrm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mathexp.xgrm	9 Mar 2003 00:02:53 -0000	1.1
  +++ mathexp.xgrm	17 Dec 2003 09:59:11 -0000	1.2
  @@ -1,7 +1,7 @@
   <?xml version="1.0"?>
   <!DOCTYPE grammar PUBLIC "-//Chaperon//DTD grammar 2.0//EN" "grammar-v20.dtd">
   
  -<grammar>
  +<grammar xmlns="http://chaperon.sourceforge.net/schema/grammar/1.0">
    <production symbol="E">
     <nonterminal symbol="E"/><terminal symbol="plus"/><nonterminal symbol="T"/>
    </production>
  
  
  
  1.3       +2 -4      cocoon-2.1/src/blocks/chaperon/samples/misc/mathexp.xsp
  
  Index: mathexp.xsp
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/misc/mathexp.xsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mathexp.xsp	7 May 2003 16:50:40 -0000	1.2
  +++ mathexp.xsp	17 Dec 2003 09:59:12 -0000	1.3
  @@ -13,10 +13,8 @@
      <row>
       <column title="Mathematical expression">
   
  -     <p>
  -      <text xmlns="http://chaperon.sourceforge.net/schema/text/1.0"><xsp-request:get-parameter name="text" 
  -            default="3*a-5*6/7 + ( b-c)*5- b"/></text>
  -     </p>
  +     <text xmlns="http://chaperon.sourceforge.net/schema/text/1.0"><xsp-request:get-parameter name="text" 
  +           default="3*a-5*6/7 + ( b-c)*5- b"/></text>
   
        <p>
         <form action="mathexp.html" method="post">
  
  
  
  1.2       +1 -0      cocoon-2.1/src/blocks/chaperon/samples/stylesheets/grm2xgrm.xsl
  
  Index: grm2xgrm.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/stylesheets/grm2xgrm.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- grm2xgrm.xsl	9 Mar 2003 00:02:59 -0000	1.1
  +++ grm2xgrm.xsl	17 Dec 2003 09:59:12 -0000	1.2
  @@ -3,6 +3,7 @@
                   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                   xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0"
                   xmlns="http://chaperon.sourceforge.net/schema/grammar/1.0"
  +                xmlns:text="http://chaperon.sourceforge.net/schema/text/1.0"
                   exclude-result-prefixes="st text">
   
    <xsl:output indent="yes" method="xml" encoding="ASCII"/>
  
  
  
  1.2       +1 -0      cocoon-2.1/src/blocks/chaperon/samples/stylesheets/grm2xlex.xsl
  
  Index: grm2xlex.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/stylesheets/grm2xlex.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- grm2xlex.xsl	9 Mar 2003 00:02:59 -0000	1.1
  +++ grm2xlex.xsl	17 Dec 2003 09:59:12 -0000	1.2
  @@ -3,6 +3,7 @@
                   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                   xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0"
                   xmlns="http://chaperon.sourceforge.net/schema/lexicon/1.0"
  +                xmlns:text="http://chaperon.sourceforge.net/schema/text/1.0"
                   exclude-result-prefixes="st text">
   
    <xsl:output indent="yes" method="xml" encoding="ASCII"/>
  
  
  
  1.3       +64 -27    cocoon-2.1/src/blocks/chaperon/samples/stylesheets/mathexp2html.xsl
  
  Index: mathexp2html.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/stylesheets/mathexp2html.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mathexp2html.xsl	7 May 2003 16:50:40 -0000	1.2
  +++ mathexp2html.xsl	17 Dec 2003 09:59:12 -0000	1.3
  @@ -3,40 +3,77 @@
                   xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0"
                   version="1.0">
   
  + <xsl:template match="st:output">
  +  <p>
  +   <!--<xsl:apply-templates select="*[name()!='error']"/>-->
  +   <xsl:for-each select="*[name()!='error']">
  +    <xsl:apply-templates select="."/><br/>
  +   </xsl:for-each>
  +   <xsl:if test="st:error">
  +    <ul>
  +     <xsl:for-each select="st:error">
  +      <li><font color="#ff0000"><xsl:value-of select="."/></font></li>
  +     </xsl:for-each>
  +    </ul>
  +   </xsl:if>
  +  </p>
  + </xsl:template>
  +
    <xsl:template match="st:E">
  -  <table bgcolor="#a0ffff" cellspacing="1">
  -   <tr>
  -    <xsl:for-each select="child::node()">
  -     <td>
  -      <xsl:apply-templates select="."/>
  -     </td>
  -    </xsl:for-each>
  -   </tr>
  -  </table>
  +  <xsl:choose>
  +   <xsl:when test="count(*)">
  +    <table bgcolor="#a0ffff" cellspacing="1">
  +     <tr>
  +      <xsl:for-each select="child::node()">
  +       <td>
  +        <xsl:apply-templates select="."/>
  +       </td>
  +      </xsl:for-each>
  +     </tr>
  +    </table>
  +   </xsl:when>
  +   <xsl:otherwise>
  +    <xsl:apply-templates/>
  +   </xsl:otherwise>
  +  </xsl:choose>
    </xsl:template>
   
    <xsl:template match="st:F">
  -  <table bgcolor="#ffffa0" cellspacing="1">
  -   <tr>
  -    <xsl:for-each select="child::node()">
  -     <td>
  -      <xsl:apply-templates select="."/>
  -     </td>
  -    </xsl:for-each>
  -   </tr>
  -  </table>
  +  <xsl:choose>
  +   <xsl:when test="count(*)">
  +    <table bgcolor="#ffffa0" cellspacing="1">
  +     <tr>
  +      <xsl:for-each select="child::node()">
  +       <td>
  +        <xsl:apply-templates select="."/>
  +       </td>
  +      </xsl:for-each>
  +     </tr>
  +    </table>
  +   </xsl:when>
  +   <xsl:otherwise>
  +    <xsl:apply-templates/>
  +   </xsl:otherwise>
  +  </xsl:choose>
    </xsl:template>
   
    <xsl:template match="st:T">
  -  <table bgcolor="#ffa0ff" cellspacing="1">
  -   <tr>
  -    <xsl:for-each select="child::node()">
  -     <td>
  -      <xsl:apply-templates select="."/>
  -     </td>
  -    </xsl:for-each>
  -   </tr>
  -  </table>
  +  <xsl:choose>
  +   <xsl:when test="count(*)">
  +    <table bgcolor="#ffa0ff" cellspacing="1">
  +     <tr>
  +      <xsl:for-each select="child::node()">
  +       <td>
  +        <xsl:apply-templates select="."/>
  +       </td>
  +      </xsl:for-each>
  +     </tr>
  +    </table>
  +   </xsl:when>
  +   <xsl:otherwise>
  +    <xsl:apply-templates/>
  +   </xsl:otherwise>
  +  </xsl:choose>
    </xsl:template>
   
    <xsl:template match="@*|*|text()|processing-instruction()" priority="-1">