forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r527028 [2/4] - in /forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki: ./ resources/chaperon/ resources/chaperon/misc/ resources/chaperon/stylesheets/ src/documentation/ src/documentation/content/xdocs/ src/documentation/content/xd...
Date Tue, 10 Apr 2007 04:57:57 GMT
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/error2page.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/error2page.xsl?view=diff&rev=527028&r1=527027&r2=527028
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/error2page.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/error2page.xsl Mon Apr  9 21:57:55 2007
@@ -15,71 +15,75 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
 <xsl:stylesheet version="1.0"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:lex="http://chaperon.sourceforge.net/schema/lexer/2.0"
                 xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/2.0">
-
- <xsl:param name="contextPath"/>
-
- <!-- let sitemap override default page title -->
- <xsl:param name="pageTitle" select="//parse-exception/message"/>
-
- <xsl:template match="header">
-  <xsl:copy>
-   <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
-   <style href="error.css"/>
-  </xsl:copy>
- </xsl:template>
-
- <xsl:template match="st:output[st:error]">
-  <row>
-   <column title="{st:error/@message}">
-
-    <p class="extra"><span class="description">column&#160;</span><xsl:value-of select="st:error/@column"/></p>
-    <p class="extra"><span class="description">line&#160;</span><xsl:value-of select="st:error/@line"/></p>
-    <xsl:if test="source">
-     <p class="extra"><span class="description">source&#160;</span><xsl:value-of select="@source"/></p>
-    </xsl:if>
-
-    <xsl:apply-templates select="st:error"/>
-
-   </column>
-  </row>
- </xsl:template>
-
- <xsl:template match="st:error">
-  <xsl:variable name="line" select="number(@line)"/>
-
-  <p class="topped">
-   <pre class="error">
-    <xsl:apply-templates select="lex:output/lex:lexeme[(number(@line) &lt; $line) and (number(@line) &gt; number($line - 10))]" mode="lt"/>
-    <xsl:apply-templates select="lex:output/lex:lexeme[number(@line) = $line]" mode="eq"/>
-    <xsl:apply-templates select="lex:output/lex:lexeme[(number(@line) &gt; $line) and (number(@line) &lt; number($line + 10))]" mode="gt"/>
-   </pre>
-  </p>
- </xsl:template>
-
- <xsl:template match="lex:lexeme" mode="lt">
-  <xsl:value-of select="@line"/>&#160;:&#160;<span class="lt"><xsl:value-of select="@text"/></span>
- </xsl:template>
-
- <xsl:template match="lex:lexeme" mode="eq">
-  <xsl:variable name="column" select="number(../../@column)"/>
-  <xsl:value-of select="@line"/>&#160;:&#160;<span class="lt"><xsl:value-of select="substring(@text, 1, $column - 1)"/></span>
-  <span class="eq"><xsl:value-of select="substring(@text, $column, 1)"/></span>
-  <span class="gt"><xsl:value-of select="substring(@text, $column + 1, string-length(@text) - $column)"/></span>
- </xsl:template>
-
- <xsl:template match="lex:lexeme" mode="gt">
-  <xsl:value-of select="@line"/>&#160;:&#160;<span class="gt"><xsl:value-of select="@text"/></span>
- </xsl:template>
-
- <xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
-  <xsl:copy>
-   <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
-  </xsl:copy>
- </xsl:template>
-
+  <xsl:param name="contextPath"/>
+<!-- let sitemap override default page title -->
+  <xsl:param name="pageTitle" select="//parse-exception/message"/>
+  <xsl:template match="header">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
+      <style href="error.css"/>
+    </xsl:copy>
+  </xsl:template>
+  <xsl:template match="st:output[st:error]">
+    <row>
+      <column title="{st:error/@message}">
+        <p class="extra">
+          <span class="description">column&#160;</span>
+          <xsl:value-of select="st:error/@column"/>
+        </p>
+        <p class="extra">
+          <span class="description">line&#160;</span>
+          <xsl:value-of select="st:error/@line"/>
+        </p>
+        <xsl:if test="source">
+          <p class="extra">
+            <span class="description">source&#160;</span>
+            <xsl:value-of select="@source"/>
+          </p>
+        </xsl:if>
+        <xsl:apply-templates select="st:error"/>
+      </column>
+    </row>
+  </xsl:template>
+  <xsl:template match="st:error">
+    <xsl:variable name="line" select="number(@line)"/>
+    <p class="topped">
+      <pre class="error">
+        <xsl:apply-templates select="lex:output/lex:lexeme[(number(@line) &lt; $line) and (number(@line) &gt; number($line - 10))]" mode="lt"/>
+        <xsl:apply-templates select="lex:output/lex:lexeme[number(@line) = $line]" mode="eq"/>
+        <xsl:apply-templates select="lex:output/lex:lexeme[(number(@line) &gt; $line) and (number(@line) &lt; number($line + 10))]" mode="gt"/>
+      </pre>
+    </p>
+  </xsl:template>
+  <xsl:template match="lex:lexeme" mode="lt">
+    <xsl:value-of select="@line"/>&#160;:&#160;<span class="lt">
+      <xsl:value-of select="@text"/>
+    </span>
+  </xsl:template>
+  <xsl:template match="lex:lexeme" mode="eq">
+    <xsl:variable name="column" select="number(../../@column)"/>
+    <xsl:value-of select="@line"/>&#160;:&#160;<span class="lt">
+      <xsl:value-of select="substring(@text, 1, $column - 1)"/>
+    </span>
+    <span class="eq">
+      <xsl:value-of select="substring(@text, $column, 1)"/>
+    </span>
+    <span class="gt">
+      <xsl:value-of select="substring(@text, $column + 1, string-length(@text) - $column)"/>
+    </span>
+  </xsl:template>
+  <xsl:template match="lex:lexeme" mode="gt">
+    <xsl:value-of select="@line"/>&#160;:&#160;<span class="gt">
+      <xsl:value-of select="@text"/>
+    </span>
+  </xsl:template>
+  <xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
+    </xsl:copy>
+  </xsl:template>
 </xsl:stylesheet>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/error4wiki.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/error4wiki.xsl?view=diff&rev=527028&r1=527027&r2=527028
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/error4wiki.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/error4wiki.xsl Mon Apr  9 21:57:55 2007
@@ -20,18 +20,17 @@
                 xmlns:xi="http://www.w3.org/2001/XInclude"
                 xmlns:text="http://chaperon.sourceforge.net/schema/text/1.0"
                 xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/2.0">
