You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by ni...@apache.org on 2004/01/23 10:50:32 UTC
cvs commit: xml-forrest/src/core/context/resources/chaperon/stylesheets egrm2xegrm.xsl error2html.xsl error2page.xsl error4wiki.xsl text4error.xsl class2html.xsl grm2xgrm.xsl grm2xlex.xsl java2html.xsl mathexp2html.xsl pattern2link.xsl quote2page.xsl remove4class.xsl text4javadoc.xsl text4javadoc2.xsl text4regex.xsl wiki2html.xsl wiki2xdoc.xsl xdoc2html.xsl
nicolaken 2004/01/23 01:50:32
Modified: src/core/context/resources/chaperon/stylesheets
class2html.xsl grm2xgrm.xsl grm2xlex.xsl
java2html.xsl mathexp2html.xsl pattern2link.xsl
quote2page.xsl remove4class.xsl text4javadoc.xsl
text4javadoc2.xsl text4regex.xsl wiki2html.xsl
wiki2xdoc.xsl xdoc2html.xsl
Added: src/core/context/resources/chaperon/stylesheets
egrm2xegrm.xsl error2html.xsl error2page.xsl
error4wiki.xsl text4error.xsl
Log:
Update chaperon block
Revision Changes Path
1.2 +26 -109 xml-forrest/src/core/context/resources/chaperon/stylesheets/class2html.xsl
Index: class2html.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/stylesheets/class2html.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- class2html.xsl 28 Nov 2003 11:04:28 -0000 1.1
+++ class2html.xsl 23 Jan 2004 09:50:31 -0000 1.2
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0">
+ xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/2.0">
<xsl:output indent="no"/>
@@ -10,93 +10,26 @@
<xsl:param name="prefix">cocoon/samples/chaperon/</xsl:param>
- <xsl:template match="/java">
- <html>
- <head>
- <title>Java2HTML</title>
- <link rel="stylesheet" type="text/css" href="java.css" title="Style"/>
- </head>
- <body>
-
- <table>
- <tr>
- <td align="left" valign="top">
- <p>
- <table width="100%" cellpadding="3" cellspacing="0" class="view">
- <tr>
- <td valign="top" class="headerTitle">
- <b>Packages</b>
- </td>
- </tr>
- <tr>
- <td class="headerRight">
- <xsl:apply-templates select="packages/package"/>
- </td>
- </tr>
- </table>
- </p>
- <p>
- <table width="100%" cellpadding="3" cellspacing="0" class="view">
- <tr>
- <td valign="top" class="headerTitle">
- <b>Classes</b>
- </td>
- </tr>
- <tr>
- <td class="headerRight">
- <xsl:apply-templates select="packages/classes/class"/>
- </td>
- </tr>
- </table>
- </p>
- </td>
- <td width="100%" align="left" valign="top">
-
- <p>
- <table width="100%" cellpadding="3" cellspacing="0" class="view">
- <tr>
- <td valign="top" class="headerTitle">
- <div class="navBar">
- <a href="index.html"><b>Package</b></a>   
- <font class="current">Class</font>   
- <a href="{$class}.java.html"><b>File</b></a>
- </div>
- </td>
- </tr>
- </table>
- </p>
+ <xsl:template match="/st:output">
+ <document>
+ <header>
+ <title>Java2HTML example</title>
+ <style href="java.css"/>
+ </header>
+ <body>
+ <row>
+ <column title="Source file: {$class}">
<xsl:call-template name="header"/>
<xsl:call-template name="declaration"/>
- </td>
- </tr>
- </table>
-
- <p>
- <table width="100%">
- <tr><td class="hbreak"> </td></tr>
- <tr>
- <td class="footer">
- <table>
- <tr>
- <td>
- <i>Generated by</i>
- <a target="_new" href="http://chaperon.sourceforge.net">Chaperon</a>.
- </td>
- <td> </td>
- <td style="BORDER-LEFT: #9c9c9c 1px solid;"> </td>
- <td> </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </p>
+ </column>
+
+ </row>
+ </body>
+ </document>
- </body>
- </html>
</xsl:template>
<xsl:template match="package">
@@ -131,7 +64,7 @@
st:TypeDeclaration/st:ClassHeader/st:IDENTIFIER"/></td>
<td class="itemRight"><xsl:apply-templates select="st:CompilationUnit/st:ProgramFile/
st:TypeDeclarations/st:TypeDeclarationOptSemi/
- st:TypeDeclaration/st:JavaDoc" mode="short"/> </td>
+ st:TypeDeclaration/st:output/st:JavaDoc" mode="short"/> </td>
</tr>
</tbody>
</table>
@@ -215,7 +148,7 @@
<xsl:value-of select="st:VariableDeclarators/st:VariableDeclarator/st:DeclaratorName"/>
</td>
<td class="itemRight">
- <xsl:apply-templates select="st:JavaDoc" mode="short"/> 
+ <xsl:apply-templates select="st:output/st:JavaDoc" mode="short"/> 
</td>
</tr>
</xsl:if>
@@ -243,7 +176,7 @@
</nobr>
</td>
<td class="itemRight">
- <xsl:apply-templates select="st:JavaDoc" mode="short"/> 
+ <xsl:apply-templates select="st:output/st:JavaDoc" mode="short"/> 
</td>
</tr>
</xsl:template>
@@ -271,7 +204,7 @@
</nobr>
</td>
<td class="itemRight">
- <xsl:apply-templates select="st:JavaDoc" mode="short"/> 
+ <xsl:apply-templates select="st:output/st:JavaDoc" mode="short"/> 
</td>
</tr>
</xsl:template>
@@ -281,7 +214,6 @@
<table width="100%" cellpadding="3" cellspacing="0" class="view">
<tr>
<td class="headerTitle" colspan="4">
-<!--<b> Method Detail </b>-->
<b>
<nobr>
<xsl:for-each select="st:Modifiers/st:Modifier">
@@ -300,22 +232,8 @@
<tr>
<td class="itemRight">
-<!-- <p>
- <nobr>
- <xsl:for-each select="st:Modifiers/st:Modifier">
- <xsl:value-of select="."/> 
- </xsl:for-each>
- <xsl:value-of select="st:TypeSpecifier"/> 
- <xsl:value-of select="st:MethodDeclarator/st:DeclaratorName"/>
- (<xsl:for-each select="st:MethodDeclarator/st:ParameterList/st:Parameter">
- <xsl:if test="position()!=1"> ,</xsl:if>
- <xsl:value-of select="st:TypeSpecifier/st:TypeName"/> <xsl:value-of select="st:DeclaratorName"/>
- </xsl:for-each>)
- </nobr>
- </p>-->
-
<dl>
- <dd><xsl:apply-templates select="st:JavaDoc"/></dd>
+ <dd><xsl:apply-templates select="st:output/st:JavaDoc"/></dd>
<dt><b>Parameters:</b></dt>
@@ -323,11 +241,10 @@
<dd>
<code><xsl:value-of select="st:DeclaratorName"/></code><xsl:text> - </xsl:text>
<xsl:variable name="name"><xsl:value-of select="st:DeclaratorName"/></xsl:variable>
- <xsl:for-each select="../../../st:JavaDoc/st:Properties/
+ <xsl:for-each select="../../../st:output/st:JavaDoc/st:Properties/
st:Property[substring-after(st:PROPERTYNAME,'@')='param']/st:Description">
<xsl:if test="starts-with(.,$name)">
<xsl:value-of select="substring(.,string-length($name)+1,string-length(.)-string-length($name))"/>
-<!-- <xsl:value-of select="."/>-->
</xsl:if>
</xsl:for-each>
</dd>
@@ -336,10 +253,10 @@
<dt><b>Returns:</b></dt>
<dd>
<code><xsl:value-of select="st:TypeSpecifier"/></code>
- <xsl:if test="st:JavaDoc/st:Properties/st:Property[substring-after(st:PROPERTYNAME,'@')='return']/st:Description">
+ <xsl:if test="st:output/st:JavaDoc/st:Properties/st:Property[substring-after(st:PROPERTYNAME,'@')='return']/st:Description">
<xsl:text> - </xsl:text>
</xsl:if>
- <xsl:value-of select="st:JavaDoc/st:Properties/st:Property[substring-after(st:PROPERTYNAME,'@')='return']/st:Description"/>
+ <xsl:value-of select="st:output/st:JavaDoc/st:Properties/st:Property[substring-after(st:PROPERTYNAME,'@')='return']/st:Description"/>
</dd>
</dl>
@@ -355,11 +272,11 @@
<xsl:template match="st:JavaDoc" mode="short">
<xsl:choose>
- <xsl:when test="string-length(substring-before(st:Description/st:TEXT,'.'))>0">
- <xsl:value-of select="substring-before(st:Description/st:TEXT,'.')"/>
+ <xsl:when test="string-length(substring-before(st:Description,'.'))>0">
+ <xsl:value-of select="substring-before(st:Description,'.')"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="st:Description/st:TEXT"/>
+ <xsl:value-of select="st:Description"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
1.2 +4 -3 xml-forrest/src/core/context/resources/chaperon/stylesheets/grm2xgrm.xsl
Index: grm2xgrm.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/stylesheets/grm2xgrm.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- grm2xgrm.xsl 28 Nov 2003 11:04:28 -0000 1.1
+++ grm2xgrm.xsl 23 Jan 2004 09:50:31 -0000 1.2
@@ -1,13 +1,14 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0"
+ xmlns:text="http://chaperon.sourceforge.net/schema/text/1.0"
+ 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:grammar" >
+ <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"/>
@@ -48,7 +49,7 @@
<xsl:template match="st:id" >
<xsl:variable name="symbol" select="text()"/>
<xsl:choose>
- <xsl:when test="/st:grammar/st:token_decls/st:token_decl/st:id[.=$symbol]">
+ <xsl:when test="/st:output/st:grammar/st:token_decls/st:token_decl/st:id[.=$symbol]">
<terminal symbol="{.}"/>
</xsl:when>
<xsl:otherwise>
1.2 +14 -5 xml-forrest/src/core/context/resources/chaperon/stylesheets/grm2xlex.xsl
Index: grm2xlex.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/stylesheets/grm2xlex.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- grm2xlex.xsl 28 Nov 2003 11:04:28 -0000 1.1
+++ grm2xlex.xsl 23 Jan 2004 09:50:31 -0000 1.2
@@ -1,13 +1,14 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0"
+ xmlns:text="http://chaperon.sourceforge.net/schema/text/1.0"
+ 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:grammar" >
+ <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>
@@ -21,13 +22,13 @@
<xsl:if test="st:token_decl = '%right'">
<xsl:attribute name="assoc">right</xsl:attribute>
</xsl:if>
- <xsl:apply-templates select="st:regexexpression"/>
+ <xsl:apply-templates select="st:output/st:regexexpression"/>
</lexeme>
</xsl:template>
<xsl:template match="st:ignorabletoken_decl" >
<lexeme>
- <xsl:apply-templates select="st:regexexpression"/>
+ <xsl:apply-templates select="st:output/st:regexexpression"/>
</lexeme>
</xsl:template>
@@ -112,6 +113,7 @@
<xsl:template match="st:regexdot">
<cclass exclusive="true">
+ <!--<cset content=" "/>-->
<cset code="10"/>
<cset code="13"/>
</cclass>
@@ -127,7 +129,7 @@
<xsl:template match="st:regexabref">
<xsl:variable name="ref" select="translate(normalize-space(st:string), ' ', '')"/>
- <xsl:apply-templates select="/st:grammar/st:token_decls/st:ab_decl[st:id=$ref]/st:regexexpression"/>
+ <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">
@@ -166,12 +168,15 @@
<cset>
<xsl:choose>
<xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'n'">
+<!-- <xsl:attribute name="content"><xsl:text disable-output-escaping="yes"> </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="content"><xsl:text disable-output-escaping="yes"> </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="content"><xsl:text disable-output-escaping="yes">	</xsl:text></xsl:attribute>-->
<xsl:attribute name="code">9</xsl:attribute>
</xsl:when>
<xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'u'">
@@ -194,18 +199,22 @@
<xsl:template match="st:maskedcharacter">
<xsl:choose>
<xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'n'">
+ <!--<xsl:text disable-output-escaping="yes"> </xsl:text>-->
<cstring code="10"/>
</xsl:when>
<xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'r'">
+ <!--<xsl:text disable-output-escaping="yes"> </xsl:text>-->
<cstring code="13"/>
</xsl:when>
<xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 't'">
+ <!--<xsl:text disable-output-escaping="yes">	</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"> </xsl:text>-->
<cstring content=" "/>
</xsl:when>
<xsl:otherwise>
1.2 +14 -111 xml-forrest/src/core/context/resources/chaperon/stylesheets/java2html.xsl
Index: java2html.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/stylesheets/java2html.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- java2html.xsl 28 Nov 2003 11:04:28 -0000 1.1
+++ java2html.xsl 23 Jan 2004 09:50:31 -0000 1.2
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:lex="http://chaperon.sourceforge.net/schema/lexemes/1.0">
+ xmlns:lex="http://chaperon.sourceforge.net/schema/lexer/2.0">
<xsl:output indent="no"/>
@@ -10,106 +10,20 @@
<xsl:param name="prefix">cocoon/samples/chaperon/</xsl:param>
- <xsl:template match="/java">
- <html>
- <head>
- <title>Java2HTML</title>
- <link rel="stylesheet" type="text/css" href="java.css" title="Style"/>
- </head>
+ <xsl:template match="/lex:output">
+ <document>
+ <header>
+ <title>Java2HTML example</title>
+ <style href="java.css"/>
+ </header>
<body>
-
- <table>
- <tr>
- <td align="left" valign="top">
- <p>
- <table width="100%" cellpadding="3" cellspacing="0" class="view">
- <tr>
- <td valign="top" class="headerTitle">
- <b>Packages</b>
- </td>
- </tr>
- <tr>
- <td class="headerRight">
- <xsl:apply-templates select="packages/package"/>
- </td>
- </tr>
- </table>
- </p>
- <p>
- <table width="100%" cellpadding="3" cellspacing="0" class="view">
- <tr>
- <td valign="top" class="headerTitle">
- <b>Classes</b>
- </td>
- </tr>
- <tr>
- <td class="headerRight">
- <xsl:apply-templates select="packages/classes/class"/>
- </td>
- </tr>
- </table>
- </p>
- </td>
- <td width="100%" align="left" valign="top">
-
- <p>
- <table width="100%" cellpadding="3" cellspacing="0" class="view">
- <tr>
- <td valign="top" class="headerTitle">
- <a href="index.html"><b>Package</b></a>   
- <a href="{$class}.class.html"><b>Class</b></a>   
- <font class="current">File</font>
- </td>
- </tr>
- </table>
- </p>
-
- <p>
- <table width="100%" cellspacing="0" cellpadding="0" class="view">
- <tr>
- <td class="headerTitle" colspan="2"><b><nobr> Source file: <xsl:value-of select="$class"/>.java </nobr></b></td>
- </tr>
- <tr>
- <td align="right" class="lineCount">
- <pre><xsl:call-template name="linenumber">
- <xsl:with-param name="max" select="count(//lex:lexeme[@symbol='EOL'])"/>
- </xsl:call-template>
- </pre>
- </td>
- <td class="srcLine">
- <pre class="srcLine"><xsl:apply-templates select="lex:lexemes/lex:lexeme"/></pre>
- </td>
- </tr>
- </table>
- </p>
-
- </td>
- </tr>
- </table>
-
- <p>
- <table width="100%">
- <tr><td class="hbreak" colspan="6"> </td></tr>
- <tr>
- <td class="footer" colspan="6">
- <table>
- <tr>
- <td>
- <i>Generated by</i>
- <a target="_new" href="http://chaperon.sourceforge.net">Chaperon</a>.
- </td>
- <td> </td>
- <td style="BORDER-LEFT: #9c9c9c 1px solid;"> </td>
- <td> </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </p>
-
+ <row>
+ <column title="Source file: {$class}">
+ <pre class="srcLine"><xsl:apply-templates select="lex:lexeme"/></pre>
+ </column>
+ </row>
</body>
- </html>
+ </document>
</xsl:template>
<xsl:template match="package">
@@ -496,11 +410,10 @@
</xsl:template>
<xsl:template match="lex:lexeme[@symbol='JAVADOC']">
- <font class="MultiLineComment">/*<xsl:apply-templates select="lex:lexemes/*"/>/</font>
+ <font class="MultiLineComment">/*<xsl:apply-templates select="lex:output/*"/>/</font>
</xsl:template>
<xsl:template match="lex:lexeme[@symbol='MULTILINECOMMENT']">
-<!-- <font class="MultiLineComment">/<xsl:apply-templates select="lex:lexemes/*"/>/</font>-->
<font class="MultiLineComment"><xsl:value-of select="@text"/></font>
</xsl:template>
@@ -523,15 +436,5 @@
<xsl:template match="lex:lexeme[@symbol='PROPERTYNAME']">
<xsl:value-of select="@text"/>
</xsl:template>
-
-<!-- <xsl:template match="text()" priority="-1">
- <xsl:value-of select="."/>
- </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>
1.2 +61 -28 xml-forrest/src/core/context/resources/chaperon/stylesheets/mathexp2html.xsl
Index: mathexp2html.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/stylesheets/mathexp2html.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mathexp2html.xsl 28 Nov 2003 11:04:28 -0000 1.1
+++ mathexp2html.xsl 23 Jan 2004 09:50:31 -0000 1.2
@@ -1,42 +1,75 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0"
+ 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">
- <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="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">
1.2 +1 -1 xml-forrest/src/core/context/resources/chaperon/stylesheets/pattern2link.xsl
Index: pattern2link.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/stylesheets/pattern2link.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pattern2link.xsl 28 Nov 2003 11:04:28 -0000 1.1
+++ pattern2link.xsl 23 Jan 2004 09:50:31 -0000 1.2
@@ -2,7 +2,7 @@
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:lex="http://chaperon.sourceforge.net/schema/lexemes/1.0">
+ xmlns:lex="http://chaperon.sourceforge.net/schema/lexemes/2.0">
<xsl:template match="lex:lexeme[@symbol='link']">
<a href="{@text}">
1.2 +9 -8 xml-forrest/src/core/context/resources/chaperon/stylesheets/quote2page.xsl
Index: quote2page.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/stylesheets/quote2page.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- quote2page.xsl 28 Nov 2003 11:04:28 -0000 1.1
+++ quote2page.xsl 23 Jan 2004 09:50:31 -0000 1.2
@@ -1,10 +1,10 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0"
- exclude-result-prefixes="st">
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/2.0"
+ exclude-result-prefixes="st">
- <xsl:template match="st:document">
+ <xsl:template match="st:output">
<document>
<header>
<title>Chaperon examples</title>
@@ -44,21 +44,22 @@
<th>Close</th>
<th>Volume</th>
</tr>
- <xsl:apply-templates/>
+ <xsl:apply-templates select="st:document/st:rows"/>
</table>
</section>
</body>
</document>
</xsl:template>
+ <xsl:template match="st:rows">
+ <xsl:apply-templates select="st:row"/>
+ </xsl:template>
+
<xsl:template match="st:row">
<tr>
<td><xsl:number/></td>
<xsl:apply-templates select="st:Value"/>
</tr>
- </xsl:template>
-
- <xsl:template match="st:Comma | st:SoftBreak">
</xsl:template>
<xsl:template match="st:Value">
1.2 +7 -1 xml-forrest/src/core/context/resources/chaperon/stylesheets/remove4class.xsl
Index: remove4class.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/stylesheets/remove4class.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- remove4class.xsl 28 Nov 2003 11:04:28 -0000 1.1
+++ remove4class.xsl 23 Jan 2004 09:50:31 -0000 1.2
@@ -2,7 +2,7 @@
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:lex="http://chaperon.sourceforge.net/schema/lexemes/1.0">
+ xmlns:lex="http://chaperon.sourceforge.net/schema/lexer/2.0">
<!-- <xsl:template match="lex:lexeme[@symbol='JAVADOCCOMMENT']">
</xsl:template>-->
@@ -17,6 +17,12 @@
</xsl:template>
<xsl:template match="lex:lexeme[@symbol='EOL']">
+ </xsl:template>
+
+ <xsl:template match="lex:lexeme[@symbol='SPACES']">
+ </xsl:template>
+
+ <xsl:template match="lex:lexeme[@symbol='TAB']">
</xsl:template>
<xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
1.2 +1 -1 xml-forrest/src/core/context/resources/chaperon/stylesheets/text4javadoc.xsl
Index: text4javadoc.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/stylesheets/text4javadoc.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- text4javadoc.xsl 28 Nov 2003 11:04:28 -0000 1.1
+++ text4javadoc.xsl 23 Jan 2004 09:50:31 -0000 1.2
@@ -2,7 +2,7 @@
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:lex="http://chaperon.sourceforge.net/schema/lexemes/1.0"
+ xmlns:lex="http://chaperon.sourceforge.net/schema/lexer/2.0"
xmlns:text="http://chaperon.sourceforge.net/schema/text/1.0">
<xsl:template match="lex:lexeme[@symbol='JAVADOC']">
1.2 +13 -2 xml-forrest/src/core/context/resources/chaperon/stylesheets/text4javadoc2.xsl
Index: text4javadoc2.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/stylesheets/text4javadoc2.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- text4javadoc2.xsl 28 Nov 2003 11:04:28 -0000 1.1
+++ text4javadoc2.xsl 23 Jan 2004 09:50:31 -0000 1.2
@@ -2,12 +2,23 @@
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0"
+ xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/2.0"
xmlns:text="http://chaperon.sourceforge.net/schema/text/1.0">
<xsl:template match="st:JAVADOC">
<xsl:variable name="text"><xsl:value-of select="."/></xsl:variable>
- <text:text><xsl:value-of select="substring($text,3,string-length($text)-3)"/></text:text>
+ <text:text>
+ <xsl:if test="//st:output/@source">
+ <xsl:attribute name="source"><xsl:value-of select="//st:output/@source"/></xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@line">
+ <xsl:attribute name="line"><xsl:value-of select="@line"/></xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@column">
+ <xsl:attribute name="column"><xsl:value-of select="number(@column) + 2"/></xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="substring($text,3,string-length($text)-3)"/>
+ </text:text>
</xsl:template>
<xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
1.2 +1 -1 xml-forrest/src/core/context/resources/chaperon/stylesheets/text4regex.xsl
Index: text4regex.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/stylesheets/text4regex.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- text4regex.xsl 28 Nov 2003 11:04:28 -0000 1.1
+++ text4regex.xsl 23 Jan 2004 09:50:31 -0000 1.2
@@ -2,7 +2,7 @@
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0"
+ xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/2.0"
xmlns:text="http://chaperon.sourceforge.net/schema/text/1.0"
exclude-result-prefixes="st">
1.2 +1 -1 xml-forrest/src/core/context/resources/chaperon/stylesheets/wiki2html.xsl
Index: wiki2html.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/stylesheets/wiki2html.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- wiki2html.xsl 28 Nov 2003 11:04:28 -0000 1.1
+++ wiki2html.xsl 23 Jan 2004 09:50:31 -0000 1.2
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0"
+ xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/2.0"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:output indent="yes" method="html"/>
1.4 +6 -6 xml-forrest/src/core/context/resources/chaperon/stylesheets/wiki2xdoc.xsl
Index: wiki2xdoc.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/stylesheets/wiki2xdoc.xsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- wiki2xdoc.xsl 1 Dec 2003 08:16:36 -0000 1.3
+++ wiki2xdoc.xsl 23 Jan 2004 09:50:31 -0000 1.4
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0"
+ xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/2.0"
exclude-result-prefixes="st">
<xsl:output indent="yes"
@@ -10,14 +10,14 @@
doctype-system="document-v11.dtd"
cdata-section-elements="source"/>
- <xsl:template match="st:document">
+ <xsl:template match="st:output">
<document>
<header>
- <title><xsl:value-of select="st:section/st:title/st:textsequence"/></title>
+ <title><xsl:value-of select="st:document/st:section/st:title/st:textsequence"/></title>
</header>
<body>
- <xsl:apply-templates select="st:paragraphs/st:paragraph/*" mode="paragraph"/>
- <xsl:apply-templates select="st:section"/>
+ <xsl:apply-templates select="st:document/st:paragraphs/st:paragraph/*" mode="paragraph"/>
+ <xsl:apply-templates select="st:document/st:section"/>
</body>
</document>
</xsl:template>
@@ -141,7 +141,7 @@
</link>
</xsl:when>
<xsl:otherwise>
- <link href="{$href}.html">
+ <link href="view.do?page={$href}">
<xsl:value-of select="$href"/>
</link>
</xsl:otherwise>
1.2 +1 -1 xml-forrest/src/core/context/resources/chaperon/stylesheets/xdoc2html.xsl
Index: xdoc2html.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/stylesheets/xdoc2html.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- xdoc2html.xsl 28 Nov 2003 11:04:28 -0000 1.1
+++ xdoc2html.xsl 23 Jan 2004 09:50:31 -0000 1.2
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0">
+ xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/2.0">
<xsl:output indent="yes"
method="xml"/>
1.1 xml-forrest/src/core/context/resources/chaperon/stylesheets/egrm2xegrm.xsl
Index: egrm2xegrm.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/2.0"
xmlns="http://chaperon.sourceforge.net/schema/grammar/2.0"
exclude-result-prefixes="st text">
<xsl:output indent="yes" method="xml" encoding="ASCII"/>
<xsl:template match="st:output/st:grammar">
<grammar>
<xsl:if test="not (st:start)">
bla
<xsl:message terminate="yes">
Start element is not defined!
</xsl:message>
</xsl:if>
<xsl:attribute name="start"><xsl:value-of select="st:start/st:name"/></xsl:attribute>
<xsl:comment>This file was generated! Don't edit!</xsl:comment>
<xsl:apply-templates select="st:definition"/>
</grammar>
</xsl:template>
<xsl:template match="st:definition">
<definition>
<xsl:attribute name="name"><xsl:value-of select="st:name"/></xsl:attribute>
<xsl:apply-templates select="st:regex"/>
</definition>
</xsl:template>
<xsl:template match="st:regex">
<xsl:apply-templates select="st:choice|st:sequence|st:quantifier"/>
</xsl:template>
<xsl:template match="st:element" >
<xsl:variable name="name" select="."/>
<xsl:choose>
<xsl:when test="/st:output/st:grammar/st:abbreviation[st:name=$name]">
<xsl:apply-templates select="/st:output/st:grammar/st:abbreviation[st:name=$name]/st:regex"/>
</xsl:when>
<xsl:otherwise>
<element name="{$name}"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="st:choice" >
<choice>
<xsl:apply-templates select="st:sequence|st:quantifier"/>
</choice>
</xsl:template>
<xsl:template match="st:sequence">
<sequence>
<xsl:apply-templates select="st:quantifier"/>
</sequence>
</xsl:template>
<xsl:template match="st:quantifier" >
<xsl:apply-templates select="st:optional|st:one-or-more|st:zero-or-more|st:term"/>
</xsl:template>
<xsl:template match="st:optional" >
<optional>
<xsl:apply-templates select="st:term"/>
</optional>
</xsl:template>
<xsl:template match="st:one-or-more">
<one-or-more>
<xsl:apply-templates select="st:term"/>
</one-or-more>
</xsl:template>
<xsl:template match="st:zero-or-more">
<zero-or-more>
<xsl:apply-templates select="st:term"/>
</zero-or-more>
</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:term">
<xsl:apply-templates select="st:class|st:nested|st:string|st:element|st:dot"/>
</xsl:template>
<xsl:template match="st:nested">
<xsl:apply-templates select="st:choice|st:sequence|st:quantifier"/>
</xsl:template>
<xsl:template match="st:dot">
<class exclusive="true">
<char value="#10"/>
<char value="#13"/>
</class>
</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">
<xsl:choose>
<xsl:when test="count(st:char|st:masked-char)>1">
<sequence>
<xsl:apply-templates select="st:char|st:masked-char"/>
</sequence>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="st:char|st:masked-char"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="st:class">
<class>
<xsl:if test="st:exclusive">
<xsl:attribute name="exclusive">true</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="st:interval|st:class-char|st:masked-char"/>
</class>
</xsl:template>
<xsl:template match="st:class-char">
<char value="{.}"/>
</xsl:template>
<xsl:template match="st:masked-char">
<char>
<xsl:choose>
<xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'n'">
<!-- <xsl:attribute name="content"><xsl:text disable-output-escaping="yes"> </xsl:text></xsl:attribute>-->
<xsl:attribute name="value">#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"> </xsl:text></xsl:attribute>-->
<xsl:attribute name="value">#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">	</xsl:text></xsl:attribute>-->
<xsl:attribute name="value">#9</xsl:attribute>
</xsl:when>
<xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'u'">
<xsl:attribute name="value">#<xsl:value-of select="substring(translate(normalize-space(.), ' ', ''),3,6)"/></xsl:attribute>
</xsl:when>
<xsl:when test="contains(.,'\ ')">
<xsl:attribute name="value"><xsl:text disable-output-escaping="yes"> </xsl:text></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="value"><xsl:value-of select="substring(translate(normalize-space(.), ' ', ''), 2,1)"/></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</char>
</xsl:template>
<xsl:template match="st:char">
<char value="{.}"/>
</xsl:template>
<xsl:template match="st:interval">
<interval>
<xsl:apply-templates select="st:class-char|st:masked-char"/>
</interval>
</xsl:template>
</xsl:stylesheet>
1.1 xml-forrest/src/core/context/resources/chaperon/stylesheets/error2html.xsl
Index: error2html.xsl
===================================================================
<?xml version="1.0"?>
<!-- CVS $Id: error2html.xsl,v 1.1 2004/01/23 09:50:31 nicolaken Exp $ -->
<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:param name="contextPath"/>
<!-- let sitemap override default page title -->
<xsl:param name="pageTitle" select="//parse-exception/message"/>
<xsl:template match="parse-exception">
<html>
<head>
<title>
<xsl:value-of select="$pageTitle"/>
</title>
<link href="{$contextPath}/styles/main.css" type="text/css" rel="stylesheet"/>
<style>
h1 { color: #336699; text-align: left; margin: 0px 0px 30px 0px; padding: 0px; border-width: 0px 0px 1px 0px; border-style: solid; border-color: #336699;}
p.message { padding: 10px 30px 10px 30px; font-weight: bold; font-size: 130%; border-width: 1px; border-style: dashed; border-color: #336699; }
p.description { padding: 10px 30px 20px 30px; border-width: 0px 0px 1px 0px; border-style: solid; border-color: #336699;}
p.topped { padding-top: 10px; border-width: 1px 0px 0px 0px; border-style: solid; border-color: #336699; }
pre { font-size: 120%; }
table { margin: 0px; border: 0px; padding: 0px; }
tr { margin: 0px; border: 0px; padding: 0px; }
td { margin: 0px; border: 0px; padding: 0px; }
span.lt { background-color: #e5ffe5; margin: 0px; border: 0px; padding: 0px; }
span.eq { background-color: #ff0000; margin: 0px; border: 0px; padding: 0px; }
span.gt { background-color: #ffe5e5; margin: 0px; border: 0px; padding: 0px; }
</style>
</head>
<body>
<h1>Error</h1>
<p class="message">
<xsl:value-of select="message"/>
</p>
<p class="topped"/>
<p class="extra"><span class="description">column </span><xsl:value-of select="@column-number"/></p>
<p class="extra"><span class="description">line </span><xsl:value-of select="@line-number"/></p>
<xsl:if test="source">
<p class="extra"><span class="description">source </span><xsl:value-of select="source/@ref"/></p>
</xsl:if>
<xsl:apply-templates select="source"/>
<p class="topped">
For more detailed technical information, take a look at the log
files in the log directory of Cocoon, which is placed by default in
the <code>WEB-INF/logs/</code> folder of your cocoon webapp context.<br/>
If the logs don't give you enough information, you might want to increase the
log level by changing the Logging configuration which is by default the
<code>WEB-INF/logkit.xconf</code> file.
</p>
<p>
If you think you found a bug, please report it to
<a href="http://nagoya.apache.org/bugzilla/">Apache's Bugzilla</a>;
a message will automatically be sent to the developer mailing list and you'll
be kept in contact automatically with the further progress on that bug.
</p>
<p>
Thanks, and sorry for the trouble if this is our fault.
</p>
<p class="topped">
The <a href="http://cocoon.apache.org/">Apache Cocoon</a> Project
</p>
</body>
</html>
</xsl:template>
<xsl:template match="source">
<xsl:variable name="line-number" select="number(../@line-number)"/>
<p class="topped">
<pre>
<xsl:apply-templates select="lex:output/lex:lexeme[(number(@line) < $line-number) and (number(@line) > number($line-number - 10))]" mode="lt"/>
<xsl:apply-templates select="lex:output/lex:lexeme[number(@line) = $line-number]" mode="eq"/>
<xsl:apply-templates select="lex:output/lex:lexeme[(number(@line) > $line-number) and (number(@line) < number($line-number + 10))]" mode="gt"/>
</pre>
</p>
</xsl:template>
<xsl:template match="lex:lexeme" mode="lt">
<xsl:value-of select="@line"/> : <span class="lt"><xsl:value-of select="@text"/></span>
</xsl:template>
<xsl:template match="lex:lexeme" mode="eq">
<xsl:variable name="column-number" select="number(../../../@column-number)"/>
<xsl:value-of select="@line"/> : <span class="lt"><xsl:value-of select="substring(@text, 1, $column-number - 1)"/></span>
<span class="eq"><xsl:value-of select="substring(@text, $column-number, 1)"/></span>
<span class="gt"><xsl:value-of select="substring(@text, $column-number + 1, string-length(@text) - $column-number)"/></span>
</xsl:template>
<xsl:template match="lex:lexeme" mode="gt">
<xsl:value-of select="@line"/> : <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>
1.1 xml-forrest/src/core/context/resources/chaperon/stylesheets/error2page.xsl
Index: error2page.xsl
===================================================================
<?xml version="1.0"?>
<!-- CVS $Id: error2page.xsl,v 1.1 2004/01/23 09:50:31 nicolaken Exp $ -->
<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 </span><xsl:value-of select="st:error/@column"/></p>
<p class="extra"><span class="description">line </span><xsl:value-of select="st:error/@line"/></p>
<xsl:if test="source">
<p class="extra"><span class="description">source </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) < $line) and (number(@line) > 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) > $line) and (number(@line) < number($line + 10))]" mode="gt"/>
</pre>
</p>
</xsl:template>
<xsl:template match="lex:lexeme" mode="lt">
<xsl:value-of select="@line"/> : <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"/> : <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"/> : <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>
1.1 xml-forrest/src/core/context/resources/chaperon/stylesheets/error4wiki.xsl
Index: error4wiki.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
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:stylesheet>
1.1 xml-forrest/src/core/context/resources/chaperon/stylesheets/text4error.xsl
Index: text4error.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:text="http://chaperon.sourceforge.net/schema/text/1.0">
<xsl:template match="source">
<xsl:if test="string-length(.)>0">
<source ref="{.}">
<text:text source="{.}" line="1" column="1"><xi:include href="{.}" parse="text"/></text:text>
</source>
</xsl:if>
</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>