-
- <xsl:template match="st:output/st:error">
-  <xsl:copy>
-   <xsl:copy-of select="@*"/>
-   <text:text source="{../@source}" line="1" column="1"><xsl:value-of select="."/></text:text>
-  </xsl:copy>
- </xsl:template>
-
- <xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
-  <xsl:copy>
-   <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
-  </xsl:copy>
- </xsl:template>
-
+  <xsl:template match="st:output/st:error">
+    <xsl:copy>
+      <xsl:copy-of select="@*"/>
+      <text:text source="{../@source}" line="1" column="1">
+        <xsl:value-of select="."/>
+      </text:text>
+    </xsl:copy>
+  </xsl:template>
+  <xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
+    </xsl:copy>
+  </xsl:template>
 </xsl:stylesheet>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/grm2xgrm.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/grm2xgrm.xsl?view=diff&rev=527028&r1=527027&r2=527028
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/grm2xgrm.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/grm2xgrm.xsl Mon Apr  9 21:57:55 2007
@@ -21,61 +21,56 @@
                 xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/2.0"
                 xmlns="http://chaperon.sourceforge.net/schema/grammar/1.0"
                 exclude-result-prefixes="st text">
-
- <xsl:output indent="yes" method="xml" encoding="ASCII"/>
-
- <xsl:template match="st:output/st:grammar" >
-  <grammar><xsl:comment>This file was generated! Don't edit!</xsl:comment>
-   <priority>
-    <xsl:apply-templates select="st:token_decls/st:token_decl" mode="priority"/>
-   </priority>
-   <xsl:apply-templates select="st:token_decls/st:token_decl" mode="associativity"/>
-   <xsl:apply-templates select="st:production_decls"/>
-   <xsl:apply-templates select="st:token_decls/st:start_decl"/>
-  </grammar>
- </xsl:template>
-
- <xsl:template match="st:token_decl" mode="priority">
-  <terminal symbol="{st:id}"/>
- </xsl:template>
-
- <xsl:template match="st:token_decl" mode="associativity">
-  <xsl:if test="st:token_decl = '%left'">
-   <associativity symbol="{st:id}" type="left"/>
-  </xsl:if>
-  <xsl:if test="st:token_decl = '%right'">
-   <associativity symbol="{st:id}" type="right"/>
-  </xsl:if>
- </xsl:template>
-
- <xsl:template match="st:production_decls" >
-  <xsl:for-each select="st:production_decl/st:production_defs/st:production_def">
-   <production>
-    <xsl:attribute name="symbol"><xsl:value-of select="../../st:id"/></xsl:attribute>
-     
-    <xsl:if test="st:prec_decl">
-     <xsl:attribute name="precedence"><xsl:value-of select="st:prec_decl/st:id"/></xsl:attribute>
+  <xsl:output indent="yes" method="xml" encoding="ASCII"/>
+  <xsl:template match="st:output/st:grammar" >
+    <grammar>
+      <xsl:comment>This file was generated! Don't edit!</xsl:comment>
+      <priority>
+        <xsl:apply-templates select="st:token_decls/st:token_decl" mode="priority"/>
+      </priority>
+      <xsl:apply-templates select="st:token_decls/st:token_decl" mode="associativity"/>
+      <xsl:apply-templates select="st:production_decls"/>
+      <xsl:apply-templates select="st:token_decls/st:start_decl"/>
+    </grammar>
+  </xsl:template>
+  <xsl:template match="st:token_decl" mode="priority">
+    <terminal symbol="{st:id}"/>
+  </xsl:template>
+  <xsl:template match="st:token_decl" mode="associativity">
+    <xsl:if test="st:token_decl = '%left'">
+      <associativity symbol="{st:id}" type="left"/>
     </xsl:if>
-
-    <xsl:apply-templates select="st:ids/st:id"/>
-   </production>
-  </xsl:for-each>
- </xsl:template>
-
- <xsl:template match="st:id" >
-  <xsl:variable name="symbol" select="text()"/>
-  <xsl:choose>
-   <xsl:when test="/st:output/st:grammar/st:token_decls/st:token_decl/st:id[.=$symbol]">
-    <terminal symbol="{.}"/>
-   </xsl:when>
-   <xsl:otherwise>
-    <nonterminal symbol="{.}"/>
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
- <xsl:template match="st:start_decl" >
-  <start symbol="{st:id}"/>
- </xsl:template>
-
+    <xsl:if test="st:token_decl = '%right'">
+      <associativity symbol="{st:id}" type="right"/>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="st:production_decls" >
+    <xsl:for-each select="st:production_decl/st:production_defs/st:production_def">
+      <production>
+        <xsl:attribute name="symbol">
+          <xsl:value-of select="../../st:id"/>
+        </xsl:attribute>
+        <xsl:if test="st:prec_decl">
+          <xsl:attribute name="precedence">
+            <xsl:value-of select="st:prec_decl/st:id"/>
+          </xsl:attribute>
+        </xsl:if>
+        <xsl:apply-templates select="st:ids/st:id"/>
+      </production>
+    </xsl:for-each>
+  </xsl:template>
+  <xsl:template match="st:id" >
+    <xsl:variable name="symbol" select="text()"/>
+    <xsl:choose>
+      <xsl:when test="/st:output/st:grammar/st:token_decls/st:token_decl/st:id[.=$symbol]">
+        <terminal symbol="{.}"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <nonterminal symbol="{.}"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="st:start_decl" >
+    <start symbol="{st:id}"/>
+  </xsl:template>
 </xsl:stylesheet>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/grm2xlex.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/grm2xlex.xsl?view=diff&rev=527028&r1=527027&r2=527028
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/grm2xlex.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/grm2xlex.xsl Mon Apr  9 21:57:55 2007
@@ -21,229 +21,224 @@
                 xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/2.0"
                 xmlns="http://chaperon.sourceforge.net/schema/lexicon/1.0"
                 exclude-result-prefixes="st text">
-
- <xsl:output indent="yes" method="xml" encoding="ASCII"/>
-
- <xsl:template match="st:output/st:grammar" >
-  <lexicon><xsl:comment>This file was generated! Don't edit!</xsl:comment>
-   <xsl:apply-templates select="st:token_decls/st:token_decl | st:token_decls/st:ignorabletoken_decl"/>
-  </lexicon>
- </xsl:template>
-
- <xsl:template match="st:token_decl" >
-  <lexeme symbol="{st:id}">
-   <xsl:if test="st:token_decl = '%left'">
-    <xsl:attribute name="assoc">left</xsl:attribute>
-   </xsl:if>
-   <xsl:if test="st:token_decl = '%right'">
-    <xsl:attribute name="assoc">right</xsl:attribute>
-   </xsl:if>
-   <xsl:apply-templates select="st:output/st:regexexpression"/>
-  </lexeme>
- </xsl:template>
-
- <xsl:template match="st:ignorabletoken_decl" >
-  <lexeme>
-   <xsl:apply-templates select="st:output/st:regexexpression"/>
-  </lexeme>
- </xsl:template>
-
- <xsl:template match="st:regexexpression" >
-  <xsl:apply-templates select="st:regexalternation"/>
- </xsl:template>
-
- <xsl:template match="st:regexalternation" >
-  <xsl:choose>
-   <xsl:when test="count(st:regexconcatenation)>1">
-    <alt>
-     <xsl:apply-templates select="st:regexconcatenation"/>
-    </alt>
-   </xsl:when>
-   <xsl:otherwise>
-    <xsl:apply-templates select="st:regexconcatenation"/>
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
- <xsl:template match="st:regexconcatenation" >
-  <xsl:choose>
-   <xsl:when test="count(st:regexquantifier)>1">
-    <concat>
-     <xsl:apply-templates select="st:regexquantifier"/>
+  <xsl:output indent="yes" method="xml" encoding="ASCII"/>
+  <xsl:template match="st:output/st:grammar" >
+    <lexicon>
+      <xsl:comment>This file was generated! Don't edit!</xsl:comment>
+      <xsl:apply-templates select="st:token_decls/st:token_decl | st:token_decls/st:ignorabletoken_decl"/>
+    </lexicon>
+  </xsl:template>
+  <xsl:template match="st:token_decl" >
+    <lexeme symbol="{st:id}">
+      <xsl:if test="st:token_decl = '%left'">
+        <xsl:attribute name="assoc">left</xsl:attribute>
+      </xsl:if>
+      <xsl:if test="st:token_decl = '%right'">
+        <xsl:attribute name="assoc">right</xsl:attribute>
+      </xsl:if>
+      <xsl:apply-templates select="st:output/st:regexexpression"/>
+    </lexeme>
+  </xsl:template>
+  <xsl:template match="st:ignorabletoken_decl" >
+    <lexeme>
+      <xsl:apply-templates select="st:output/st:regexexpression"/>
+    </lexeme>
+  </xsl:template>
+  <xsl:template match="st:regexexpression" >
+    <xsl:apply-templates select="st:regexalternation"/>
+  </xsl:template>
+  <xsl:template match="st:regexalternation" >
+    <xsl:choose>
+      <xsl:when test="count(st:regexconcatenation)>1">
+        <alt>
+          <xsl:apply-templates select="st:regexconcatenation"/>
+        </alt>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates select="st:regexconcatenation"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="st:regexconcatenation" >
+    <xsl:choose>
+      <xsl:when test="count(st:regexquantifier)>1">
+        <concat>
+          <xsl:apply-templates select="st:regexquantifier"/>
+        </concat>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates select="st:regexquantifier"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="st:regexquantifier" >
+    <xsl:apply-templates select="st:regexoptional|st:regexstar|st:regexplus|st:regexterm|st:regexvar"/>
+  </xsl:template>
+  <xsl:template match="st:regexoptional" >
+    <concat minOccurs="0" maxOccurs="1">
+      <xsl:apply-templates select="st:regexterm"/>
     </concat>
-   </xsl:when>
-   <xsl:otherwise>
-    <xsl:apply-templates select="st:regexquantifier"/>
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
- <xsl:template match="st:regexquantifier" >
-  <xsl:apply-templates select="st:regexoptional|st:regexstar|st:regexplus|st:regexterm|st:regexvar"/>
- </xsl:template>
-
- <xsl:template match="st:regexoptional" >
-  <concat minOccurs="0" maxOccurs="1">
-   <xsl:apply-templates select="st:regexterm"/>
-  </concat>
- </xsl:template>
-
- <xsl:template match="st:regexstar" >
-  <concat minOccurs="0" maxOccurs="*">
-   <xsl:apply-templates select="st:regexterm"/>
-  </concat>
- </xsl:template>
-
- <xsl:template match="st:regexplus" >
-  <concat minOccurs="1" maxOccurs="*">
-   <xsl:apply-templates select="st:regexterm"/>
-  </concat>
- </xsl:template>
-
- <xsl:template match="st:regexvar">
-  <xsl:choose>
-   <xsl:when test="count(st:regexmultiplicator/st:string)=2">
-    <concat>
-     <xsl:attribute name="minOccurs"><xsl:value-of select="normalize-space(st:regexmultiplicator/st:string[1])"/></xsl:attribute>
-     <xsl:attribute name="maxOccurs"><xsl:value-of select="normalize-space(st:regexmultiplicator/st:string[2])"/></xsl:attribute>
-     <xsl:apply-templates select="st:regexterm"/>
+  </xsl:template>
+  <xsl:template match="st:regexstar" >
+    <concat minOccurs="0" maxOccurs="*">
+      <xsl:apply-templates select="st:regexterm"/>
     </concat>
-   </xsl:when>
-   <xsl:otherwise>
-    <concat>
-     <xsl:attribute name="minOccurs"><xsl:value-of select="normalize-space(st:regexmultiplicator/st:string)"/></xsl:attribute>
-     <xsl:attribute name="maxOccurs"><xsl:value-of select="normalize-space(st:regexmultiplicator/st:string)"/></xsl:attribute>
-     <xsl:apply-templates select="st:regexterm"/>
+  </xsl:template>
+  <xsl:template match="st:regexplus" >
+    <concat minOccurs="1" maxOccurs="*">
+      <xsl:apply-templates select="st:regexterm"/>
     </concat>
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
- <xsl:template match="st:regexterm">
-  <xsl:apply-templates select="st:characterclass|st:exclusivecharacterclass|st:regexklammer|st:string|st:maskedcharacter|st:regexdot|st:regexbol|st:regexabref"/>
- </xsl:template>
-
- <xsl:template match="st:regexklammer">
-  <xsl:apply-templates select="st:regexalternation"/>
- </xsl:template>
-
- <xsl:template match="st:regexdot">
-  <cclass exclusive="true">
-   <!--<cset content="&#10;&#13;"/>-->
-   <cset code="10"/>
-   <cset code="13"/>
-  </cclass>
- </xsl:template>
-
- <xsl:template match="st:regexbol">
-  <bol/>
- </xsl:template>
-
- <xsl:template match="st:regexeol">
-  <eol/>
- </xsl:template>
-
- <xsl:template match="st:regexabref">
-  <xsl:variable name="ref" select="translate(normalize-space(st:string), ' ', '')"/>
-  <xsl:apply-templates select="/st:output/st:grammar/st:token_decls/st:ab_decl[st:id=$ref]/st:output/st:regexexpression"/>
- </xsl:template>
-
- <xsl:template match="st:string" mode="name">
-  <xsl:for-each select="st:character"><xsl:value-of select="normalize-space(.)"/></xsl:for-each>
- </xsl:template>
-
- <xsl:template match="st:string">
-  <cstring>
-   <xsl:attribute name="content"><xsl:apply-templates select="st:character" mode="string"/></xsl:attribute>
-  </cstring>
- </xsl:template>
-
- <xsl:template match="st:characterclass">
-  <cclass>
-   <xsl:apply-templates select="st:sequence"/>
-  </cclass>
- </xsl:template>
-
- <xsl:template match="st:exclusivecharacterclass" >
-  <cclass exclusive="true">
-   <xsl:apply-templates select="st:sequence"/>
-  </cclass>
- </xsl:template>
-
- <xsl:template match="st:sequence">
-  <xsl:apply-templates select="st:character|st:maskedcharacter|st:intervall" mode="cclass"/>
- </xsl:template>
-
- <xsl:template match="st:character" mode="cclass">
-  <cset>
-   <xsl:attribute name="content"><xsl:value-of select="translate(normalize-space(.), ' ', '')"/></xsl:attribute>
-  </cset>
- </xsl:template>
-
- <xsl:template match="st:maskedcharacter" mode="cclass">
-  <cset>
-   <xsl:choose>
-    <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'n'">
+  </xsl:template>
+  <xsl:template match="st:regexvar">
+    <xsl:choose>
+      <xsl:when test="count(st:regexmultiplicator/st:string)=2">
+        <concat>
+          <xsl:attribute name="minOccurs">
+            <xsl:value-of select="normalize-space(st:regexmultiplicator/st:string[1])"/>
+          </xsl:attribute>
+          <xsl:attribute name="maxOccurs">
+            <xsl:value-of select="normalize-space(st:regexmultiplicator/st:string[2])"/>
+          </xsl:attribute>
+          <xsl:apply-templates select="st:regexterm"/>
+        </concat>
+      </xsl:when>
+      <xsl:otherwise>
+        <concat>
+          <xsl:attribute name="minOccurs">
+            <xsl:value-of select="normalize-space(st:regexmultiplicator/st:string)"/>
+          </xsl:attribute>
+          <xsl:attribute name="maxOccurs">
+            <xsl:value-of select="normalize-space(st:regexmultiplicator/st:string)"/>
+          </xsl:attribute>
+          <xsl:apply-templates select="st:regexterm"/>
+        </concat>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="st:regexterm">
+    <xsl:apply-templates select="st:characterclass|st:exclusivecharacterclass|st:regexklammer|st:string|st:maskedcharacter|st:regexdot|st:regexbol|st:regexabref"/>
+  </xsl:template>
+  <xsl:template match="st:regexklammer">
+    <xsl:apply-templates select="st:regexalternation"/>
+  </xsl:template>
+  <xsl:template match="st:regexdot">
+    <cclass exclusive="true">
+<!--<cset content="&#10;&#13;"/>-->
+      <cset code="10"/>
+      <cset code="13"/>
+    </cclass>
+  </xsl:template>
+  <xsl:template match="st:regexbol">
+    <bol/>
+  </xsl:template>
+  <xsl:template match="st:regexeol">
+    <eol/>
+  </xsl:template>
+  <xsl:template match="st:regexabref">
+    <xsl:variable name="ref" select="translate(normalize-space(st:string), ' ', '')"/>
+    <xsl:apply-templates select="/st:output/st:grammar/st:token_decls/st:ab_decl[st:id=$ref]/st:output/st:regexexpression"/>
+  </xsl:template>
+  <xsl:template match="st:string" mode="name">
+    <xsl:for-each select="st:character">
+      <xsl:value-of select="normalize-space(.)"/>
+    </xsl:for-each>
+  </xsl:template>
+  <xsl:template match="st:string">
+    <cstring>
+      <xsl:attribute name="content">
+        <xsl:apply-templates select="st:character" mode="string"/>
+      </xsl:attribute>
+    </cstring>
+  </xsl:template>
+  <xsl:template match="st:characterclass">
+    <cclass>
+      <xsl:apply-templates select="st:sequence"/>
+    </cclass>
+  </xsl:template>
+  <xsl:template match="st:exclusivecharacterclass" >
+    <cclass exclusive="true">
+      <xsl:apply-templates select="st:sequence"/>
+    </cclass>
+  </xsl:template>
+  <xsl:template match="st:sequence">
+    <xsl:apply-templates select="st:character|st:maskedcharacter|st:intervall" mode="cclass"/>
+  </xsl:template>
+  <xsl:template match="st:character" mode="cclass">
+    <cset>
+      <xsl:attribute name="content">
+        <xsl:value-of select="translate(normalize-space(.), ' ', '')"/>
+      </xsl:attribute>
+    </cset>
+  </xsl:template>
+  <xsl:template match="st:maskedcharacter" mode="cclass">
+    <cset>
+      <xsl:choose>
+        <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'n'">
 <!--     <xsl:attribute name="content"><xsl:text disable-output-escaping="yes">&#10;</xsl:text></xsl:attribute>-->
-     <xsl:attribute name="code">10</xsl:attribute>
-    </xsl:when>
-    <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'r'">
+          <xsl:attribute name="code">10</xsl:attribute>
+        </xsl:when>
+        <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'r'">
 <!--     <xsl:attribute name="content"><xsl:text disable-output-escaping="yes">&#13;</xsl:text></xsl:attribute>-->
-     <xsl:attribute name="code">13</xsl:attribute>
-    </xsl:when>
-    <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 't'">
+          <xsl:attribute name="code">13</xsl:attribute>
+        </xsl:when>
+        <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 't'">
 <!--     <xsl:attribute name="content"><xsl:text disable-output-escaping="yes">&#9;</xsl:text></xsl:attribute>-->
-     <xsl:attribute name="code">9</xsl:attribute>
-    </xsl:when>
-    <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'u'">
-     <xsl:attribute name="code">#<xsl:value-of select="substring(translate(normalize-space(.), ' ', ''),2,6)"/></xsl:attribute>
-    </xsl:when>
-    <xsl:when test="contains(.,'\ ')">
-     <xsl:attribute name="content"><xsl:text disable-output-escaping="yes">&#32;</xsl:text></xsl:attribute>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:attribute name="content"><xsl:value-of select="substring(translate(normalize-space(.), ' ', ''), 2,1)"/></xsl:attribute>
-    </xsl:otherwise>
-   </xsl:choose>
-  </cset>
- </xsl:template>
-
- <xsl:template match="st:character" mode="string">
-  <xsl:value-of select="translate(normalize-space(.), ' ', '')"/>
- </xsl:template>
- 
- <xsl:template match="st:maskedcharacter">
-  <xsl:choose>
-    <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'n'">
-     <!--<xsl:text disable-output-escaping="yes">&#10;</xsl:text>-->
-     <cstring code="10"/>
-    </xsl:when>
-    <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'r'">
-     <!--<xsl:text disable-output-escaping="yes">&#13;</xsl:text>-->
-     <cstring code="13"/>
-    </xsl:when>
-    <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 't'">
-     <!--<xsl:text disable-output-escaping="yes">&#9;</xsl:text>-->
-     <cstring code="9"/>
-    </xsl:when>
-    <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'u'">
-     <cstring code="#{substring(translate(normalize-space(.), ' ', ''), 2,6)}"/>
-    </xsl:when>
-    <xsl:when test="contains(.,'\ ')">
-     <!--<xsl:text disable-output-escaping="yes">&#32;</xsl:text>-->
-     <cstring content=" "/>
-    </xsl:when>
-    <xsl:otherwise>
-     <cstring content="{substring(translate(normalize-space(.), ' ', ''),2,1)}"/>
-    </xsl:otherwise>
-   </xsl:choose>
- </xsl:template>
-
- <xsl:template match="st:intervall" mode="cclass">
-  <cinterval>
-   <xsl:attribute name="min"><xsl:value-of select="st:character[1]"/></xsl:attribute>
-   <xsl:attribute name="max"><xsl:value-of select="st:character[2]"/></xsl:attribute>
-  </cinterval>
- </xsl:template>
-
+          <xsl:attribute name="code">9</xsl:attribute>
+        </xsl:when>
+        <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'u'">
+          <xsl:attribute name="code">#<xsl:value-of select="substring(translate(normalize-space(.), ' ', ''),2,6)"/>
+          </xsl:attribute>
+        </xsl:when>
+        <xsl:when test="contains(.,'\ ')">
+          <xsl:attribute name="content">
+<xsl:text disable-output-escaping="yes">&#32;</xsl:text>
+          </xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="content">
+            <xsl:value-of select="substring(translate(normalize-space(.), ' ', ''), 2,1)"/>
+          </xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+    </cset>
+  </xsl:template>
+  <xsl:template match="st:character" mode="string">
+    <xsl:value-of select="translate(normalize-space(.), ' ', '')"/>
+  </xsl:template>
+  <xsl:template match="st:maskedcharacter">
+    <xsl:choose>
+      <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'n'">
+<!--<xsl:text disable-output-escaping="yes">&#10;</xsl:text>-->
+        <cstring code="10"/>
+      </xsl:when>
+      <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'r'">
+<!--<xsl:text disable-output-escaping="yes">&#13;</xsl:text>-->
+        <cstring code="13"/>
+      </xsl:when>
+      <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 't'">
+<!--<xsl:text disable-output-escaping="yes">&#9;</xsl:text>-->
+        <cstring code="9"/>
+      </xsl:when>
+      <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'u'">
+        <cstring code="#{substring(translate(normalize-space(.), ' ', ''), 2,6)}"/>
+      </xsl:when>
+      <xsl:when test="contains(.,'\ ')">
+<!--<xsl:text disable-output-escaping="yes">&#32;</xsl:text>-->
+        <cstring content=" "/>
+      </xsl:when>
+      <xsl:otherwise>
+        <cstring content="{substring(translate(normalize-space(.), ' ', ''),2,1)}"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="st:intervall" mode="cclass">
+    <cinterval>
+      <xsl:attribute name="min">
+        <xsl:value-of select="st:character[1]"/>
+      </xsl:attribute>
+      <xsl:attribute name="max">
+        <xsl:value-of select="st:character[2]"/>
+      </xsl:attribute>
+    </cinterval>
+  </xsl:template>
 </xsl:stylesheet>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/java2html.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/java2html.xsl?view=diff&rev=527028&r1=527027&r2=527028
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/java2html.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/java2html.xsl Mon Apr  9 21:57:55 2007
@@ -18,439 +18,447 @@
 <xsl:stylesheet version="1.0"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                 xmlns:lex="http://chaperon.sourceforge.net/schema/lexer/2.0">
-
- <xsl:output indent="no"/>
-
- <xsl:param name="package"/>
- <xsl:param name="class"/>
-
- <xsl:param name="prefix">cocoon/samples/chaperon/</xsl:param>
-
- <xsl:template match="/lex:output">
-  <document>
-   <header>
-    <title>Java2HTML example</title>
-    <style href="java.css"/>
-   </header>
-   <body>
-    <row>
-     <column title="Source file: {$class}">
-      <pre class="srcLine"><xsl:apply-templates select="lex:lexeme"/></pre>
-     </column>
-    </row>
-   </body>
-  </document>
- </xsl:template>
-
- <xsl:template match="package">
-  <a href="/{$prefix}{translate(@full,'.','/')}/index.html"><xsl:value-of select="@full"/></a><br/>
- </xsl:template>
-
- <xsl:template match="class">
-  <a href="/{$prefix}{translate(@full,'.','/')}.java.html"><xsl:value-of select="@name"/></a><br/>
- </xsl:template>
-
- <xsl:template name="linenumber">
-  <xsl:param name="nr">1</xsl:param>
-  <xsl:param name="max">1</xsl:param>&#160;<xsl:value-of select="$nr"/><xsl:text>
-</xsl:text><xsl:if test="$nr &lt;= $max">
-   <xsl:call-template name="linenumber">
-     <xsl:with-param name="nr"  select="$nr + 1"/>
-     <xsl:with-param name="max" select="$max"/>
-   </xsl:call-template>
-  </xsl:if>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='ABSTRACT']">
-  <font class="ABSTRACT"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='BOOLEAN']">
-  <font class="BOOLEAN"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='BREAK']">
-  <font class="BREAK"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='BYTE']">
-  <font class="BYTE"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='CASE']">
-  <font class="CASE"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='CATCH']">
-  <font class="CATCH"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='CHAR']">
-  <font class="CHAR"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='CLASS']">
-  <font class="CLASS"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='CONST']">
-  <font class="CONST"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='CONTINUE']">
-  <font class="CONTINUE"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='DEFAULT']">
-  <font class="DEFAULT"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='DO']">
-  <font class="DO"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='DOUBLE']">
-  <font class="DOUBLE"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='ELSE']">
-  <font class="ELSE"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='EXTENDS']">
-  <font class="EXTENDS"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='FALSE']">
-  <font class="FALSE"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='FINAL']">
-  <font class="FINAL"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='FINALLY']">
-  <font class="FINALLY"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='FLOAT']">
-  <font class="FLOAT"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='FOR']">
-  <font class="FOR"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='GOTO']">
-  <font class="GOTO"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='IF']">
-  <font class="IF"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='IMPLEMENTS']">
-  <font class="IMPLEMENTS"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='IMPORT']">
-  <font class="IMPORT"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='INSTANCEOF']">
-  <font class="INSTANCEOF"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='INT']">
-  <font class="INT"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='INTERFACE']">
-  <font class="INTERFACE"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='LONG']">
-  <font class="LONG"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='NATIVE']">
-  <font class="NATIVE"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='NEW']">
-  <font class="NEW"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='PACKAGE']">
-  <font class="PACKAGE"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='PRIVATE']">
-  <font class="PRIVATE"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='PROTECTED']">
-  <font class="PROTECTED"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='PUBLIC']">
-  <font class="PUBLIC"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='RETURN']">
-  <font class="RETURN"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='SHORT']">
-  <font class="SHORT"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='STATIC']">
-  <font class="STATIC"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='SUPER']">
-  <font class="SUPER"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='SWITCH']">
-  <font class="SWITCH"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='SYCHRONIZED']">
-  <font class="SYCHRONIZED"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='THIS']">
-  <font class="THIS"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='THROW']">
-  <font class="THROW"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='THROWS']">
-  <font class="THROWS"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='TRANSIENT']">
-  <font class="TRANSIENT"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='TRUE']">
-  <font class="TRUE"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='TRY']">
-  <font class="TRY"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='VOID']">
-  <font class="VOID"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='VOLATILE']">
-  <font class="VOLATILE"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='WHILE']">
-  <font class="WHILE"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='LITERAL']">
-  <font class="LITERAL"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='IDENTIFIER']">
-  <font class="IDENTIFIER"><xsl:value-of select="@text"/></font> 
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='DOPEN']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='DCLOSE']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='COPEN']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-  
- <xsl:template match="lex:lexeme[@symbol='CCLOSE']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='BOPEN']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='BCLOSE']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='SEMICOLON']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='COMMA']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='DOT']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='OP_EQ']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='OP_LE']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='OP_GE']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='OP_NE']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='OP_LOR']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='OP_LAND']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='OP_INC']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='OP_DEC']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='OP_SHR']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='OP_SHL']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='OP_SHRR']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='ASS_OP']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='EQ']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='GT']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='LT']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='NOT']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='TILDE']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='QM']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='COLON']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='PLUS']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='MINUS']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='MULT']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='DIV']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='AND']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='OR']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='XOR']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='MOD']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='BOOLLIT']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='EOL']">
-  <xsl:text>
+  <xsl:output indent="no"/>
+  <xsl:param name="package"/>
+  <xsl:param name="class"/>
+  <xsl:param name="prefix">cocoon/samples/chaperon/</xsl:param>
+  <xsl:template match="/lex:output">
+    <document>
+      <header>
+        <title>Java2HTML example</title>
+        <style href="java.css"/>
+      </header>
+      <body>
+        <row>
+          <column title="Source file: {$class}">
+            <pre class="srcLine">
+              <xsl:apply-templates select="lex:lexeme"/>
+            </pre>
+          </column>
+        </row>
+      </body>
+    </document>
+  </xsl:template>
+  <xsl:template match="package"><a href="/{$prefix}{translate(@full,'.','/')}/index.html">
+    <xsl:value-of select="@full"/></a>
+    <br/>
+  </xsl:template>
+  <xsl:template match="class"><a href="/{$prefix}{translate(@full,'.','/')}.java.html">
+    <xsl:value-of select="@name"/></a>
+    <br/>
+  </xsl:template>
+  <xsl:template name="linenumber">
+    <xsl:param name="nr">1</xsl:param>
+    <xsl:param name="max">1</xsl:param>&#160;<xsl:value-of select="$nr"/>
+<xsl:text>
+</xsl:text>
+    <xsl:if test="$nr &lt;= $max">
+      <xsl:call-template name="linenumber">
+        <xsl:with-param name="nr"  select="$nr + 1"/>
+        <xsl:with-param name="max" select="$max"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='ABSTRACT']">
+    <font class="ABSTRACT">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='BOOLEAN']">
+    <font class="BOOLEAN">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='BREAK']">
+    <font class="BREAK">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='BYTE']">
+    <font class="BYTE">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='CASE']">
+    <font class="CASE">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='CATCH']">
+    <font class="CATCH">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='CHAR']">
+    <font class="CHAR">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='CLASS']">
+    <font class="CLASS">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='CONST']">
+    <font class="CONST">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='CONTINUE']">
+    <font class="CONTINUE">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='DEFAULT']">
+    <font class="DEFAULT">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='DO']">
+    <font class="DO">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='DOUBLE']">
+    <font class="DOUBLE">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='ELSE']">
+    <font class="ELSE">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='EXTENDS']">
+    <font class="EXTENDS">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='FALSE']">
+    <font class="FALSE">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='FINAL']">
+    <font class="FINAL">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='FINALLY']">
+    <font class="FINALLY">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='FLOAT']">
+    <font class="FLOAT">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='FOR']">
+    <font class="FOR">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='GOTO']">
+    <font class="GOTO">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='IF']">
+    <font class="IF">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='IMPLEMENTS']">
+    <font class="IMPLEMENTS">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='IMPORT']">
+    <font class="IMPORT">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='INSTANCEOF']">
+    <font class="INSTANCEOF">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='INT']">
+    <font class="INT">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='INTERFACE']">
+    <font class="INTERFACE">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='LONG']">
+    <font class="LONG">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='NATIVE']">
+    <font class="NATIVE">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='NEW']">
+    <font class="NEW">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='PACKAGE']">
+    <font class="PACKAGE">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='PRIVATE']">
+    <font class="PRIVATE">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='PROTECTED']">
+    <font class="PROTECTED">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='PUBLIC']">
+    <font class="PUBLIC">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='RETURN']">
+    <font class="RETURN">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='SHORT']">
+    <font class="SHORT">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='STATIC']">
+    <font class="STATIC">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='SUPER']">
+    <font class="SUPER">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='SWITCH']">
+    <font class="SWITCH">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='SYCHRONIZED']">
+    <font class="SYCHRONIZED">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='THIS']">
+    <font class="THIS">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='THROW']">
+    <font class="THROW">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='THROWS']">
+    <font class="THROWS">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='TRANSIENT']">
+    <font class="TRANSIENT">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='TRUE']">
+    <font class="TRUE">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='TRY']">
+    <font class="TRY">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='VOID']">
+    <font class="VOID">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='VOLATILE']">
+    <font class="VOLATILE">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='WHILE']">
+    <font class="WHILE">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='LITERAL']">
+    <font class="LITERAL">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='IDENTIFIER']">
+    <font class="IDENTIFIER">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='DOPEN']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='DCLOSE']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='COPEN']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='CCLOSE']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='BOPEN']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='BCLOSE']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='SEMICOLON']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='COMMA']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='DOT']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='OP_EQ']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='OP_LE']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='OP_GE']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='OP_NE']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='OP_LOR']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='OP_LAND']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='OP_INC']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='OP_DEC']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='OP_SHR']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='OP_SHL']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='OP_SHRR']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='ASS_OP']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='EQ']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='GT']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='LT']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='NOT']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='TILDE']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='QM']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='COLON']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='PLUS']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='MINUS']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='MULT']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='DIV']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='AND']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='OR']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='XOR']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='MOD']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='BOOLLIT']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='EOL']">
+<xsl:text>
 &#160;</xsl:text>
 <!--  <br/>-->
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='SPACES']"><xsl:value-of select="@text"/></xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='TAB']">
-  <xsl:text>  </xsl:text>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='JAVADOC']">
-  <font class="MultiLineComment">/*<xsl:apply-templates select="lex:output/*"/>/</font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='MULTILINECOMMENT']">
-  <font class="MultiLineComment"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='SINGLEMULTILINECOMMENT']">
-  <font class="MultiLineComment"><xsl:value-of select="@text"/></font>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='ASTERISK']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='TEXT']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='TAG']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
- <xsl:template match="lex:lexeme[@symbol='PROPERTYNAME']">
-  <xsl:value-of select="@text"/>
- </xsl:template>
-
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='SPACES']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='TAB']">
+<xsl:text>  </xsl:text>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='JAVADOC']">
+    <font class="MultiLineComment">/*<xsl:apply-templates select="lex:output/*"/>/</font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='MULTILINECOMMENT']">
+    <font class="MultiLineComment">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='SINGLEMULTILINECOMMENT']">
+    <font class="MultiLineComment">
+      <xsl:value-of select="@text"/>
+    </font>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='ASTERISK']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='TEXT']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='TAG']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
+  <xsl:template match="lex:lexeme[@symbol='PROPERTYNAME']">
+    <xsl:value-of select="@text"/>
+  </xsl:template>
 </xsl:stylesheet>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/mathexp2html.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/mathexp2html.xsl?view=diff&rev=527028&r1=527027&r2=527028
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/mathexp2html.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/mathexp2html.xsl Mon Apr  9 21:57:55 2007
@@ -18,80 +18,73 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                 xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/2.0"
                 version="1.0">
-
- <xsl:template match="st:output">
-  <p>
-   <xsl:apply-templates/>
-  </p>
- </xsl:template>
-
- <xsl:template match="st:E">
-  <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">
-  <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">
-  <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="st:number|st:id|st:plus|st:mult|st:dopen|st:dclose">
-  <font size="3">
-   <xsl:value-of select="."/>
-  </font>
- </xsl:template>
-
- <xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
-  <xsl:copy>
-   <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
-  </xsl:copy>
- </xsl:template>
-
+  <xsl:template match="st:output">
+    <p>
+      <xsl:apply-templates/>
+    </p>
+  </xsl:template>
+  <xsl:template match="st:E">
+    <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">
+    <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">
+    <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="st:number|st:id|st:plus|st:mult|st:dopen|st:dclose">
+    <font size="3">
+      <xsl:value-of select="."/>
+    </font>
+  </xsl:template>
+  <xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
+    </xsl:copy>
+  </xsl:template>
 </xsl:stylesheet>



Mime
View raw message