forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject cvs commit: xml-forrest/src/resources/editor/editor/images dir.gif file.gif get.gif new.gif see.gif
Date Tue, 05 Nov 2002 10:59:26 GMT
nicolaken    2002/11/05 02:59:26

  Modified:    .        build.xml status.xml
               src/resources/conf sitemap.xmap
  Added:       src/resources/editor/editor/stylesheets dir2skin.xsl
                        editor2writer.xsl file2editor.xsl
                        request2editor.xsl skin.xsl writeresult2skin.xsl
               src/resources/editor/chaperon/stylesheets document2wiki.xsl
                        java2html.xsl mathexp2html.xsl parsefragment.xsl
                        rgrm2grm.xsl wiki2document.xsl wiki2html.xsl
               src/resources/editor/editor/docs editor.html footer.html
                        menu.html template.xml
               src/resources/editor editor.xmap
               src/resources/editor/editor/stylesheets/error error2html.xsl
               src/resources/editor/chaperon/misc java.css matex.xsp
                        mathexp.xsp samples.xml test1.java test2.java
                        wiki.xsp
               src/resources/editor/chaperon/grammars java.rgrm mathexp.grm
                        rgrm.grm wiki.grm wiki.rgrm
               lib/core chaperon-1.3-dev.jar chaperon-block.jar
                        cocoon-scratchpad-20021030.jar
               src/resources/editor/editor/images dir.gif file.gif get.gif
                        new.gif see.gif
  Log:
  DONE
      <action type="add" context="webapp" dev="NKB">
        Added alpha system for editing content in the webapp.
        To try it do "forrest run" and point the browser to http://localhost:8888/edit/  .
      </action>
  
  TODO
      <action context="webapp" dev="open">
        Continue development of the editing system in the webapp.
        Needs bugfixes, xml2wiki stylesheet and enhancements to the wiki grammer
        especially to define sections and titles.
      </action>
  
  Revision  Changes    Path
  1.40      +5 -0      xml-forrest/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/build.xml,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- build.xml	4 Nov 2002 10:33:43 -0000	1.39
  +++ build.xml	5 Nov 2002 10:59:24 -0000	1.40
  @@ -158,6 +158,11 @@
       <copy todir="${bare-context.dir}/library/" >
         <fileset dir="${resource.dir}/library" />
       </copy>
  +    
  +    <!-- Copy editor -->
  +    <copy todir="${bare-context.dir}/" >
  +      <fileset dir="${resource.dir}/editor" />
  +    </copy>    
   
       <!-- Copy skins -->
       <copy todir="${bare-context.dir}/skins/" >
  
  
  
  1.38      +10 -3     xml-forrest/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/status.xml,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- status.xml	5 Nov 2002 07:54:58 -0000	1.37
  +++ status.xml	5 Nov 2002 10:59:24 -0000	1.38
  @@ -42,6 +42,11 @@
      </actions>
   
      <actions priority="medium">
  +    <action context="webapp" dev="open">
  +      Continue development of the editing system in the webapp.
  +      Needs bugfixes, xml2wiki stylesheet and enhancements to the wiki grammer 
  +      especially to define sections and titles.
  +    </action>      
       <action context="code" dev="NKB">
         Add the PATCHQUEUE system to Forrest, as used by cocoon-dev@xml.apache.org
       </action>     
  @@ -93,6 +98,10 @@
   
     <changes>
      <release version="0.1" date="2002">
  +    <action type="add" context="webapp" dev="NKB">
  +      Added alpha system for editing content in the webapp.
  +      To try it do "forrest run" and point the browser to http://localhost:8888/edit/  .
  +    </action>   
       <action dev="JT" type="add" context="skins" due-to="Peter Donald"
        due-to-email="peter@apache.org">
        Added avalon-tigris skin.
  @@ -100,9 +109,6 @@
       <action dev="JT" type="remove" context="skins">
        Removed unmaintained skins: avalon-site, jakarta-site, xml-apache-site,
       </action> 
  -     <action context="code" dev="NKB">
  -     Add the PATCH-QUEUE bot mechanism as used by cocoon-dev@xml.apache.org.
  -    </action>   
       <action dev="NKB" type="update" context="webapp">
         Removed the dependency that the default "site" target had on clean-site.
         It means that running  "forrest" will not delete the current files in ./build/site/** .
  @@ -337,3 +343,4 @@
     </changes>
   
   </status>
  +
  
  
  
  1.1                  xml-forrest/src/resources/editor/editor/stylesheets/dir2skin.xsl
  
  Index: dir2skin.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:dir="http://apache.org/cocoon/directory/2.0">
  
  <!-- Displays the directory listing -->
    <xsl:template match="dir:directory">
  
     <a href="../" title="View Parent Directory listing"><b>Parent</b></a>
     <br/>
     
     <table>
    	<xsl:apply-templates/>
     </table>
     
    </xsl:template>
  
  <!-- Displays sub-directories -->
    <xsl:template match="dir:directory/dir:directory">
     <tr>
       <td><a href="{@name}/"><img border="0" src="../images/dir.gif"/><xsl:value-of select="@name"/></a></td>
       <td></td>
       <td></td>
       <td><xsl:value-of select="@date"/></td>
     </tr>
    </xsl:template>
  
  
  	
  <!-- Displays files in the directory listing -->
    <xsl:template match="dir:file">
     <tr>
     
       <td><a href="../get(bravo)/{@name}"><img border="0" src="../images/see.gif"/><xsl:value-of select="@name"/></a></td>
       <td><xsl:value-of select="dir:xpath/title"/></td>
       <td><a href="../see(bravo)/{@name}"> (preview) </a></td>
       <td><xsl:value-of select="@date"/></td>
      
     </tr>
     
    </xsl:template>
  
  
  </xsl:stylesheet>
  
  
  1.1                  xml-forrest/src/resources/editor/editor/stylesheets/editor2writer.xsl
  
  Index: editor2writer.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:sch="http://www.ascc.net/xml/schematron" 
   xmlns:zvon="http://zvon.org/schematron"
   xmlns:request="http://xml.apache.org/cocoon/requestgenerator/2.0"
   xmlns:tf="http://chaperon.sourceforge.net/schema/textfragment/1.0"
   >
  
  <!-- 
  
  	This StyleSheet converts the output of the Validator and wraps it 
  	with 'source:write' tags, so the SourceWritingTransformer can save it
  	only if there have been no validation errors.
  
  	NB. the indentation of these templates effects the output document
  	
  	NB. it can get tricky to decide which namespaces need to be in which stylesheet, 
  	to make sure the wrong ones don't end up being written to source
  		
  -->
  
   
  <xsl:template match="/">
    <div>
    <source:write xml:space="preserve" xmlns:source="http://apache.org/cocoon/source/1.0">
  			<source:source create="true">content/xdocs/<xsl:value-of select="request:request/request:requestParameters/request:parameter[@name = 'target']/request:value"/></source:source>
  			<source:fragment><document>
        <header>
          <title><xsl:value-of select="request:request/request:requestParameters/request:parameter[@name = 'title']/request:value"/></title>
        </header>
        <body>
        
          <tf:textfragment>
            <xsl:value-of select="request:request/request:requestParameters/request:parameter[@name = 'content']/request:value"/> 
          </tf:textfragment> 
      
  	 </body>
  	</document></source:fragment>
  		</source:write>
  		
  
    </div>	 
  </xsl:template>
  
  <!-- copy content ** this copies any tags into the source, when the source is re-parsed, they will be XML. **
  									** this is highly dangerous because no validation takes place !!!!!                      **
  	<xsl:template match="para"><para><xsl:value-of disable-output-escaping="yes" select="text()"/></para></xsl:template>
  	-->
  <!-- copy anything -->
  
  <!--
    <xsl:template match="@*|node()" priority="-2"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template>
    <xsl:template match="text()" priority="-1"><xsl:value-of select="."/></xsl:template>
  -->
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/editor/editor/stylesheets/file2editor.xsl
  
  Index: file2editor.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   >
  
  
  <!-- your form for editing 'page' doctype content, handles the 'bravo' sub-editor for 'get' and 'new' behaviours -->
  	<xsl:template match="document">
  		Bravo Editor<br/>
  		
  				<form method="post" action="../pre(bravo)">
  				
  				Title <input name="title" size="40"  onchange="changed=true;" value="{normalize-space(header/title)}"/><br/>
                  Body<textarea name="content" rows="20" cols="80" xml:space="preserve" onchange="changed=true;"><xsl:apply-templates select="body/*"/></textarea><br/>
            
  				Save as<input type="text" name="target" value="new.xml" size="40" title="Note: to make a new directory, prepend the filename with a directory path"/>
  				<input class="submit" type="submit" value="submit"/>
  					
  				</form>	
  
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/editor/editor/stylesheets/request2editor.xsl
  
  Index: request2editor.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:request="http://xml.apache.org/cocoon/requestgenerator/2.0">
  <!--
      <xsl:include href="generation-utils.xsl"/>                      
      <xsl:variable name="target" select="request:request/request:requestParameters/request:parameter[@name = 'target']/request:value"/>
  -->
  <!-- 
  
      This StyleSheet converts the output of the RequestGenerator into the new 'page'
      then wraps it with 'editor' tags.
      
      It looks for double CRs in the submitted text and makes paragraphs from them using the 'para' tag.
      It then looks inside the paragraphs for single CRs and inserts a 'br' tag if found.
      
      All other tags are saved as Entities.
  
      NB. the indentation of these templates effects the output document
          
  -->
     <xsl:template match="/">
        <div>
           <h1>
              <xsl:value-of select="request:request/request:requestParameters/request:parameter[@name = 'title']/request:value" />
           </h1>
  
           <tf:textfragment xmlns:tf="http://chaperon.sourceforge.net/schema/textfragment/1.0">
              <xsl:value-of select="request:request/request:requestParameters/request:parameter[@name = 'content']/request:value" />
           </tf:textfragment>
  
           <form action="put">
              <input type="hidden" name="title">
                 <xsl:attribute name="value">
                    <xsl:value-of select="request:request/request:requestParameters/request:parameter[@name = 'title']/request:value" />
                 </xsl:attribute>
              </input>
  
              <input type="hidden" name="content">
                 <xsl:attribute name="value">
                    <xsl:value-of select="request:request/request:requestParameters/request:parameter[@name = 'content']/request:value" />
                 </xsl:attribute>
              </input>
  
              <input type="hidden" name="target">
                 <xsl:attribute name="value">
                    <xsl:value-of select="request:request/request:requestParameters/request:parameter[@name = 'target']/request:value" />
                 </xsl:attribute>
              </input>
  
              <input type="submit" name="submit" />
           </form>
        </div>
     </xsl:template>
  </xsl:stylesheet>
  
  
  
  
  1.1                  xml-forrest/src/resources/editor/editor/stylesheets/skin.xsl
  
  Index: skin.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
     <xsl:template match="/">
     <html>
     <head>
      <title>Forrest editor</title>
      
      <link type="text/css" rel="stylesheet" href="style"/>
  
      </head>
      <body> 
  			<xsl:apply-templates/>
  	</body>   
      
  
     </html>
    </xsl:template>
  
    <xsl:template match="@*|node()" priority="-2"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template>
    <xsl:template match="text()" priority="-1"><xsl:value-of select="."/></xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/editor/editor/stylesheets/writeresult2skin.xsl
  
  Index: writeresult2skin.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:sch="http://www.ascc.net/xml/schematron" 
   xmlns:zvon="http://zvon.org/schematron"
   xmlns:request="http://xml.apache.org/cocoon/requestgenerator/2.0"
   xmlns:dir="http://apache.org/cocoon/directory/2.0"
   xmlns:source="http://apache.org/cocoon/source/1.0"
   >
   
   <xsl:template match="sourceResult">
      <xsl:apply-templates/>
   </xsl:template> 
  
  <!-- outputs the response from SourceWritingTransformer -->
    <xsl:template match="sourceResult">
  		<i>Writing to Source...</i>
   			   <table>
  					<tr>
  						<td>Result</td>
  						<td><xsl:value-of select="execution"/></td>
  					</tr>
  					<tr>
  						<td>Behaviour</td>
  						<td><xsl:value-of select="behaviour"/></td>
  					</tr>
  					<xsl:if test="message">
  						<tr>
  							<td>Message</td>
  							<td><xsl:value-of select="message"/></td>
  						</tr>
  					</xsl:if>
  					<tr>
  						<td>Source</td>
  						<td><xsl:value-of select="source"/></td>
  					</tr>
  					<tr>
  						<td>Action</td>
  						<td>
  							<xsl:choose>
  								<xsl:when test="action = 'none'">None taken</xsl:when>
  								<xsl:when test="action = 'new'">New document created</xsl:when>
  								<xsl:when test="action = 'overwritten'">Existing document overwritten</xsl:when>
  								<xsl:otherwise>Unknown</xsl:otherwise>
  							</xsl:choose>
  						</td>
  					</tr>
  					<xsl:if test="serializer">
  						<tr>
  							<td>Serializer</td>
  							<td><xsl:value-of select="serializer"/></td>
  						</tr>
  					</xsl:if>
  				</table>
    </xsl:template>
  
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/editor/chaperon/stylesheets/document2wiki.xsl
  
  Index: document2wiki.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0"
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                  xmlns:wiki="http://chaperon.sourceforge.net/grammar/wiki/1.0">
  
   <xsl:output indent="yes" method="xml"/>
  
   <xsl:template match="wiki:wiki">
      <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="//wiki">
    <div style="background: #b9d3ee; border: thin; border-color: black; border-style: solid; padding-left: 0.8em; 
                 padding-right: 0.8em; padding-top: 0px; padding-bottom: 0px; margin: 0.5ex 0px; clear: both;">
     <xsl:apply-templates select="paragraphs/paragraph"/>
    </div>
   </xsl:template>
  
   <xsl:template match="wiki:paragraphs" >
    <xsl:apply-templates/>
   </xsl:template>
   
   <xsl:template match="wiki:paragraph" >
    <xsl:apply-templates select="wiki:bulletedlist|wiki:numberedlist1|wiki:numberedlist2|wiki:numberedlist3|wiki:headitem|wiki:footnote|wiki:textitem|wiki:LINE"/>
   </xsl:template>
  
   <xsl:template match="wiki:textitem" >
    <p>
     <xsl:apply-templates select="wiki:firstblock|wiki:textblock"/>
    </p>
   </xsl:template>
  
   <xsl:template match="wiki:textblock" >
    <xsl:apply-templates select="wiki:LINK|wiki:boldblock|wiki:italicblock|wiki:underlineblock|wiki:TEXT|wiki:note"/>
   </xsl:template>
  
   <xsl:template match="wiki:firstblock" >
    <xsl:apply-templates select="wiki:LINK|wiki:boldblock|wiki:italicblock|wiki:underlineblock|wiki:TEXT"/>
   </xsl:template>
  
   <xsl:template match="wiki:LINE" >
    <hr/>
   </xsl:template>
  
   <xsl:template match="wiki:bulletedlist" >
    <ul>
     <xsl:apply-templates select="wiki:bulletedlistitem"/>
    </ul>
   </xsl:template>
  
   <xsl:template match="wiki:bulletedlistitem" >
    <li>
     <xsl:apply-templates select="wiki:textblock"/>
    </li>
   </xsl:template>
  
   <xsl:template match="wiki:numberedlist1" >
    <ol>
     <xsl:apply-templates select="wiki:numberedlistitem1|wiki:numberedlist2"/>
    </ol>
   </xsl:template>
  
   <xsl:template match="wiki:numberedlistitem1" >
    <li>
     <xsl:apply-templates select="wiki:textblock"/>
    </li>
   </xsl:template>
  
   <xsl:template match="wiki:numberedlist2" >
    <ol>
     <xsl:apply-templates select="wiki:numberedlistitem2|wiki:numberedlist3"/>
    </ol>
   </xsl:template>
      
   <xsl:template match="wiki:numberedlistitem2" >
    <li>
     <xsl:apply-templates select="wiki:textblock"/>
    </li>
   </xsl:template>
  
   <xsl:template match="wiki:numberedlist3" >
    <ol>
     <xsl:apply-templates select="wiki:numberedlistitem3"/>
    </ol>
   </xsl:template>
      
   <xsl:template match="wiki:numberedlistitem3" >
    <li>
     <xsl:apply-templates select="wiki:textblock"/>
    </li>
   </xsl:template>
  
   <xsl:template match="wiki:headitem" >
    <xsl:choose>
     <xsl:when test="string-length(wiki:HEAD)=2">
      <h2>
       <xsl:apply-templates select="wiki:textblock"/>
      </h2>
     </xsl:when>
     <xsl:when test="string-length(wiki:HEAD)=3">
      <h3>
       <xsl:apply-templates select="wiki:textblock"/>
      </h3>
     </xsl:when>
     <xsl:otherwise>
      <h1>
       <xsl:apply-templates select="wiki:textblock"/>
      </h1>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
  
  
   <xsl:template match="wiki:footnote" >
    <a name="{normalize-space(wiki:note/wiki:TEXT|wiki:note/wiki:LINK)}">
     [<xsl:apply-templates select="wiki:note/wiki:TEXT|wiki:note/wiki:LINK"/>]
     <xsl:apply-templates select="wiki:textblock"/>
    </a>
   </xsl:template>
  
   <xsl:template match="wiki:LINK" >
    <a href="{normalize-space(.)}">
     <xsl:value-of select="."/>
    </a>
   </xsl:template>
  
   <xsl:template match="wiki:boldblock" >
    <b>
     <xsl:value-of select="wiki:TEXT"/>
    </b>
   </xsl:template>
  
   <xsl:template match="wiki:italicblock" >
    <i>
     <xsl:value-of select="wiki:TEXT"/>
    </i>
   </xsl:template>
  
   <xsl:template match="wiki:underlineblock" >
    <u>
     <xsl:value-of select="wiki:TEXT"/>
    </u><xsl:text> </xsl:text>
   </xsl:template>
  
   <xsl:template match="wiki:note" >
    <a href="#{normalize-space(wiki:TEXT|wiki:LINK)}">
     [<xsl:apply-templates select="wiki:TEXT|wiki:LINK"/>]
    </a>
   </xsl:template>
  
   <xsl:template match="wiki:TEXT" >
    <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.1                  xml-forrest/src/resources/editor/chaperon/stylesheets/java2html.xsl
  
  Index: java2html.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0"
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                  xmlns:java="http://chaperon.sourceforge.net/grammar/java/1.0"
                  xmlns="http://www.w3.org/1999/xhtml">
  
   <xsl:output indent="no"/>
  
   <!--<xsl:strip-space elements="*"/>-->
   <xsl:param name="selected">MethodDeclaration</xsl:param>
  
   <xsl:template match="java:CompilationUnit" >
    <html>
     <head>
      <link rel="stylesheet" type="text/css" href="java.css" title="Style"/>
      <title>java2html example</title>
     </head>
     <body>
      <table id="Header" border="0" cellpadding="0" cellspacing="0" width="100%">
       <tr>
        <td colspan="2" width="33%">&#160;</td>
        <td align="center" colspan="2" width="33%">
         <font size="4">java2html example</font>
        </td>
        <td align="right" colspan="2" width="33%"></td>
       </tr>
      </table>
  <!--    <p>
       <form>
        <select size="1" name="selected">
         <option value=""><xsl:if test="$selected=''"><xsl:attribute name="selected"/></xsl:if>Nothing selected</option>
         <option value="QualifiedName"><xsl:if test="$selected='QualifiedName'"><xsl:attribute name="selected"/></xsl:if>Qualified name</option>
         <option value="FieldVariableDeclaration"><xsl:if test="$selected='FieldVariableDeclaration'"><xsl:attribute name="selected"/></xsl:if>Field variable declaration</option>
         <option value="MethodDeclaration"><xsl:if test="$selected='MethodDeclaration'"><xsl:attribute name="selected"/></xsl:if>Method declaration</option>
         <option value="SelectionStatement"><xsl:if test="$selected='SelectionStatement'"><xsl:attribute name="selected"/></xsl:if>Selection statement</option>
         <option value="IterationStatement"><xsl:if test="$selected='IterationStatement'"><xsl:attribute name="selected"/></xsl:if>Iteration statement</option>
         <option value="GuardingStatement"><xsl:if test="$selected='GuardingStatement'"><xsl:attribute name="selected"/></xsl:if>Guarding statement</option>
        </select>
       </form>
      </p>-->
      <pre id="Classes">
       <xsl:apply-templates/>
      </pre>
     </body>
    </html>
   </xsl:template>
  
   <xsl:template match="java:ABSTRACT">
    <font id="ABSTRACT"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:BOOLEAN">
    <font id="BOOLEAN"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:BREAK">
    <font id="BREAK"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:BYTE">
    <font id="BYTE"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:CASE">
    <font id="CASE"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:CATCH">
    <font id="CATCH"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:CHAR">
    <font id="CHAR"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:CLASS">
    <font id="CLASS"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:CONST">
    <font id="CONST"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:CONTINUE">
    <font id="CONTINUE"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:DEFAULT">
    <font id="DEFAULT"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:DO">
    <font id="DO"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:DOUBLE">
    <font id="DOUBLE"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:ELSE">
    <font id="ELSE"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:EXTENDS">
    <font id="EXTENDS"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:FALSE">
    <font id="FALSE"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:FINAL">
    <font id="FINAL"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:FINALLY">
    <font id="FINALLY"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:FLOAT">
    <font id="FLOAT"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:FOR">
    <font id="FOR"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:GOTO">
    <font id="GOTO"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:IF">
    <font id="IF"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:IMPLEMENTS">
    <font id="IMPLEMENTS"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:IMPORT">
    <font id="IMPORT"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:INSTANCEOF">
    <font id="INSTANCEOF"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:INT">
    <font id="INT"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:INTERFACE">
    <font id="INTERFACE"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:LONG">
    <font id="LONG"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:NATIVE">
    <font id="NATIVE"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:NEW">
    <font id="NEW"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:PACKAGE">
    <font id="PACKAGE"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:PRIVATE">
    <font id="PRIVATE"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:PROTECTED">
    <font id="PROTECTED"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:PUBLIC">
    <font id="PUBLIC"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:RETURN">
    <font id="RETURN"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:SHORT">
    <font id="SHORT"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:STATIC">
    <font id="STATIC"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:SUPER">
    <font id="SUPER"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:SWITCH">
    <font id="SWITCH"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:SYCHRONIZED">
    <font id="SYCHRONIZED"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:THIS">
    <font id="THIS"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:THROW">
    <font id="THROW"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:THROWS">
    <font id="THROWS"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:TRANSIENT">
    <font id="TRANSIENT"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:TRUE">
    <font id="TRUE"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:TRY">
    <font id="TRY"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:VOID">
    <font id="VOID"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:VOLATILE">
    <font id="VOLATILE"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:WHILE">
    <font id="WHILE"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:LITERAL">
    <font id="LITERAL"><xsl:apply-templates/></font>
   </xsl:template>
  
   <xsl:template match="java:IDENTIFIER">
    <font id="IDENTIFIER"><xsl:apply-templates/></font> 
   </xsl:template>
  
   <xsl:template match="java:DOPEN">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:DCLOSE">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:COPEN">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:CCLOSE">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:BOPEN">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:BCLOSE">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:SEMICOLON">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:COMMA">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:DOT">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:OP_EQ">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:OP_LE">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:OP_GE">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:OP_NE">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:OP_LOR">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:OP_LAND">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:OP_INC">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:OP_DEC">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:OP_SHR">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:OP_SHL">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:OP_SHRR">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ASS_OP">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:EQ">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:GT">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:LT">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:NOT">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:TILDE">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:QM">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:COLON">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:PLUS">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:MINUS">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:MULT">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:DIV">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:AND">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:OR">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:XOR">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:MOD">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:BOOLLIT">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:eol">
    <xsl:text>
  </xsl:text>
   </xsl:template>
  
   <xsl:template match="java:whitespace">
    <!--<xsl:text><xsl:value-of select="."/></xsl:text>-->
    <xsl:value-of select="."/>
   </xsl:template>
  
   <xsl:template match="java:comment">
    <font id="MultiLineComment"><xsl:value-of select="."/></font>
   </xsl:template>
  
   <xsl:template match="java:TypeSpecifier">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:TypeName">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ClassNameList">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:PrimitiveType">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:SemiColons">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:ProgramFile">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:PackageStatement">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:TypeDeclarations">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:TypeDeclarationOptSemi">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:ImportStatements">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:ImportStatement">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:QualifiedName">
    <xsl:choose>
     <xsl:when test="$selected=local-name(.)">
      <span class="selected"><xsl:apply-templates/></span>
     </xsl:when>
     <xsl:otherwise>
      <xsl:apply-templates/>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
    
   <xsl:template match="java:TypeDeclaration">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:ClassHeader">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:Modifiers">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:Modifier">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:ClassWord">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:Interfaces">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:FieldDeclarations">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:FieldDeclarationOptSemi">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:FieldDeclaration">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:FieldVariableDeclaration">
    <xsl:choose>
     <xsl:when test="$selected=local-name(.)">
      <span class="selected"><xsl:apply-templates/></span>
     </xsl:when>
     <xsl:otherwise>
      <xsl:apply-templates/>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
    
   <xsl:template match="java:VariableDeclarators">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:VariableDeclarator">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:VariableInitializer">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:ArrayInitializers">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:MethodDeclaration">
    <xsl:choose>
     <xsl:when test="$selected=local-name(.)">
      <span class="selected"><xsl:apply-templates/></span>
     </xsl:when>
     <xsl:otherwise>
      <xsl:apply-templates/>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
    
   <xsl:template match="java:MethodDeclarator">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:ParameterList">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:Parameter">
    <xsl:apply-templates/>
   </xsl:template>
    
   <xsl:template match="java:DeclaratorName">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:Throws">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:MethodBody">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ConstructorDeclaration">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ConstructorDeclarator">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:StaticInitializer">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:NonStaticInitializer">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:Extends">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:Block">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:LocalVariableDeclarationsAndStatements">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:LocalVariableDeclarationOrStatement">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:LocalVariableDeclarationStatement">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:Statement">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:EmptyStatement">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:LabelStatement">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ExpressionStatement">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:SelectionStatement">
    <xsl:choose>
     <xsl:when test="$selected=local-name(.)">
      <span class="selected"><xsl:apply-templates/></span>
     </xsl:when>
     <xsl:otherwise>
      <xsl:apply-templates/>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
  
   <xsl:template match="java:IterationStatement">
    <xsl:choose>
     <xsl:when test="$selected=local-name(.)">
      <span class="selected"><xsl:apply-templates/></span>
     </xsl:when>
     <xsl:otherwise>
      <xsl:apply-templates/>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
  
   <xsl:template match="java:ForInit">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ForExpr">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ForIncr">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ExpressionStatements">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:JumpStatement">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:GuardingStatement">
    <xsl:choose>
     <xsl:when test="$selected=local-name(.)">
      <span class="selected"><xsl:apply-templates/></span>
     </xsl:when>
     <xsl:otherwise>
      <xsl:apply-templates/>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
  
   <xsl:template match="java:Catches">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:Catch">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:CatchHeader">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:Finally">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:PrimaryExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:NotJustName">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ComplexPrimary">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ComplexPrimaryNoParenthesis">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ArrayAccess">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:FieldAccess">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:MethodCall">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:MethodAccess">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:SpecialName">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ArgumentList">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:NewAllocationExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:PlainNewAllocationExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ClassAllocationExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ArrayAllocationExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:DimExprs">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:DimExpr">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:Dims">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:PostfixExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:RealPostfixExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:UnaryExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:LogicalUnaryExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:LogicalUnaryOperator">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ArithmeticUnaryOperator">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:CastExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:PrimitiveTypeExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ClassTypeExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:MultiplicativeExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:AdditiveExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ShiftExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:RelationalExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:EqualityExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:AndExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ExclusiveOrExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:InclusiveOrExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ConditionalAndExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ConditionalOrExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ConditionalExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:AssignmentExpression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:AssignmentOperator">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:Expression">
    <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="java:ConstantExpression">
    <xsl:apply-templates/>
   </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/resources/editor/chaperon/stylesheets/mathexp2html.xsl
  
  Index: mathexp2html.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                  xmlns:m="http://chaperon.sourceforge.net/grammar/mathexp/1.0"
                  xmlns="http://www.w3.org/1999/xhtml" version="1.0">
  
  
   <xsl:template match="m: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:template>
  
   <xsl:template match="m: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:template>
  
   <xsl:template match="m: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: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/resources/editor/chaperon/stylesheets/parsefragment.xsl
  
  Index: parsefragment.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet version="1.0" 
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:tf="http://chaperon.sourceforge.net/schema/textfragment/1.0">
  
   <xsl:param name="parse_element">math</xsl:param>
  
   <xsl:template match="*[name()=$parse_element]">
    <xsl:element name="{$parse_element}">
     <tf:textfragment>
      <xsl:value-of select="."/>
     </tf:textfragment>
    </xsl:element>
   </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/resources/editor/chaperon/stylesheets/rgrm2grm.xsl
  
  Index: rgrm2grm.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0"
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                  xmlns:rgrm="http://chaperon.sourceforge.net/grammar/rgrm/1.0"
                  xmlns="http://chaperon.sourceforge.net/schema/grammar/1.0">
  
   <xsl:output indent="yes" method="xml" encoding="US-ASCII"/>
  
  <!-- <xsl:template match="/">
   </xsl:template>-->
  
   <xsl:template match="rgrm:grammar" >
    <grammar>
     <xsl:attribute name="uri"><xsl:value-of select="substring(rgrm:token_decls/rgrm:uri_decl/rgrm:string,2,
                           string-length(rgrm:token_decls/rgrm:uri_decl/rgrm:string)-2)"/></xsl:attribute>
     <tokens>
      <xsl:apply-templates select="rgrm:token_decls/rgrm:token_decl"/>
     </tokens>
  
     <ignorabletokens>
      <xsl:apply-templates select="rgrm:token_decls/rgrm:ignorabletoken_decl"/>
     </ignorabletokens>
  
     <xsl:apply-templates select="rgrm:production_decls"/>
  
     <xsl:apply-templates select="rgrm:token_decls/rgrm:start_decl"/>
    </grammar>
   </xsl:template>
  
   <xsl:template match="rgrm:token_decl" >
    <token>
     <xsl:if test="rgrm:token_decl = '%left'">
      <xsl:attribute name="assoc">left</xsl:attribute>
     </xsl:if>
     <xsl:if test="rgrm:token_decl = '%right'">
      <xsl:attribute name="assoc">right</xsl:attribute>
     </xsl:if>
     <xsl:attribute name="tsymbol"><xsl:value-of select="rgrm:id"/></xsl:attribute>
     <xsl:apply-templates select="rgrm:regexexpression"/>
    </token>
   </xsl:template>
  
   <xsl:template match="rgrm:ignorabletoken_decl" >
    <token>
     <xsl:attribute name="tsymbol"><xsl:value-of select="rgrm:id"/></xsl:attribute>
     <xsl:apply-templates select="rgrm:regexexpression"/>
    </token>
   </xsl:template>
  
   <xsl:template match="rgrm:regexexpression" >
    <xsl:apply-templates
      select="rgrm:regexalternation|rgrm:regexconcatenation|rgrm:regexklammer|rgrm:regexoptional|rgrm:regexstar|
              rgrm:regexplus|rgrm:regexvar|rgrm:string|rgrm:characterclass|rgrm:negatedcharacterclass|
              rgrm:regexdot|rgrm:regexbol|rgrm:regexeol|rgrm:regexabref"/>
   </xsl:template>
  
   <xsl:template match="rgrm:regexalternation" >
    <alt>
     <xsl:apply-templates
       select="rgrm:regexalternation|rgrm:regexconcatenation|rgrm:regexklammer|rgrm:regexoptional|rgrm:regexstar|
               rgrm:regexplus|rgrm:regexvar|rgrm:string|rgrm:characterclass|rgrm:negatedcharacterclass|rgrm:regexdot|rgrm:regexbol|rgrm:regexeol|rgrm:regexabref"/>
    </alt>
   </xsl:template>
  
   <xsl:template match="rgrm:regexconcatenation" >
    <concat>
     <xsl:apply-templates
       select="rgrm:regexalternation|rgrm:regexconcatenation|rgrm:regexklammer|rgrm:regexoptional|rgrm:regexstar|
               rgrm:regexplus|rgrm:regexvar|rgrm:string|rgrm:characterclass|rgrm:negatedcharacterclass|rgrm:regexdot|rgrm:regexbol|rgrm:regexeol|rgrm:regexabref"/>
    </concat>
   </xsl:template>
  
   <xsl:template match="rgrm:regexquantifier" >
    <xsl:apply-templates
      select="rgrm:regexalternation|rgrm:regexconcatenation|rgrm:regexklammer|rgrm:regexoptional|rgrm:regexstar|
              rgrm:regexplus|rgrm:regexvar|rgrm:string|rgrm:characterclass|rgrm:negatedcharacterclass|rgrm:regexdot|rgrm:regexbol|rgrm:regexeol|rgrm:regexabref"/>
   </xsl:template>
  
   <xsl:template match="rgrm:regexoptional" >
    <concat minOccurs="0" maxOccurs="1">
     <xsl:apply-templates
       select="rgrm:regexalternation|rgrm:regexconcatenation|rgrm:regexklammer|rgrm:regexoptional|rgrm:regexstar|
               rgrm:regexplus|rgrm:regexvar|rgrm:string|rgrm:characterclass|rgrm:negatedcharacterclass|rgrm:regexdot|rgrm:regexbol|rgrm:regexeol|rgrm:regexabref"/>
    </concat>
   </xsl:template>
  
   <xsl:template match="rgrm:regexstar" >
    <concat minOccurs="0" maxOccurs="*">
     <xsl:apply-templates
       select="rgrm:regexalternation|rgrm:regexconcatenation|rgrm:regexklammer|rgrm:regexoptional|rgrm:regexstar|
               rgrm:regexplus|rgrm:regexvar|rgrm:string|rgrm:characterclass|rgrm:negatedcharacterclass|rgrm:regexdot|rgrm:regexbol|rgrm:regexeol|rgrm:regexabref"/>
    </concat>
   </xsl:template>
  
   <xsl:template match="rgrm:regexplus" >
    <concat minOccurs="1" maxOccurs="*">
     <xsl:apply-templates
       select="rgrm:regexalternation|rgrm:regexconcatenation|rgrm:regexklammer|rgrm:regexoptional|rgrm:regexstar|
               rgrm:regexplus|rgrm:regexvar|rgrm:string|rgrm:characterclass|rgrm:negatedcharacterclass|rgrm:regexdot|rgrm:regexbol|rgrm:regexeol|rgrm:regexabref"/>
    </concat>
   </xsl:template>
  
   <xsl:template match="rgrm:regexvar" >
    <xsl:choose>
     <xsl:when test="count(rgrm:regexmultiplicator/rgrm:number)=2">
      <concat>
       <xsl:attribute name="minOccurs"><xsl:value-of select="rgrm:regexmultiplicator/rgrm:number[1]"/></xsl:attribute>
       <xsl:attribute name="maxOccurs"><xsl:value-of select="rgrm:regexmultiplicator/rgrm:number[2]"/></xsl:attribute>
       <xsl:apply-templates
         select="rgrm:regexalternation|rgrm:regexconcatenation|rgrm:regexklammer|rgrm:regexoptional|rgrm:regexstar|
                 rgrm:regexplus|rgrm:regexvar|rgrm:string|rgrm:characterclass|rgrm:negatedcharacterclass|rgrm:regexdot|rgrm:regexbol|rgrm:regexeol|rgrm:regexabref"/>
      </concat>
     </xsl:when>
     <xsl:otherwise>
      <concat>
       <xsl:attribute name="minOccurs"><xsl:value-of select="rgrm:regexmultiplicator/rgrm:number"/></xsl:attribute>
       <xsl:attribute name="maxOccurs"><xsl:value-of select="rgrm:regexmultiplicator/rgrm:number"/></xsl:attribute>
       <xsl:apply-templates
         select="rgrm:regexalternation|rgrm:regexconcatenation|rgrm:regexklammer|rgrm:regexoptional|rgrm:regexstar|
                 rgrm:regexplus|rgrm:regexvar|rgrm:string|rgrm:characterclass|rgrm:negatedcharacterclass|rgrm:regexdot|rgrm:regexbol|rgrm:regexeol|rgrm:regexabref"/>
      </concat>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
  
   <xsl:template match="rgrm:regexterm" >
    <xsl:apply-templates
      select="rgrm:regexalternation|rgrm:regexconcatenation|rgrm:regexklammer|rgrm:regexoptional|rgrm:regexstar|
              rgrm:regexplus|rgrm:regexvar|rgrm:string|rgrm:characterclass|rgrm:negatedcharacterclass|rgrm:regexabref"/>
   </xsl:template>
  
   <xsl:template match="rgrm:regexklammer" >
    <xsl:apply-templates
      select="rgrm:regexalternation|rgrm:regexconcatenation|rgrm:regexklammer|rgrm:regexoptional|rgrm:regexstar|
              rgrm:regexplus|rgrm:regexvar|rgrm:string|rgrm:characterclass|rgrm:negatedcharacterclass|rgrm:regexabref"/>
   </xsl:template>
  
   <xsl:template match="rgrm:regexdot" >
    <dot/>
   </xsl:template>
  
   <xsl:template match="rgrm:regexbol" >
    <bol/>
   </xsl:template>
  
   <xsl:template match="rgrm:regexeol" >
    <eol/>
   </xsl:template>
  
   <xsl:template match="rgrm:regexabref" >
    <xsl:variable name="ref" select="rgrm:id"/>
    <xsl:apply-templates select="/rgrm:grammar/rgrm:token_decls/rgrm:ab_decl[rgrm:id=$ref]/rgrm:regexexpression"/>
   </xsl:template>
  
   <!--<xsl:template match="string" >
    <string>
     <xsl:attribute name="content"><xsl:value-of select="translate(normalize-space(substring(., 2, string-length(.)-2)),' ', '')"/></xsl:attribute>
    </string>
   </xsl:template>-->
  
   <xsl:template match="rgrm:string" >
    <string>
     <xsl:attribute name="content"><xsl:apply-templates select="rgrm:character|rgrm:maskedcharacter" mode="string"/></xsl:attribute>
    </string>
   </xsl:template>
  
   <xsl:template match="rgrm:characterclass" >
    <cc>
     <xsl:apply-templates select="rgrm:character|rgrm:maskedcharacter|rgrm:intervall"/>
    </cc>
   </xsl:template>
  
   <xsl:template match="rgrm:negatedcharacterclass" >
    <ncc>
     <xsl:apply-templates select="rgrm:character|rgrm:maskedcharacter|rgrm:intervall"/>
    </ncc>
   </xsl:template>
  
   <xsl:template match="rgrm:character" >
    <cs>
     <xsl:attribute name="content"><xsl:value-of select="translate(normalize-space(.), ' ', '')"/></xsl:attribute>
    </cs>
   </xsl:template>
  
   <xsl:template match="rgrm:maskedcharacter" >
    <cs>
     <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: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: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: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>
    </cs>
   </xsl:template>
  
   <xsl:template match="rgrm:character" mode="string">
    <xsl:value-of select="translate(normalize-space(.), ' ', '')"/>
   </xsl:template>
   
   <xsl:template match="rgrm:maskedcharacter" mode="string">
    <xsl:choose>
      <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'n'">
       <xsl:text disable-output-escaping="yes">&#10;</xsl:text>
      </xsl:when>
      <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'r'">
       <xsl:text disable-output-escaping="yes">&#13;</xsl:text>
      </xsl:when>
      <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 't'">
       <xsl:text disable-output-escaping="yes">&#9;</xsl:text>
      </xsl:when>
      <xsl:when test="contains(.,'\ ')">
       <xsl:text disable-output-escaping="yes">&#32;</xsl:text>
      </xsl:when>
      <xsl:otherwise>
       <xsl:value-of select="substring(translate(normalize-space(.), ' ', ''),2,1)"/>
      </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
  
   <xsl:template match="rgrm:intervall" >
    <ci>
     <xsl:attribute name="min"><xsl:value-of select="rgrm:character[1]"/></xsl:attribute>
     <xsl:attribute name="max"><xsl:value-of select="rgrm:character[2]"/></xsl:attribute>
    </ci>
   </xsl:template>
  
   <xsl:template match="rgrm:comment_decl" >
    <comment>
     <xsl:apply-templates select="rgrm:regexexpression"/>
    </comment>
   </xsl:template>
  
   <xsl:template match="rgrm:whitespace_decl" >
    <whitespace>
     <xsl:apply-templates select="rgrm:regexexpression"/>
    </whitespace>
   </xsl:template>
  
   <xsl:template match="rgrm:production_decls" >
    <productions>
     <xsl:for-each select="rgrm:production_decl/rgrm:production_defs/rgrm:production_def">
      <production>
       <xsl:attribute name="ntsymbol"><xsl:value-of select="../../rgrm:id"/></xsl:attribute>
       
       <xsl:choose>
        <xsl:when test="rgrm:reducetype_decl[.='%append']">
         <xsl:attribute name="reducetype">append</xsl:attribute>
        </xsl:when>
        <xsl:when test="rgrm:reducetype_decl[.='%resolve']">
         <xsl:attribute name="reducetype">resolve</xsl:attribute>
        </xsl:when>
        <xsl:when test="rgrm:reducetype_decl[.='%neglect']">
         <xsl:attribute name="reducetype">neglect</xsl:attribute>
        </xsl:when>
       </xsl:choose>
  
       <xsl:if test="rgrm:prec_decl">
        <xsl:attribute name="prec"><xsl:value-of select="rgrm:prec_decl/rgrm:id"/></xsl:attribute>
       </xsl:if>
  
       <xsl:apply-templates select="rgrm:ids/rgrm:id"/>
      </production>
     </xsl:for-each>
    </productions>
   </xsl:template>
  
   <xsl:template match="rgrm:id" >
    <xsl:variable name="symbol" select="text()"/>
    <xsl:choose>
     <xsl:when test="/rgrm:grammar/rgrm:token_decls/rgrm:token_decl/rgrm:id[.=$symbol]">
      <tsymbol>
       <xsl:attribute name="name"><xsl:value-of select="."/></xsl:attribute>
      </tsymbol>
     </xsl:when>
     <xsl:otherwise>
      <ntsymbol>
        <xsl:attribute name="name"><xsl:value-of select="."/></xsl:attribute>
      </ntsymbol>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
  
   <xsl:template match="rgrm:start_decl" >
    <ssymbol>
     <xsl:attribute name="ntsymbol"><xsl:value-of select="rgrm:id"/></xsl:attribute>
    </ssymbol>
   </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/editor/chaperon/stylesheets/wiki2document.xsl
  
  Index: wiki2document.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0"
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                  xmlns:wiki="http://chaperon.sourceforge.net/grammar/wiki/1.0">
  
   <xsl:output indent="yes" method="xml"/>
  
   <xsl:template match="wiki:wiki">
      <xsl:apply-templates/>
   </xsl:template>
  <!--
   <xsl:template match="//wiki">
    <div style="background: #b9d3ee; border: thin; border-color: black; border-style: solid; padding-left: 0.8em; 
                 padding-right: 0.8em; padding-top: 0px; padding-bottom: 0px; margin: 0.5ex 0px; clear: both;">
     <xsl:apply-templates select="paragraphs/paragraph"/>
    </div>
   </xsl:template>
  -->
   <xsl:template match="wiki:paragraphs" >
    <xsl:apply-templates/>
   </xsl:template>
   
   <xsl:template match="wiki:paragraph" >
    <xsl:apply-templates select="wiki:bulletedlist|wiki:numberedlist1|wiki:numberedlist2|wiki:numberedlist3|wiki:headitem|wiki:footnote|wiki:textitem|wiki:LINE"/>
   </xsl:template>
  
   <xsl:template match="wiki:textitem" >
    <p>
     <xsl:apply-templates select="wiki:firstblock|wiki:textblock"/>
    </p>
   </xsl:template>
  
   <xsl:template match="wiki:textblock" >
    <xsl:apply-templates select="wiki:LINK|wiki:boldblock|wiki:italicblock|wiki:underlineblock|wiki:TEXT|wiki:note"/>
   </xsl:template>
  
   <xsl:template match="wiki:firstblock" >
    <xsl:apply-templates select="wiki:LINK|wiki:boldblock|wiki:italicblock|wiki:underlineblock|wiki:TEXT"/>
   </xsl:template>
  
   <xsl:template match="wiki:LINE" >
    <hr/>
   </xsl:template>
  
   <xsl:template match="wiki:bulletedlist" >
    <ul>
     <xsl:apply-templates select="wiki:bulletedlistitem"/>
    </ul>
   </xsl:template>
  
   <xsl:template match="wiki:bulletedlistitem" >
    <li>
     <xsl:apply-templates select="wiki:textblock"/>
    </li>
   </xsl:template>
  
   <xsl:template match="wiki:numberedlist1" >
    <ol>
     <xsl:apply-templates select="wiki:numberedlistitem1|wiki:numberedlist2"/>
    </ol>
   </xsl:template>
  
   <xsl:template match="wiki:numberedlistitem1" >
    <li>
     <xsl:apply-templates select="wiki:textblock"/>
    </li>
   </xsl:template>
  
   <xsl:template match="wiki:numberedlist2" >
    <ol>
     <xsl:apply-templates select="wiki:numberedlistitem2|wiki:numberedlist3"/>
    </ol>
   </xsl:template>
      
   <xsl:template match="wiki:numberedlistitem2" >
    <li>
     <xsl:apply-templates select="wiki:textblock"/>
    </li>
   </xsl:template>
  
   <xsl:template match="wiki:numberedlist3" >
    <ol>
     <xsl:apply-templates select="wiki:numberedlistitem3"/>
    </ol>
   </xsl:template>
      
   <xsl:template match="wiki:numberedlistitem3" >
    <li>
     <xsl:apply-templates select="wiki:textblock"/>
    </li>
   </xsl:template>
  
   <xsl:template match="wiki:headitem" >
    <xsl:choose>
     <xsl:when test="string-length(wiki:HEAD)=2">
      <h2>
       <xsl:apply-templates select="wiki:textblock"/>
      </h2>
     </xsl:when>
     <xsl:when test="string-length(wiki:HEAD)=3">
      <h3>
       <xsl:apply-templates select="wiki:textblock"/>
      </h3>
     </xsl:when>
     <xsl:otherwise>
      <h1>
       <xsl:apply-templates select="wiki:textblock"/>
      </h1>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
  
  
   <xsl:template match="wiki:footnote" >
    <a name="{normalize-space(wiki:note/wiki:TEXT|wiki:note/wiki:LINK)}">
     [<xsl:apply-templates select="wiki:note/wiki:TEXT|wiki:note/wiki:LINK"/>]
     <xsl:apply-templates select="wiki:textblock"/>
    </a>
   </xsl:template>
  
   <xsl:template match="wiki:LINK" >
    <a href="{normalize-space(.)}">
     <xsl:value-of select="."/>
    </a>
   </xsl:template>
  
   <xsl:template match="wiki:boldblock" >
    <b>
     <xsl:value-of select="wiki:TEXT"/>
    </b>
   </xsl:template>
  
   <xsl:template match="wiki:italicblock" >
    <i>
     <xsl:value-of select="wiki:TEXT"/>
    </i>
   </xsl:template>
  
   <xsl:template match="wiki:underlineblock" >
    <u>
     <xsl:value-of select="wiki:TEXT"/>
    </u><xsl:text> </xsl:text>
   </xsl:template>
  
   <xsl:template match="wiki:note" >
    <a href="#{normalize-space(wiki:TEXT|wiki:LINK)}">
     [<xsl:apply-templates select="wiki:TEXT|wiki:LINK"/>]
    </a>
   </xsl:template>
  
   <xsl:template match="wiki:TEXT" >
    <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.1                  xml-forrest/src/resources/editor/chaperon/stylesheets/wiki2html.xsl
  
  Index: wiki2html.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0"
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                  xmlns:wiki="http://chaperon.sourceforge.net/grammar/wiki/1.0">
  
   <xsl:output indent="yes" method="xml"/>
  
   <xsl:template match="wiki:wiki">
      <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="//wiki">
    <div style="background: #b9d3ee; border: thin; border-color: black; border-style: solid; padding-left: 0.8em; 
                 padding-right: 0.8em; padding-top: 0px; padding-bottom: 0px; margin: 0.5ex 0px; clear: both;">
     <xsl:apply-templates select="paragraphs/paragraph"/>
    </div>
   </xsl:template>
  
   <xsl:template match="wiki:paragraphs" >
    <xsl:apply-templates/>
   </xsl:template>
   
   <xsl:template match="wiki:paragraph" >
    <xsl:apply-templates select="wiki:bulletedlist|wiki:numberedlist1|wiki:numberedlist2|wiki:numberedlist3|wiki:headitem|wiki:footnote|wiki:textitem|wiki:LINE"/>
   </xsl:template>
  
   <xsl:template match="wiki:textitem" >
    <p>
     <xsl:apply-templates select="wiki:firstblock|wiki:textblock"/>
    </p>
   </xsl:template>
  
   <xsl:template match="wiki:textblock" >
    <xsl:apply-templates select="wiki:LINK|wiki:boldblock|wiki:italicblock|wiki:underlineblock|wiki:TEXT|wiki:note"/>
   </xsl:template>
  
   <xsl:template match="wiki:firstblock" >
    <xsl:apply-templates select="wiki:LINK|wiki:boldblock|wiki:italicblock|wiki:underlineblock|wiki:TEXT"/>
   </xsl:template>
  
   <xsl:template match="wiki:LINE" >
    <hr/>
   </xsl:template>
  
   <xsl:template match="wiki:bulletedlist" >
    <ul>
     <xsl:apply-templates select="wiki:bulletedlistitem"/>
    </ul>
   </xsl:template>
  
   <xsl:template match="wiki:bulletedlistitem" >
    <li>
     <xsl:apply-templates select="wiki:textblock"/>
    </li>
   </xsl:template>
  
   <xsl:template match="wiki:numberedlist1" >
    <ol>
     <xsl:apply-templates select="wiki:numberedlistitem1|wiki:numberedlist2"/>
    </ol>
   </xsl:template>
  
   <xsl:template match="wiki:numberedlistitem1" >
    <li>
     <xsl:apply-templates select="wiki:textblock"/>
    </li>
   </xsl:template>
  
   <xsl:template match="wiki:numberedlist2" >
    <ol>
     <xsl:apply-templates select="wiki:numberedlistitem2|wiki:numberedlist3"/>
    </ol>
   </xsl:template>
      
   <xsl:template match="wiki:numberedlistitem2" >
    <li>
     <xsl:apply-templates select="wiki:textblock"/>
    </li>
   </xsl:template>
  
   <xsl:template match="wiki:numberedlist3" >
    <ol>
     <xsl:apply-templates select="wiki:numberedlistitem3"/>
    </ol>
   </xsl:template>
      
   <xsl:template match="wiki:numberedlistitem3" >
    <li>
     <xsl:apply-templates select="wiki:textblock"/>
    </li>
   </xsl:template>
  
   <xsl:template match="wiki:headitem" >
    <xsl:choose>
     <xsl:when test="string-length(wiki:HEAD)=2">
      <h2>
       <xsl:apply-templates select="wiki:textblock"/>
      </h2>
     </xsl:when>
     <xsl:when test="string-length(wiki:HEAD)=3">
      <h3>
       <xsl:apply-templates select="wiki:textblock"/>
      </h3>
     </xsl:when>
     <xsl:otherwise>
      <h1>
       <xsl:apply-templates select="wiki:textblock"/>
      </h1>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
  
  
   <xsl:template match="wiki:footnote" >
    <a name="{normalize-space(wiki:note/wiki:TEXT|wiki:note/wiki:LINK)}">
     [<xsl:apply-templates select="wiki:note/wiki:TEXT|wiki:note/wiki:LINK"/>]
     <xsl:apply-templates select="wiki:textblock"/>
    </a>
   </xsl:template>
  
   <xsl:template match="wiki:LINK" >
    <a href="{normalize-space(.)}">
     <xsl:value-of select="."/>
    </a>
   </xsl:template>
  
   <xsl:template match="wiki:boldblock" >
    <b>
     <xsl:value-of select="wiki:TEXT"/>
    </b>
   </xsl:template>
  
   <xsl:template match="wiki:italicblock" >
    <i>
     <xsl:value-of select="wiki:TEXT"/>
    </i>
   </xsl:template>
  
   <xsl:template match="wiki:underlineblock" >
    <u>
     <xsl:value-of select="wiki:TEXT"/>
    </u><xsl:text> </xsl:text>
   </xsl:template>
  
   <xsl:template match="wiki:note" >
    <a href="#{normalize-space(wiki:TEXT|wiki:LINK)}">
     [<xsl:apply-templates select="wiki:TEXT|wiki:LINK"/>]
    </a>
   </xsl:template>
  
   <xsl:template match="wiki:TEXT" >
    <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.1                  xml-forrest/src/resources/editor/editor/docs/editor.html
  
  Index: editor.html
  ===================================================================
  <html>
  
  <head>
  <meta http-equiv="Content-Language" content="en-us">
  <title>Apache Ant User Manual</title>
  </head>
  
  <frameset rows="40,*,35" border="0">
  <frame src="menu.html" name="menu">
  <frame src="dir/" name="main">
  <frame src="footer.html" name="footer">
  </frameset>
  <noframes>
  Please use a browsre that supports frames.
  </noframes>
  
  </html>
  
  
  
  1.1                  xml-forrest/src/resources/editor/editor/docs/footer.html
  
  Index: footer.html
  ===================================================================
    <html>
     <head>
      <title>Forrest editor</title>
  
      </head>
      <body bgcolor="lightgrey"> 
  	<sup>Copyright &#169; 1999-2002 <a href="http://www.apache.org">The Apache Software Foundation</a>. All rights reserved.</sup>
      </body>   
     </html>
  
  
  
  1.1                  xml-forrest/src/resources/editor/editor/docs/menu.html
  
  Index: menu.html
  ===================================================================
  <html>
     <head>
      <title>Forrest editor</title>
  
      </head>
      <body bgcolor="lightgrey"> 
        <a href="/edit/dir/" target="main"><img src="image/see.gif" border="0"/>Browse</a> - 
        <a href="/edit/new(bravo)/new.xml" target="main"><img src="image/see.gif" border="0"/>New</a> - 
      </body>   
  </html>
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  1.1                  xml-forrest/src/resources/editor/editor/docs/template.xml
  
  Index: template.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
  <document>
     <header>
        <title>title x</title>
  <!--
        <authors>
           <person name="Nicola Ken Barozzi" email="nicolaken@apache.org" />
        </authors>
  
        <notice>This document is a WIP.</notice>
  
        <abstract>Apache Incubator introduction.</abstract>
  -->
     </header>
  
     <body><section>
  !Example heading
    
  !!bold and italics stuff
  Here's some __bold text__ and now "some italic text I hope ". Not
  sure about italics though.
  
  !!bullets
  * first bulleted item
  * second bulleted item
  
  !!numbered lists
  # number list point 1
  ## is that 1.1?
  ### is that 1.1.1?
  # this is point 2
  # and point 3
  
  We _love_ horizontal rules [1]
  ------------
  Brought to you by [http://www.perdu.com].
  </section>
     </body>
  </document>
  
  
  
  
  1.1                  xml-forrest/src/resources/editor/editor.xmap
  
  Index: editor.xmap
  ===================================================================
  <?xml version="1.0"?>
  
  <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
    <map:components>
      <map:generators default="file">
        <map:generator label="content,data" logger="sitemap.generator.textparser" name="textparser" src="org.apache.cocoon.generation.TextParserGenerator"/>
        <map:generator label="content,data" name="stream" src="org.apache.cocoon.generation.StreamGenerator"/>
        <map:generator label="data" logger="sitemap.generator.extractor" name="extractor" src="org.apache.cocoon.generation.FragmentExtractorGenerator"/>
        <map:generator label="content,data" name="html" src="org.apache.cocoon.generation.HTMLGenerator"/>
        <map:generator label="content,data" logger="sitemap.generator.directory" name="directory" pool-grow="2" pool-max="16" pool-min="2" src="org.apache.cocoon.generation.DirectoryGenerator"/>
        <map:generator label="data" logger="sitemap.generator.request" name="request" pool-grow="2" pool-max="16" pool-min="2" src="org.apache.cocoon.generation.RequestGenerator"/>
        <map:generator label="content,data" logger="sitemap.generator.serverpages" name="serverpages" pool-grow="2" pool-max="32" pool-min="4" src="org.apache.cocoon.generation.ServerPagesGenerator"/>
        <map:generator label="data" logger="sitemap.generator.xpathdirectory" name="xpathdirectory" pool-grow="2" pool-max="32" src="org.apache.cocoon.generation.XPathDirectoryGenerator"/>    
      </map:generators>
      <map:serializers default="html">
   
        <map:serializer logger="sitemap.serializer.links" name="links" src="org.apache.cocoon.serialization.LinkSerializer"/>
        <map:serializer logger="sitemap.serializer.xml" mime-type="text/xml" name="xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
        <map:serializer logger="sitemap.serializer.text" mime-type="text/text" name="text" src="org.apache.cocoon.serialization.TextSerializer"/>
     
      </map:serializers>
      <map:transformers default="xslt">
  
        <map:transformer logger="sitemap.transformer.xinclude" name="xinclude" pool-grow="2" pool-max="16" pool-min="2" src="org.apache.cocoon.transformation.XIncludeTransformer"/>
        <map:transformer logger="sitemap.transformer.cinclude" name="cinclude" pool-grow="2" pool-max="16" pool-min="2" src="org.apache.cocoon.transformation.CIncludeTransformer"/>
        <map:transformer logger="sitemap.transformer.extractor" name="extractor" src="org.apache.cocoon.transformation.FragmentExtractorTransformer"/>
        <map:transformer logger="sitemap.transformer.filter" name="filter" src="org.apache.cocoon.transformation.FilterTransformer"/>
        <map:transformer logger="sitemap.transformer.writeDOMsession" name="writeDOMsession" src="org.apache.cocoon.transformation.WriteDOMSessionTransformer"/>
        <map:transformer logger="sitemap.transformer.readDOMsession" name="readDOMsession" src="org.apache.cocoon.transformation.ReadDOMSessionTransformer"/>
        <map:transformer logger="sitemap.transformer.encodeURL" name="encodeURL" src="org.apache.cocoon.transformation.EncodeURLTransformer"/>
        <map:transformer logger="sitemap.transformer.write-source" name="write-source" src="org.apache.cocoon.transformation.SourceWritingTransformer"/>
        <map:transformer logger="sitemap.transformer.textparser" name="textparser" src="org.apache.cocoon.transformation.TextFragmentParserTransformer"/>
        <map:transformer name="session" pool-grow="4" pool-max="32" pool-min="8" src="org.apache.cocoon.webapps.session.transformation.SessionTransformer"/>
        <map:transformer name="session-pre" pool-grow="4" pool-max="32" pool-min="8" src="org.apache.cocoon.webapps.session.transformation.SessionPreTransformer"/>
        <map:transformer name="session-post" pool-grow="4" pool-max="32" pool-min="8" src="org.apache.cocoon.webapps.session.transformation.SessionPostTransformer"/>
      
      </map:transformers>
  
      <map:readers default="resource"/>
      <map:matchers default="wildcard"/>
      <map:selectors default="browser"/>
    </map:components>
  
  	<map:views>
  		<map:view name="content" from-label="content">
  			<map:serialize type="xml"/>
  		</map:view>	
  		<map:view name="agg" from-label="agg">
  			<map:serialize type="xml"/>
  		</map:view>	
  		<map:view name="source" from-label="source">
  			<map:serialize type="xml"/>
  		</map:view>	
  	</map:views>
  
    <map:pipelines>
    
      <map:pipeline internal-only="true" cacheable="true">
  
     <!-- IMPORTANT! This pipeline sould be cachable -->
     <map:match pattern="*.grm">
      <map:generate type="textparser" src="chaperon/{1}.rgrm">
       <map:parameter name="grammar" value="chaperon/grammars/rgrm.grm"/>
      </map:generate>
  
      <map:transform src="chaperon/stylesheets/rgrm2grm.xsl"/>
      <map:serialize type="xml"/>
     </map:match>
    </map:pipeline>
    
  
  		<map:pipeline internal-only="false"><!-- true -->
  			<!-- 
  			
  				Generation pipelines to collect and format the appropriate content based on the requested behaviour and sub-editor
  				
  				-->
  
  			<!-- 
  				Directory Listing
  				
  				Uses the XPathDirectoryGenerator to extract the 'title' of each document
  				This one removes any filename from the path, (which is a PIA to do in XSL!)
  				Enforces using 'docs' folder of the main project as the root. 
  			-->
  			<map:match pattern="dir/**">
  				<map:generate type="xpathdirectory" src="content/xdocs/{1}/#/document/header/title"/>						
  				<map:transform src="editor/stylesheets/dir2skin.xsl"/>
  				<map:transform src="editor/stylesheets/skin.xsl"/>
  				<map:serialize type="html"/>							
  			</map:match>
  
  			<!-- 
  				New
  				
  				Start a new document from a template
  			-->
  			<map:match pattern="new(*)/**">
  				<map:generate src="editor/docs/template.xml"/>	<!-- get a template -->
  				<map:transform src="editor/stylesheets/file2editor.xsl"/>
  				<map:transform src="editor/stylesheets/skin.xsl"/>
  				<map:serialize type="html"/>								
  			</map:match>
  		
    
  			<!-- 
  				Put
  				
  				Create a Document out of a Request
  				save it if ther are no validation errors
  			-->
  			<map:match pattern="put">
  				<map:generate type="request"/>
  				
                 				
  				<map:transform src="editor/stylesheets/editor2writer.xsl">
  					<map:parameter name="base" value="content/xdocs"/>
  				</map:transform>
                  
                  <map:transform type="textparser">
                     <map:parameter name="grammar" value="chaperon/grammars/wiki.grm"/>
                  </map:transform>		
              
                  <map:transform src="chaperon/stylesheets/wiki2document.xsl"/>
                  				
  				<map:transform type="write-source"/>
  				
                  <map:transform src="editor/stylesheets/writeresult2skin.xsl"/>
                  				
                  <map:transform src="editor/stylesheets/skin.xsl"/>                				
                  				
  				<map:serialize type="html"/>
  			</map:match>
  
  			<!-- 
  				Pre
  				
  				Create a Preview Document out of a Request
  				validate it
  			-->
  			<map:match pattern="pre(bravo)">
  				<map:generate type="request"/>
  				
  				<map:transform src="editor/stylesheets/request2editor.xsl"/>
  				
                  <map:transform type="textparser">
                     <map:parameter name="grammar" value="chaperon/grammars/wiki.grm"/>
                  </map:transform>		
              
                  <map:transform src="chaperon/stylesheets/wiki2html.xsl"/>
              
                  <map:transform src="editor/stylesheets/skin.xsl"/>
                  
  				<map:serialize type="html"/>
  			</map:match>
  
  
  			
  			<map:match pattern="see(bravo)**.xml">
  				<map:redirect-to uri="../../{1}.html"/>
  			</map:match>
  		
  		
  			<map:match pattern="get(bravo)/**">
  			
  				<map:generate src="content/xdocs/{1}"/>
  				<map:transform src="editor/stylesheets/file2editor.xsl"/>
  				<map:transform src="editor/stylesheets/skin.xsl"/>
  				<map:serialize type="html"/>								
  
  					
  			</map:match>
  			
  					
  		</map:pipeline>
  
  		<map:pipeline>	
  		
  		    <map:match pattern="**.html">
  				<map:generate type="html" src="editor/docs/{1}.html"/>
  				<map:serialize type="html"/>
              </map:match>
  		
  			<!-- the default page -->
  			<map:match pattern="">
  				<map:redirect-to uri="edit/editor.html"/>	
  			</map:match>
  			
  			<map:match pattern="/">
  				<map:redirect-to uri="edit/editor.html"/>	
  			</map:match>
  			
  
  			<map:match pattern="**/*.gif">
  				<map:read src="editor/images/{2}.gif" mime-type="image/gif"/>
  			</map:match>
  
  			<map:match pattern="**style">
  				<map:read mime-type="text/css" src="editor/docs/slash-edit.css"/>
  			</map:match>
  
  
  			<!-- generic error handlers -->
  			<map:handle-errors>
  				<map:transform src="editor/stylesheets/error/error2html.xsl"/>
  				<map:serialize status-code="500"/>
  			</map:handle-errors>
  			
  			<map:handle-errors type="404">
  				<map:transform src="editor/stylesheets/error/error2html.xsl"/>
  				<map:serialize/>
  			</map:handle-errors>
  		
  		</map:pipeline>
  
    </map:pipelines>
  </map:sitemap>
  
  
  1.1                  xml-forrest/src/resources/editor/editor/stylesheets/error/error2html.xsl
  
  Index: error2html.xsl
  ===================================================================
  <?xml version="1.0"?>
  <!-- Author: Nicola Ken Barozzi "barozzi@nicolaken.com" -->
  
  <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:error="http://apache.org/cocoon/error/2.0">
  
  <xsl:template match="error:notify">
   <html>
    <head>
     <title>
      <xsl:value-of select="@error:type"/>:<xsl:value-of select="error:title"/>
     </title>
     <style><![CDATA[
     <!--
        H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} 
        BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;} 
        TABLE{font-family : sans-serif,Arial,Tahoma;color : black;background-color : black;} 
        B{color : white;background-color : #0086b2;}
        HR{color : #0086b2;} 
     //-->]]>
     </style>
     <script language="JavaScript1.2"><![CDATA[
      <!--
        var head="display:''"
        function expand(whatToExpand)
        {
          var head=whatToExpand.style
          if (head.display=="none"){
            head.display=""
          }
          else{
            head.display="none"
          }
        }
       //-->]]>
     </script>
    </head>
    <body>
       <table align="center" border="0" bgcolor="#000000" cellpadding="0" cellspacing="0">
      <tbody>
       <tr>
        <td>
        
        
     <table align="center" border="0" bgcolor="#000000" cellpadding="2" cellspacing="2">
      <tbody>
       <tr>
        <td bgcolor="#0086b2" colspan="2">
         <font color="#ffffff" size="+2">
          <xsl:value-of select="error:title"/>
         </font>
        </td>
       </tr>
  
       <tr>
        <td bgcolor="#ffffff" colspan="2" valign="top">
         <font color="#000000">
          The <xsl:value-of select="@error:sender"/> notifies that 
          <xsl:value-of select="error:source"/> says:<br/><br/>
          <i><xsl:call-template name="returns2br">
             <xsl:with-param name="string" select="error:message"/>
           </xsl:call-template></i><br/><br/>
          More precisely:<br/><br/>
          <i><xsl:call-template name="returns2br">
             <xsl:with-param name="string" select="error:description"/>
           </xsl:call-template></i><br/>
          <br/>
         </font>
        </td>
       </tr>
       
  <!--     
       
       <tr>
        <td bgcolor="#0086b2" valign="top">
         <font color="#ffffff" size="+1">
          <xsl:value-of select="@error:type"/>
         </font>
        </td>
        <td bgcolor="#ffffff" >
         <xsl:apply-templates select="error:message"/>
        </td>
       </tr>
  
       <tr>
        <td bgcolor="#0086b2" valign="top" colspan="2">
         <font color="#ffffff" size="+1">details</font>
        </td>
       </tr>
  
       <tr>
        <td bgcolor="#0086b2" valign="top">
         <font color="#ffffff">from</font>
        </td>
        <td bgcolor="#ffffff">
         <font face="arial,helvetica,sanserif">
          <xsl:value-of select="@error:sender"/>
         </font>
        </td>
       </tr>
  
       <tr>
        <td bgcolor="#0086b2" valign="top">
         <font color="#ffffff">source</font>
        </td>
        <td bgcolor="#ffffff">
         <font face="arial,helvetica,sanserif">
          <xsl:value-of select="error:source"/>
         </font>
        </td>
       </tr>
  
       <xsl:apply-templates select="error:description"/>
  -->
       <tr>
        <td bgcolor="#0086b2" valign="top" colspan="2">
         <font color="#ffffff" size="+1">extra info</font>
        </td>
       </tr>
  
       <xsl:apply-templates select="error:extra"/>
       
       <tr>
        <td bgcolor="#ffffff" colspan="2" valign="top">
         <font color="#000000" size="-1">
         <br/>
          If you need help and this information is not enough, you
          are invited to read the <a href="http://xml.apache.org/cocoon/faq.html">cocoon faq</a>.<br/>
          If you still don't find the answers you need,
          can send a mail to the 
          <a>
          <xsl:attribute name="href">mailto:cocoon-users@xml.apache.org?subject=[HELP]<xsl:value-of select="error:message"/>&amp;body=Description:<xsl:value-of select="error:description"/></xsl:attribute>
          Cocoon users mailing list</a>,
          remembering to
          <ul>
            <li> specify the version of Cocoon you're using, or we suppose that you
            are talking about the latest version;</li>
            <li>specify the taglibs and sitemap components that are pertinent;</li>
            <li>specify the platform-operating system-version-servlet container version;</li>
            <li>send any pertinent error message;</li>
            <li>send pertinent log snippets;</li>
            <li>send pertinent sitemap snippets;</li>
            <li>send pertinent parts of the page that gives you problems.</li>
          </ul>
          For more detailed technical information, take a look at the log
          files in the log directory of cocoon, which is <code>/WEB-INF/logs</code> by default.<br/>
          Logging configuration is by default in <code>/WEB-INF/logkit.xconf.</code><br/><br/>
          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 be sent to the developer mailing list.<br/>
         </font>
        </td>
       </tr>
         
      </tbody>
     </table>
     
     
     
           </td>
       </tr>
         
      </tbody>
     </table>
     
     
    </body>
   </html>
  </xsl:template>
  
   <xsl:template match="error:description">
    <tr>
     <td bgcolor="#0086b2" valign="top">
      <font color="#ffffff" face="arial,helvetica,sanserif">description</font>
     </td>
     <td bgcolor="#ffffff">
           <xsl:call-template name="returns2br">
             <xsl:with-param name="string" select="."/>
           </xsl:call-template>
     </td>
    </tr>
   </xsl:template>
  
   <xsl:template match="error:message">
           <xsl:call-template name="returns2br">
             <xsl:with-param name="string" select="."/>
           </xsl:call-template>
   </xsl:template>
  
   <xsl:template match="error:extra">
    <tr>
     <td bgcolor="#0086b2" valign="top">
      <font color="#ffffff">
       <xsl:value-of select="@error:description"/>
      </font>
     </td>   
     <td bgcolor="#ffffff">
      <font size="-1">
  		<xsl:choose>
  			<xsl:when test="contains(@error:description,'stacktrace')">
         <!-- degrade gracefully on Netscape-->
         <a href="javascript:" onclick="expand(document.all[this.sourceIndex+2])"><script>if(document.all){document.write('show');}</script></a>
         <div style="display:'none';">
           <xsl:call-template name="returns2br">
             <xsl:with-param name="string" select="."/>
           </xsl:call-template>
         </div>
  			</xsl:when>
  			<xsl:otherwise>
           <xsl:call-template name="returns2br">
             <xsl:with-param name="string" select="."/>
           </xsl:call-template>
  			</xsl:otherwise>
  		</xsl:choose>
      </font>
     </td>
    </tr>
   </xsl:template>
   
    <xsl:template name="returns2br">
      <xsl:param name="string"/>
      <xsl:variable name="return" select="'&#xa;'"/>
      <xsl:choose>
        <xsl:when test="contains($string,$return)">
          <xsl:value-of select="substring-before($string,$return)"/>
          <br/>
          <xsl:call-template name="returns2br">
            <xsl:with-param name="string" select="substring-after($string,$return)"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="$string"/>
        </xsl:otherwise>
     </xsl:choose>
    </xsl:template>
    
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/editor/chaperon/misc/java.css
  
  Index: java.css
  ===================================================================
  
  body { background-color: #FFFFFF; }
  
  body {  color: #000000}
  
  #Header  { color: #ffffff;  background-color:#8697a5 }
  
  #CharacerLiteral	{ color: #FF00FF; }
  #StringLiteral		{ color: #FF00FF; }
  #SingleLineComment	{ color: #008000; }
  #FormalComment		{ color: #008000; }
  #MultiLineComment	{ color: #008000; }
  #ABSTRACT		{ color: #0000FF ; font-weight: bold }
  #BOOLEAN		{ color: #0000FF ; font-weight: bold }
  #BREAK			{ color: #0000FF ; font-weight: bold }
  #BYTE			{ color: #0000FF ; font-weight: bold }
  #CASE			{ color: #0000FF ; font-weight: bold }
  #CATCH			{ color: #0000FF ; font-weight: bold }
  #CHAR			{ color: #0000FF ; font-weight: bold }
  #CLASS			{ color: #0000FF ; font-weight: bold }
  #CONST			{ color: #0000FF ; font-weight: bold }
  #CONTINUE		{ color: #0000FF ; font-weight: bold }
  #DEFAULT		{ color: #0000FF ; font-weight: bold }
  #DO			{ color: #0000FF ; font-weight: bold }
  #DOUBLE		{ color: #0000FF ; font-weight: bold }
  #ELSE			{ color: #0000FF ; font-weight: bold }
  #EXTENDS		{ color: #0000FF ; font-weight: bold }
  #FALSE			{ color: #0000FF ; font-weight: bold }
  #FINAL			{ color: #0000FF ; font-weight: bold }
  #FINALLY		{ color: #0000FF ; font-weight: bold }
  #FLOAT			{ color: #0000FF ; font-weight: bold }
  #FOR			{ color: #0000FF ; font-weight: bold }
  #GOTO			{ color: #0000FF ; font-weight: bold }
  #IF			{ color: #0000FF ; font-weight: bold }
  #IMPLEMENTS		{ color: #0000FF ; font-weight: bold }
  #IMPORT		{ color: #0000FF ; font-weight: bold }
  #INSTANCEOF		{ color: #0000FF ; font-weight: bold }
  #INT			{ color: #0000FF ; font-weight: bold }
  #INTERFACE		{ color: #0000FF ; font-weight: bold }
  #LONG			{ color: #0000FF ; font-weight: bold }
  #NATIVE		{ color: #0000FF ; font-weight: bold }
  #NEW			{ color: #0000FF ; font-weight: bold }
  #PACKAGE		{ color: #0000FF ; font-weight: bold }
  #PRIVATE		{ color: #0000FF ; font-weight: bold }
  #PROTECTED		{ color: #0000FF ; font-weight: bold }
  #PUBLIC		{ color: #0000FF ; font-weight: bold }
  #RETURN		{ color: #0000FF ; font-weight: bold }
  #SHORT			{ color: #0000FF ; font-weight: bold }
  #STATIC		{ color: #0000FF ; font-weight: bold }
  #SUPER			{ color: #0000FF ; font-weight: bold }
  #SWITCH		{ color: #0000FF ; font-weight: bold }
  #SYCHRONIZED		{ color: #0000FF ; font-weight: bold }
  #THIS			{ color: #0000FF ; font-weight: bold }
  #THROW			{ color: #0000FF ; font-weight: bold }
  #THROWS		{ color: #0000FF ; font-weight: bold }
  #TRANSIENT		{ color: #0000FF ; font-weight: bold }
  #TRUE			{ color: #0000FF ; font-weight: bold }
  #TRY			{ color: #0000FF ; font-weight: bold }
  #VOID			{ color: #0000FF ; font-weight: bold }
  #VOLATILE		{ color: #0000FF ; font-weight: bold }
  #WHILE			{ color: #0000FF ; font-weight: bold }
  #StrictFP			{ color: #0000FF ; font-weight: bold }
  #LITERAL	{ color: #b27b8c }
  #IDENTIFIER { color: #000000 }
  
  
  
  
  
  1.1                  xml-forrest/src/resources/editor/chaperon/misc/matex.xsp
  
  Index: matex.xsp
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  
  <xsp:page language="java"
            xmlns:xsp="http://apache.org/xsp"
            xmlns:xsp-request="http://apache.org/xsp/request/2.0">
  
  <html>
   <head>
    <title>Matex Exmaple</title>
   </head>
   <body>
  
    <h1>Matex Exmaple</h1>
  
    <p>
   <textfragment xmlns="http://chaperon.sourceforge.net/schema/textfragment/1.0"><xsp-request:get-parameter name="text" 
    default="M^+(t) = {i} M^{p_0}_1 \\left( P_3^4 - PQP^5_667 + \\frac{PQ}67.89PQP - \\right)"/></textfragment>
    </p>
  
    <p>
     <form action="matex.html" method="get">
  
      <xsp:element name="input">
       <xsp:attribute name="name">text</xsp:attribute>
       <xsp:attribute name="type">text</xsp:attribute>
       <xsp:attribute name="size">80</xsp:attribute>
       <xsp:attribute name="maxlength">110</xsp:attribute>
       <xsp:attribute name="value"><xsp-request:get-parameter name="text" 
         default="M^+(t) = {i} M^{p_0}_1 \\left( P_3^4 - PQP^5_667 + \\frac{PQ}67.89PQP - \\right)"/></xsp:attribute>
      </xsp:element>
     </form>
    </p>
  
   </body>
  </html>
  
  </xsp:page>
  
  
  
  1.1                  xml-forrest/src/resources/editor/chaperon/misc/mathexp.xsp
  
  Index: mathexp.xsp
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  
  <xsp:page language="java"
            xmlns:xsp="http://apache.org/xsp"
            xmlns:xsp-request="http://apache.org/xsp/request/2.0">
  
  <html>
   <head>
    <title>Mathexp Example</title>
   </head>
   <body>
  
    <h1>Mathexp Example</h1>
  
    <p>
     <textfragment xmlns="http://chaperon.sourceforge.net/schema/textfragment/1.0"><xsp-request:get-parameter name="text" 
      default="3*a-5*6/7 + ( b-c)*5- b"/></textfragment>
    </p>
  
    <p>
     <form action="mathexp.html" method="post">
  
      <xsp:element name="input">
       <xsp:attribute name="name">text</xsp:attribute>
       <xsp:attribute name="type">text</xsp:attribute>
       <xsp:attribute name="size">80</xsp:attribute>
       <xsp:attribute name="maxlength">110</xsp:attribute>
       <xsp:attribute name="value"><xsp-request:get-parameter name="text" 
         default="3*a-5*6/7 + ( b-c)*5- b"/></xsp:attribute>
      </xsp:element>
     </form>
    </p>
  
   </body>
  </html>
  
  </xsp:page>
  
  
  
  1.1                  xml-forrest/src/resources/editor/chaperon/misc/samples.xml
  
  Index: samples.xml
  ===================================================================
  <?xml version="1.0" encoding="iso-8859-1"?>
  <samples xmlns:xlink="http://www.w3.org/1999/xlink">
  
   <group name="Main examples page.">
    <sample name="Back" href="..">to Cocoon examples main page</sample>
   </group>
  
   <group name="Mathexp example">
    <sample name="Mathexp" href="mathexp.html">This example demonstrate how parser can be use to
     parse input text, like mathematical expressions.</sample>
   </group>
  
   <group name="Wiki example">
    <sample name="Wiki" href="wiki.html">In this example the parser were used to build an online editor,
     which based on the very popular syntax of Wiki.</sample>
   </group>
  
   <group name="Syntax highlighting example">
    <sample name="Example 1" href="java1.html">The parser also be used to colorize
     some source code. (Need once 2-3min, for the parser table generation process)
    </sample>
  
    <sample name="Example 2" href="java2.html">Another example.
    </sample>
   </group>
  
  </samples>
  
  
  
  
  1.1                  xml-forrest/src/resources/editor/chaperon/misc/test1.java
  
  Index: test1.java
  ===================================================================
  /*
   *  Copyright (C) Chaperon. All rights reserved.                               
   *  ------------------------------------------------------------------------- 
   *  This software is published under the terms of the Apache Software License 
   *  version 1.1, a copy of which has been included  with this distribution in 
   *  the LICENSE file.                                                         
   */
  
  package example;
  
  public class Example
  {
    public String concat(String param1, String param2) 
    {
      return param1 + param2;
    }
  }
  
  
  
  1.1                  xml-forrest/src/resources/editor/chaperon/misc/test2.java
  
  Index: test2.java
  ===================================================================
  /*
   *  Copyright (C) Chaperon. All rights reserved.                               
   *  ------------------------------------------------------------------------- 
   *  This software is published under the terms of the Apache Software License 
   *  version 1.1, a copy of which has been included  with this distribution in 
   *  the LICENSE file.                                                         
   */
  
  package net.sourceforge.chaperon.helpers;
  
  /**
   * The class maskes special characters
   *
   * @author Stephan Michels
   * @version %version%
   */
  public class Decoder
  {
  
    /**
     * Mask special characters
     *
     * @param string String
     *
     * @return Mask string
     */
    public static String decode(String string)
    {
      StringBuffer buffer = new StringBuffer();
  
      for (int i = 0; i < string.length(); i++)
      {
        if (string.charAt(i) == '\n')
          buffer.append("\\n");
        else if (string.charAt(i) == '\t')
          buffer.append("\\t");
        else if (string.charAt(i) == '\r')
          buffer.append("\\r");
        else if (string.charAt(i) == '\"')
          buffer.append("\"");
        else if (string.charAt(i) == '\\')
          buffer.append("\\");
        else if ((string.charAt(i) >= '!') && (string.charAt(i) <= '~'))
          buffer.append(string.charAt(i));
        else
        {
          String hexstring = Integer.toHexString((int) string.charAt(i));
          String zeros = "0000";
  
          buffer.append("\\u" + zeros.substring(4 - hexstring.length())
                        + hexstring);
        }
      }
      return buffer.toString();
    }
  }
  
  
  
  1.1                  xml-forrest/src/resources/editor/chaperon/misc/wiki.xsp
  
  Index: wiki.xsp
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  
  <xsp:page language="java"
            xmlns:xsp="http://apache.org/xsp"
            xmlns:xsp-request="http://apache.org/xsp/request/2.0">
  
  <html>
   <head>
    <title>Wiki example</title>
    <style>
   .title
        {
          text-align: center;
          font-size: 18px;
          font-weight: bold;
          font-family: sans-serif,Arial,Tahoma;
          color: black;
          background: white;
          border-color: black;
          border-width: 10px;
        }
        
        .main
        {
          border: 1px solid #0086B2;
          padding: 0px;
          margin: 6px;
          min-width: 630px;
        }
        
        .head
        {
          border-bottom: #0086B2;
          border-width: 0 0 1px 0;
          border-style: none none solid none;
          padding: 6px 6px 3px 6px;
        }
        
        .block { padding: 6px; }
        
        .confirm
        {
          width: 40%;
          margin-left: 50%;
          padding: 6px;
        }
        
        .content
        {
          border: 1px solid #0086B2; 
          padding: 6px;
          margin: 1px;
        }
   
        tr 
        {
          padding: 2px 6px 2px 6px;
        }
             
      
        .col1
        {
          font-weight: bold;
        }
  
         .error .col1
        {
          padding: 2px 20px 2px 6px;
        }
  
         .error .col2
        {
          color:#BB0000;
          padding: 2px 20px 2px 6px;
        }
       
        .field { }
        
        .notify
        {
          font-size: 15px;
          text-align: left;
        }
        
        .tools { text-align: right; }
        .tool { padding: 6px; }
        
        .notes
        {
          font-size: 12px;
          font-weight: bold;
          color: white;
          background: #0086B2;
          text-align: left;
          padding: 6px 6px 3px 6px;
        }
        
        .foot
        {
          text-align: center;
          font-size: 12px;
          margin-top: 50px;
        }
        
        .hspace { margin: 30px; }
        #left { float: left; }
        #right { float: right; }
        #center { text-align: center; }
        #row { background: #EEFFFF; }
        
        .failure
        {
          font-weight: bold;
          color: #BB0000;
        }
        
        .warning
        {
          font-weight: bold;
          color: #BB0000;
        }
        
        .success
        {
          font-weight: bold;
          color: green;
        }
        
        .tab
        {
          font-size: 12px;
          font-weight: bold;
          color: white;
          background: #0086B2;
          padding: 4px 4px 2px 4px;
          border: 0px solid #0086B2;
          margin: 1px;
        }
        
        .tab a
        {
          text-decoration: none;
          color: white;
        }
        
        .tab a:visited
        {
          text-decoration: none;
          color: white;
        }
        
        .tab a:link
        {
          text-decoration: none;
          color: white;
        }
        
        .tab a:hover
        {
          text-decoration: underline;
          color: red;
        }
        
        a { text-decoration: none; }
        
        a:hover
        {
          text-decoration: underline;
          color: red;
        }
        
        body
        {
          font-size: 12px;
          font-family: sans-serif,Arial,Tahoma;
          color: black;
          background: white;
        }
        
        form { font-size: 12px; }
        
        textarea
        {
          background-color: #EEFFFF;
          font-size: 12px;
          font-family: geneva,arial,sans-serif;
          border-color: #0086B2;
          border-width: 1px;
          padding-left: 2px;
        }
        
        textarea.hidden { display: none; }
        
        input
        {
          background-color: #EEFFFF;
          font-size: 12px;
          font-family: geneva,arial,sans-serif;
          border-color: #0086B2;
          border-width: 1px;
          padding-left: 2px;
        }
        
        input.submit
        {
          background-color: #0086B2;
          font-size: 12px;
          font-family: geneva,arial,sans-serif;
          border-color: black;
          border-width: 1px;
          padding: 2px 6px;
          font-weight: bold;
          color: white;
        }
        
        input.button
        {
          background-color: #BB0000;
          font-size: 12px;
          font-family: geneva,arial,sans-serif;
          border-color: black;
          border-width: 1px;
          padding: 2px 6px;
          font-weight: bold;
          color: white;
        }
   </style>
   </head>
   <body>
  
    <div class="title">Wiki example</div>
  
    <p>
     <div class="block"><span class="tab">Preview</span><div class="content">
   <textfragment xmlns="http://chaperon.sourceforge.net/schema/textfragment/1.0"><xsp-request:get-parameter name="text" default="No text"/></textfragment>
     </div></div>
    </p>
  
    <p>
  
     <form action="wiki.html" method="post">
  
     <div class="block"><span class="tab">Content</span><div class="field">
  
     <textarea name="text" type="textarea" cols="100" rows="23" style="width: 100%">!Example heading
    
  !!bold and italics stuff
  Here's some __bold text__ and now &quot;some italic text I hope &quot;. Not
  sure about italics though.
  
  !!bullets
  * first bulleted item
  * second bulleted item
  
  !!numbered lists
  # number list point 1
  ## is that 1.1?
  ### is that 1.1.1?
  # this is point 2
  # and point 3
  
  We _love_ horizontal rules [1]
  ------------
  Brought to you by [http://www.perdu.com].
  
  [1] and footnotes too.
     </textarea><br/>
     </div></div>
  
     <div style="text-align:right" class="block">
     <input value="Preview" type="submit" class="submit"/>
     </div>
  
     </form>
    </p>
  
   </body>
  </html>
  
  </xsp:page>
  
  
  
  1.1                  xml-forrest/src/resources/editor/chaperon/grammars/java.rgrm
  
  Index: java.rgrm
  ===================================================================
  /*------------------------------------------------------------------
   * Copyright (C)
   *   1996, 1997, 1998 Dmitri Bronnikov, All rights reserved.
   *
   * THIS GRAMMAR IS PROVIDED "AS IS" WITHOUT  ANY  EXPRESS  OR
   * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   * WARRANTIES  OF  MERCHANTABILITY  AND  FITNESS  FOR  A  PARTICULAR
   * PURPOSE, OR NON-INFRINGMENT.
   *
   * Bronikov@inreach.com
   *
   *------------------------------------------------------------------
   *
   * VERSION 1.06 DATE 20 AUG 1998
   *
   *------------------------------------------------------------------
   *
   * UPDATES
   *
   * 1.06 Correction of Java 1.1 syntax
   * 1.05 Yet more Java 1.1
   *      <qualified name>.<allocation expression>
   * 1.04 More Java 1.1 features:
   *      <class name>.this
   *      <type name>.class
   * 1.03 Added Java 1.1 features:
   *      inner classes,
   *      anonymous classes,
   *      non-static initializer blocks,
   *      array initialization by new operator
   * 1.02 Corrected cast expression syntax
   * 1.01 All shift/reduce conflicts, except dangling else, resolved
   *
   *------------------------------------------------------------------
   *
   * PARSING CONFLICTS RESOLVED
   *
   * Some Shift/Reduce conflicts have been resolved at the expense of
   * the grammar defines a superset of the language. The following
   * actions have to be performed to complete program syntax checking:
   *
   * 1) Check that modifiers applied to a class, interface, field,
   *    or constructor are allowed in respectively a class, inteface,
   *    field or constructor declaration. For example, a class
   *    declaration should not allow other modifiers than abstract,
   *    final and public.
   *
   * 2) For an expression statement, check it is either increment, or
   *    decrement, or assignment expression.
   *
   * 3) Check that type expression in a cast operator indicates a type.
   *    Some of the compilers that I have tested will allow simultaneous
   *    use of identically named type and variable in the same scope
   *    depending on context.
   *
   * 4) Change lexical definition to change '[' optionally followed by
   *    any number of white-space characters immediately followed by ']'
   *    to OP_DIM token. I defined this token as [\[]{white_space}*[\]]
   *    in the lexer.
   *
   *------------------------------------------------------------------
   *
   * UNRESOLVED SHIFT/REDUCE CONFLICTS
   *
   * Dangling else in if-then-else
   *
   *------------------------------------------------------------------
   */
  
  %uri "http://chaperon.sourceforge.net/grammar/java/1.0";
  
  %token DOPEN     \(;
  %token DCLOSE    \);
  %token COPEN     \{;
  %token CCLOSE    \};
  %token BOPEN     \[;
  %token BCLOSE    \];
  %token SEMICOLON \;;
  %token COMMA     \,;
  %token DOT       \.;
  
  %token OP_EQ    ==;
  %token OP_LE    \<=;
  %token OP_GE    \>=;
  %token OP_NE    !=;
  %token OP_LOR   \|\|;
  %token OP_LAND  &&;
  %token OP_INC   \+\+;
  %token OP_DEC   \-\-;
  %token OP_SHR   \>\>;
  %token OP_SHL   \<\<;
  %token OP_SHRR  \>\>\>;
  %token ASS_OP   \+= | \-= | \*= | /= | &= | \|= | \^= | \%= | \<\<= | \>\>= | \>\>\>=;
  
  %token EQ    \=;
  %token GT    \>;
  %token LT    \<;
  %token NOT   \!;
  %token TILDE \~;
  %token QM    \?;
  %token COLON \:;
  %token PLUS  \+;
  %token MINUS \-;
  %token MULT  \*;
  %token DIV   \/;
  %token AND   \&;
  %token OR    \|;
  %token XOR   \^;
  %token MOD   \%;
  
  %token BOOLLIT true|false;
  
  %token ABSTRACT     abstract;
  %token DO           do;
  %token IMPLEMENTS   implements;
  %token PACKAGE      package;
  %token THROW        throw;
  %token BOOLEAN      boolean;
  %token DOUBLE       double;
  %token IMPORT       import;
  %token PRIVATE      private;
  %token THROWS       throws;
  %token BREAK        break;
  
  %right ELSE         else;
  
  %token INNER        inner;
  %token PROTECTED    protected;
  %token TRANSIENT    transient;
  %token BYTE         byte;
  %token EXTENDS      extends;
  %token INSTANCEOF   instanceof;
  %token PUBLIC       public;
  %token TRY          try;
  %token CASE         case;
  %token FINAL        final;
  %token INT          int;
  %token REST         rest;
  %token VAR          var;
  %token CAST         cast;
  %token FINALLY      finally;
  %token INTERFACE    interface;
  %token RETURN       return;
  %token VOID         void;
  %token CATCH        catch;
  %token FLOAT        float;
  %token LONG         long;
  %token SHORT        short;
  %token VOLATILE     volatile;
  %token CHAR         char;
  %token FOR          for;
  %token NATIVE       native;
  %token STATIC       static;
  %token WHILE        while;
  %token CLASS        class;
  %token FUTURE       future;
  %token NEW          new;
  %token SUPER        super;
  %token CONST        const;
  %token GENERIC      generic;
  %token NULL         null;
  %token SWITCH       switch;
  %token CONTINUE     continue;
  %token GOTO         goto;
  %token OPERATOR     operator;
  %token SYNCHRONIZED synchronized;
  %token DEFAULT      default;
  %token IF           if;
  %token OUTER        outer;
  %token THIS         this;
  
  %ab HexDigit        [0-9a-fA-F];
  %ab Digit           [0-9];
  %ab OctalDigit      [0-7];
  %ab TetraDigit      [0-3];
  %ab NonZeroDigit    [1-9];
  %ab Letter          [a-zA-Z_];
  %ab AnyButSlash     [^\/];
  %ab AnyButAstr      [^\*];
  %ab UniEsc          [\1b];
  
  %ab OctEscape1      \\ <OctalDigit>;
  %ab OctEscape2      \\ <OctalDigit><OctalDigit>;
  %ab OctEscape3      \\ <TetraDigit><OctalDigit><OctalDigit>;
  %ab OctEscape       (<OctEscape1>|<OctEscape2>|<OctEscape3>);
  
  %ab Escape          [\\]([rnbft\\\'\"]);
  %ab ULetter         (<Letter>|<UniEsc>);
  %ab Identifier      <ULetter>(<ULetter>|<Digit>)*;
  
  %ab IntSuffix       (l|L);
  %ab DecimalNum      <NonZeroDigit><Digit>*<IntSuffix>?;
  %ab OctalNum        0 <OctalDigit>*<IntSuffix>?;
  %ab HexNum          0 (x|X) <HexDigit><HexDigit>*<IntSuffix>?;
  %ab IntegerLiteral  (<DecimalNum>|<OctalNum>|<HexNum>);
  
  %ab Sign            (\+ | \-);
  %ab FlSuffix        (f|F|d|D);
  %ab SignedInt       <Sign>?<Digit>+;
  %ab Expo            (e|E);
  %ab ExponentPart    <Expo><SignedInt>?;
  %ab Float1          <Digit>+ \. (<Digit>+)?<ExponentPart>?<FlSuffix>?;
  %ab Float2          \. <Digit>+<ExponentPart>?<FlSuffix>?;
  %ab Float3          <Digit>+<ExponentPart><FlSuffix>?;
  %ab Float4          <Digit>+<FlSuffix>;
  %ab FloatingPoint   (<Float1>|<Float2>|<Float3>|<Float4>);
  
  %ab AnyChrChr       [^\\'];
  %ab AnyStrChr       [^\\\"];
  %ab Character       \' (<Escape>|<OctEscape>|<AnyChrChr>)  \' ;
  %ab String          \" (<Escape>|<OctEscape>|<AnyStrChr>)* \" ;
  %ab Numeric         (<IntegerLiteral>|<FloatingPoint>);
  
  %token LITERAL         (<Numeric>|<Character>|<String>);
  
  %token IDENTIFIER   ([a-zA-Z_]|[\1b])(([a-zA-Z_]|[\1b])|[0-9])*;
  
  
  //%token OP_DIM \[ ([\r\n\f\t\b\ ]|( \/ \* ([^\*]| \* [^\/])* \*  \/ |
  //              \/ \/ (.*)))* \] ;
  
  //%whitespace [\r\n\f\t\b\ ];
  
  
  %token OP_DIM \[ ([\r\n\t\ ]|( \/ \* ([^\*]| \* [^\/])* \*  \/ |
                 \/ \/ (.*)))* \] ;
  
  %ignore whitespace [\t\ ];
  
  %ignore eol \r(\n)?|\n;
  
  %ab Comment1        \/ \* (<AnyButAstr>|[\*]<AnyButSlash>)* \* \/;
  %ab Comment2        \/ \/ (.*);
  %ignore comment         (<Comment1>|<Comment2>);
  
  %start CompilationUnit;
  
  %%
  
  TypeSpecifier
  	: TypeName
  	| TypeName Dims
  	;
  
  TypeName
  	: PrimitiveType
  	| QualifiedName
  	;
  
  ClassNameList
    : QualifiedName
    | ClassNameList COMMA QualifiedName
  	;
  
  PrimitiveType
  	: BOOLEAN
  	| CHAR
  	| BYTE
  	| SHORT
  	| INT
  	| LONG
  	| FLOAT
  	| DOUBLE
  	| VOID
  	;
  
  SemiColons
  	: SEMICOLON
    | SemiColons SEMICOLON
    ;
  
  CompilationUnit
  	: ProgramFile
    ;
  
  ProgramFile
  	: PackageStatement ImportStatements TypeDeclarations
  	| PackageStatement ImportStatements
  	| PackageStatement                  TypeDeclarations
  	|                  ImportStatements TypeDeclarations
  	| PackageStatement
  	|                  ImportStatements
  	|                                   TypeDeclarations
  	;
  
  PackageStatement
  	: PACKAGE QualifiedName SemiColons
  	;
  
  TypeDeclarations
  	: TypeDeclarationOptSemi
  	| TypeDeclarations TypeDeclarationOptSemi
  	;
  
  TypeDeclarationOptSemi
    : TypeDeclaration
    | TypeDeclaration SemiColons
    ;
  
  ImportStatements
  	: ImportStatement
  	| ImportStatements ImportStatement
  	;
  
  ImportStatement
  	: IMPORT QualifiedName SemiColons
  	| IMPORT QualifiedName DOT MULT SemiColons
  	;
  
  QualifiedName
  	: IDENTIFIER %append
  	| QualifiedName DOT IDENTIFIER %append
  	;
  
  TypeDeclaration
  	: ClassHeader COPEN FieldDeclarations CCLOSE
  	| ClassHeader COPEN CCLOSE
  	;
  
  ClassHeader
  	: Modifiers ClassWord IDENTIFIER Extends Interfaces
  	| Modifiers ClassWord IDENTIFIER Extends
  	| Modifiers ClassWord IDENTIFIER         Interfaces
  	|           ClassWord IDENTIFIER Extends Interfaces
  	| Modifiers ClassWord IDENTIFIER
  	|           ClassWord IDENTIFIER Extends
  	|           ClassWord IDENTIFIER         Interfaces
  	|           ClassWord IDENTIFIER
  	;
  
  Modifiers
  	: Modifier %append
  	| Modifiers Modifier %append
  	;
  
  Modifier
  	: ABSTRACT
  	| FINAL
  	| PUBLIC
  	| PROTECTED
  	| PRIVATE
  	| STATIC
  	| TRANSIENT
  	| VOLATILE
  	| NATIVE
  	| SYNCHRONIZED
  	;
  
  ClassWord
  	: CLASS
  	| INTERFACE
  	;
  
  Interfaces
  	: IMPLEMENTS ClassNameList
  	;
  
  FieldDeclarations
  	: FieldDeclarationOptSemi
    | FieldDeclarations FieldDeclarationOptSemi
  	;
  
  FieldDeclarationOptSemi
    : FieldDeclaration
    | FieldDeclaration SemiColons
    ;
  
  FieldDeclaration
  	: FieldVariableDeclaration SEMICOLON
  	| MethodDeclaration
  	| ConstructorDeclaration
  	| StaticInitializer
    | NonStaticInitializer
    | TypeDeclaration
  	;
  
  FieldVariableDeclaration
  	: Modifiers TypeSpecifier VariableDeclarators
  	|           TypeSpecifier VariableDeclarators
  	;
  
  VariableDeclarators
  	: VariableDeclarator
  	| VariableDeclarators COMMA VariableDeclarator
  	;
  
  VariableDeclarator
  	: DeclaratorName
  	| DeclaratorName EQ VariableInitializer
  	;
  
  VariableInitializer
  	: Expression
  	| COPEN CCLOSE
    | COPEN ArrayInitializers CCLOSE
    ;
  
  ArrayInitializers
  	: VariableInitializer
  	| ArrayInitializers COMMA VariableInitializer
  	| ArrayInitializers COMMA
  	;
  
  MethodDeclaration
  	: Modifiers TypeSpecifier MethodDeclarator Throws MethodBody
  	| Modifiers TypeSpecifier MethodDeclarator        MethodBody
  	|           TypeSpecifier MethodDeclarator Throws MethodBody
  	|           TypeSpecifier MethodDeclarator        MethodBody
  	;
  
  MethodDeclarator
  	: DeclaratorName DOPEN ParameterList DCLOSE
  	| DeclaratorName DOPEN DCLOSE
  	| MethodDeclarator OP_DIM
  	;
  
  ParameterList
  	: Parameter
  	| ParameterList COMMA Parameter
  	;
  
  Parameter
  	: TypeSpecifier DeclaratorName
    | FINAL TypeSpecifier DeclaratorName
  	;
  
  DeclaratorName
  	: IDENTIFIER
    | DeclaratorName OP_DIM
    ;
  
  Throws
  	: THROWS ClassNameList
  	;
  
  MethodBody
  	: Block
  	| SEMICOLON
  	;
  
  ConstructorDeclaration
  	: Modifiers ConstructorDeclarator Throws Block
  	| Modifiers ConstructorDeclarator        Block
  	|           ConstructorDeclarator Throws Block
  	|           ConstructorDeclarator        Block
  	;
  
  ConstructorDeclarator
  	: IDENTIFIER DOPEN ParameterList DCLOSE
  	| IDENTIFIER DOPEN DCLOSE
  	;
  
  StaticInitializer
  	: STATIC Block
  	;
  
  NonStaticInitializer
    : Block
    ;
  
  Extends
  	: EXTENDS TypeName
  	| Extends COMMA TypeName
  	;
  
  Block
  	: COPEN LocalVariableDeclarationsAndStatements CCLOSE
  	| COPEN CCLOSE
    ;
  
  LocalVariableDeclarationsAndStatements
  	: LocalVariableDeclarationOrStatement %append
  	| LocalVariableDeclarationsAndStatements LocalVariableDeclarationOrStatement %append
  	;
  
  LocalVariableDeclarationOrStatement
  	: LocalVariableDeclarationStatement
  	| Statement
  	;
  
  LocalVariableDeclarationStatement
  	: TypeSpecifier VariableDeclarators SEMICOLON
    | FINAL TypeSpecifier VariableDeclarators SEMICOLON
  	;
  
  Statement
  	: EmptyStatement
  	| LabelStatement
  	| ExpressionStatement SEMICOLON
    | SelectionStatement
    | IterationStatement
  	| JumpStatement
  	| GuardingStatement
  	| Block
  	;
  
  EmptyStatement
  	: SEMICOLON
    ;
  
  LabelStatement
  	: IDENTIFIER COLON
    | CASE ConstantExpression COLON
  	| DEFAULT COLON
    ;
  
  ExpressionStatement
  	: Expression
  	;
  
  SelectionStatement
  	: IF DOPEN Expression DCLOSE Statement %prec ELSE
    | IF DOPEN Expression DCLOSE Statement ELSE Statement %prec ELSE
    | SWITCH DOPEN Expression DCLOSE Block
    ;
  
  IterationStatement
  	: WHILE DOPEN Expression DCLOSE Statement
  	| DO Statement WHILE DOPEN Expression DCLOSE SEMICOLON
  	| FOR DOPEN ForInit ForExpr ForIncr DCLOSE Statement
  	| FOR DOPEN ForInit ForExpr         DCLOSE Statement
  	;
  
  ForInit
  	: ExpressionStatements SEMICOLON
  	| LocalVariableDeclarationStatement
  	| SEMICOLON
  	;
  
  ForExpr
  	: Expression SEMICOLON
  	| SEMICOLON
  	;
  
  ForIncr
  	: ExpressionStatements
  	;
  
  ExpressionStatements
  	: ExpressionStatement %resolve
  	| ExpressionStatements COMMA ExpressionStatement
  	;
  
  JumpStatement
  	: BREAK IDENTIFIER SEMICOLON
  	| BREAK            SEMICOLON
    | CONTINUE IDENTIFIER SEMICOLON
  	| CONTINUE            SEMICOLON
  	| RETURN Expression SEMICOLON
  	| RETURN            SEMICOLON
  	| THROW Expression SEMICOLON
  	;
  
  GuardingStatement
  	: SYNCHRONIZED DOPEN Expression DCLOSE Statement
  	| TRY Block Finally
  	| TRY Block Catches
  	| TRY Block Catches Finally
  	;
  
  Catches
  	: Catch
  	| Catches Catch
  	;
  
  Catch
  	: CatchHeader Block
  	;
  
  CatchHeader
  	: CATCH DOPEN TypeSpecifier IDENTIFIER DCLOSE
  	| CATCH DOPEN TypeSpecifier DCLOSE
  	;
  
  Finally
  	: FINALLY Block
  	;
  
  PrimaryExpression
  	: QualifiedName %resolve
  	| NotJustName %resolve
  	;
  
  NotJustName
  	: SpecialName %resolve
  	| NewAllocationExpression %resolve
  	| ComplexPrimary %resolve
  	;
  
  ComplexPrimary
  	: DOPEN Expression DCLOSE
  	| ComplexPrimaryNoParenthesis %resolve
  	;
  
  ComplexPrimaryNoParenthesis
  	: LITERAL
  	| BOOLLIT
  	| ArrayAccess
  	| FieldAccess
  	| MethodCall
  	;
  
  ArrayAccess
  	: QualifiedName  BOPEN Expression BCLOSE
  	| ComplexPrimary BOPEN Expression BCLOSE
  	;
  
  FieldAccess
  	: NotJustName DOT IDENTIFIER
  	| RealPostfixExpression DOT IDENTIFIER
    | QualifiedName DOT THIS
    | QualifiedName DOT CLASS
    | PrimitiveType DOT CLASS
  	;
  
  MethodCall
  	: MethodAccess DOPEN ArgumentList DCLOSE
  	| MethodAccess DOPEN DCLOSE
  	;
  
  MethodAccess
  	: ComplexPrimaryNoParenthesis
  	| SpecialName
  	| QualifiedName
  	;
  
  SpecialName
  	: THIS
  	| SUPER
  	| NULL
  	;
  
  ArgumentList
  	: Expression
  	| ArgumentList COMMA Expression
  	;
  
  NewAllocationExpression
    : PlainNewAllocationExpression
    | QualifiedName DOT PlainNewAllocationExpression
    ;
  
  PlainNewAllocationExpression
   	: ArrayAllocationExpression
   	| ClassAllocationExpression
   	| ArrayAllocationExpression COPEN CCLOSE
   	| ClassAllocationExpression COPEN CCLOSE
   	| ArrayAllocationExpression COPEN ArrayInitializers CCLOSE
   	| ClassAllocationExpression COPEN FieldDeclarations CCLOSE
   	;
  
  ClassAllocationExpression
  	: NEW TypeName DOPEN ArgumentList DCLOSE
  	| NEW TypeName DOPEN              DCLOSE
    ;
  
  ArrayAllocationExpression
  	: NEW TypeName DimExprs Dims
  	| NEW TypeName DimExprs
    | NEW TypeName Dims
  	;
  
  DimExprs
  	: DimExpr
  	| DimExprs DimExpr
  	;
  
  DimExpr
  	: BOPEN Expression BCLOSE
  	;
  
  Dims
  	: OP_DIM
  	| Dims OP_DIM
  	;
  
  PostfixExpression
  	: PrimaryExpression %resolve
  	| RealPostfixExpression %resolve
  	;
  
  RealPostfixExpression
  	: PostfixExpression OP_INC
  	| PostfixExpression OP_DEC
  	;
  
  UnaryExpression
  	: OP_INC UnaryExpression
  	| OP_DEC UnaryExpression
  	| ArithmeticUnaryOperator CastExpression
  	| LogicalUnaryExpression %resolve
  	;
  
  LogicalUnaryExpression
  	: PostfixExpression %resolve
  	| LogicalUnaryOperator UnaryExpression
  	;
  
  LogicalUnaryOperator
  	: TILDE
  	| NOT
  	;
  
  ArithmeticUnaryOperator
  	: PLUS
  	| MINUS
  	;
  
  CastExpression
  	: UnaryExpression %resolve
  	| DOPEN PrimitiveTypeExpression DCLOSE CastExpression
  	| DOPEN ClassTypeExpression DCLOSE CastExpression
  	| DOPEN Expression DCLOSE LogicalUnaryExpression
  	;
  
  PrimitiveTypeExpression
  	: PrimitiveType 
    | PrimitiveType Dims
    ;
  
  ClassTypeExpression
  	: QualifiedName Dims
    ;
  
  MultiplicativeExpression
  	: CastExpression %resolve
  	| MultiplicativeExpression MULT CastExpression
  	| MultiplicativeExpression DIV CastExpression
  	| MultiplicativeExpression MOD CastExpression
  	;
  
  AdditiveExpression
  	: MultiplicativeExpression %resolve
    | AdditiveExpression PLUS MultiplicativeExpression
  	| AdditiveExpression MINUS MultiplicativeExpression
    ;
  
  ShiftExpression 
  	: AdditiveExpression %resolve
    | ShiftExpression OP_SHL AdditiveExpression
    | ShiftExpression OP_SHR AdditiveExpression
    | ShiftExpression OP_SHRR AdditiveExpression
  	;
  
  RelationalExpression
  	: ShiftExpression %resolve
    | RelationalExpression LT ShiftExpression
  	| RelationalExpression GT ShiftExpression
  	| RelationalExpression OP_LE ShiftExpression
  	| RelationalExpression OP_GE ShiftExpression
  	| RelationalExpression INSTANCEOF TypeSpecifier
  	;
  
  EqualityExpression
  	: RelationalExpression %resolve
    | EqualityExpression OP_EQ RelationalExpression
    | EqualityExpression OP_NE RelationalExpression
    ;
  
  AndExpression
  	: EqualityExpression %resolve
    | AndExpression AND EqualityExpression
    ;
  
  ExclusiveOrExpression
  	: AndExpression %resolve
  	| ExclusiveOrExpression XOR AndExpression
  	;
  
  InclusiveOrExpression
  	: ExclusiveOrExpression %resolve
  	| InclusiveOrExpression OR ExclusiveOrExpression
  	;
  
  ConditionalAndExpression
  	: InclusiveOrExpression %resolve
  	| ConditionalAndExpression OP_LAND InclusiveOrExpression
  	;
  
  ConditionalOrExpression
  	: ConditionalAndExpression %resolve
  	| ConditionalOrExpression OP_LOR ConditionalAndExpression
  	;
  
  ConditionalExpression
  	: ConditionalOrExpression %resolve
  	| ConditionalOrExpression QM Expression COLON ConditionalExpression
  	;
  
  AssignmentExpression
  	: ConditionalExpression %resolve
  	| UnaryExpression AssignmentOperator AssignmentExpression
  	;
  
  AssignmentOperator
  	: EQ
  	| ASS_OP
  	;
  
  Expression
  	: AssignmentExpression
    ;
  
  ConstantExpression
  	: ConditionalExpression
  	;
  
  
  
  
  
  1.1                  xml-forrest/src/resources/editor/chaperon/grammars/mathexp.grm
  
  Index: mathexp.grm
  ===================================================================
  <?xml version="1.0"?>
  <!--<!DOCTYPE grammar PUBLIC "-//Chaperon//DTD grammar 1.0//EN" "grammar.dtd">-->
  
  <grammar uri="http://chaperon.sourceforge.net/grammar/mathexp/1.0">
   <tokens>
  
    <token tsymbol="plus">
     <cc><cs content="+-"/></cc>
    </token>
  
    <token tsymbol="mult">
     <cc><cs content="*/"/></cc>
    </token>
  
    <token tsymbol="dopen">
     <string content="("/>
    </token>
  
    <token tsymbol="dclose">
     <string content=")"/>
    </token>
  
    <token tsymbol="id">
     <concat>
      <cc><ci min="A" max="Z"/><ci min="a" max="z"/></cc>
      <cc minOccurs="0" maxOccurs="*"><ci min="A" max="Z"/><ci min="a" max="z"/><ci min="0" max="9"/><cs content="_"/></cc>
     </concat>
    </token>
  
    <token tsymbol="number">
     <alt>
      <concat>
       <cc minOccurs="1" maxOccurs="*"><ci min="0" max="9"/></cc>
       <concat minOccurs="0" maxOccurs="1">
        <string content="."/>
        <cc minOccurs="0" maxOccurs="*"><ci min="0" max="9"/></cc>
       </concat>
      </concat>
      <concat>
       <string content="."/>
       <cc minOccurs="1" maxOccurs="*"><ci min="0" max="9"/></cc>
      </concat>
     </alt>
    </token>
  
   </tokens>
  
   <ignorabletokens>
    <token tsymbol="whitespace">
     <cc maxOccurs="*"><cs content="&#10;&#13;&#9;&#32;"/></cc>
    </token>
   </ignorabletokens>
  
   <productions>
  
    <production ntsymbol="E">
     <ntsymbol name="E"/><tsymbol name="plus"/><ntsymbol name="T"/>
  	</production>
  
    <production ntsymbol="E">
     <ntsymbol name="T"/>
    </production>
  
    <production ntsymbol="T">
     <ntsymbol name="T"/><tsymbol name="mult"/><ntsymbol name="F"/>
    </production>
  
    <production ntsymbol="T">
     <ntsymbol name="F"/>
    </production>
  
    <production ntsymbol="F">
     <tsymbol name="dopen"/><ntsymbol name="E"/><tsymbol name="dclose"/>
    </production>
  
    <production ntsymbol="F">
     <tsymbol name="id"/>
    </production>
  
    <production ntsymbol="F">
     <tsymbol name="number"/>
    </production>
  
   </productions>
  
   <ssymbol ntsymbol="E"/>
  </grammar>
  
  
  
  1.1                  xml-forrest/src/resources/editor/chaperon/grammars/rgrm.grm
  
  Index: rgrm.grm
  ===================================================================
  <?xml version="1.0" standalone="no"?>
  <!--<!DOCTYPE grammar PUBLIC "-//Chaperon//DTD grammar 1.0//EN" "grammar.dtd">-->
  
  <grammar uri="http://chaperon.sourceforge.net/grammar/rgrm/1.0">
   <tokens>
  
    <token tsymbol="token_decl">
     <alt>
      <string content="%token"/>
      <string content="%left"/>
      <string content="%right"/>
     </alt>
    </token>
  
    <token tsymbol="ab_decl">
     <string content="%ab"/>
    </token>
  
    <token tsymbol="start_decl">
     <string content="%start"/>
    </token>
  
    <token tsymbol="ignorabletoken_decl">
     <string content="%ignore"/>
    </token>
  
    <token tsymbol="reducetype_decl">
     <alt>
      <string content="%normal"/>
      <string content="%append"/>
      <string content="%resolve"/>
      <string content="%neglect"/>
     </alt>
    </token>
  
    <token tsymbol="prec_decl">
     <string content="%prec"/>
    </token>
  
    <token tsymbol="uri_decl">
     <string content="%uri"/>
    </token>
  
    <token tsymbol="delimiter">
     <string content="%%"/>
    </token>
  
    <token tsymbol="colon">
     <string content=":"/>
    </token>
  
    <token tsymbol="alt">
     <string content="|"/>
    </token>
  
    <token tsymbol="semicolon">
     <string content=";"/>
    </token>
  
    <token tsymbol="comma">
     <string content=","/>
    </token>
  
    <token tsymbol="number">
     <cc minOccurs="1" maxOccurs="*"><ci min="0" max="9"/></cc>
    </token>
  
    <token tsymbol="copen">
     <string content="{"/>
    </token>
  
    <token tsymbol="cclose">
     <string content="}"/>
    </token>
  
    <token tsymbol="abopen">
     <string content="&lt;"/>
    </token>
  
    <token tsymbol="abclose">
     <string content=">"/>
    </token>
  
    <token tsymbol="string">
     <concat>
      <string content="&#34;"/>
      <alt minOccurs="1" maxOccurs="*">
       <ncc><cs content="&#92;&#34;"/></ncc>
       <concat><string content="&#92;"/><ncc><cs content="u"/></ncc></concat>
       <concat>
        <string content="&#92;u"/>
        <cc><ci min="0" max="9"/><ci min="a" max="f"/><ci min="A" max="F"/></cc>
        <cc><ci min="0" max="9"/><ci min="a" max="f"/><ci min="A" max="F"/></cc>
        <cc><ci min="0" max="9"/><ci min="a" max="f"/><ci min="A" max="F"/></cc>
        <cc><ci min="0" max="9"/><ci min="a" max="f"/><ci min="A" max="F"/></cc>
       </concat>
      </alt>
      <string content="&#34;"/>
     </concat>
    </token>
  
    <token tsymbol="id">
     <concat>
      <cc><ci min="A" max="Z"/><ci min="a" max="z"/></cc>
      <cc minOccurs="0" maxOccurs="*">
       <ci min="A" max="Z"/><ci min="a" max="z"/><ci min="0" max="9"/><cs content="_"/>
      </cc>
     </concat>
    </token>
  
  	<token tsymbol="character">
     <!--<alt>-->
      <ncc><cs content="&#92;[]-&#10;&#13;&#32;();%[]|+?*^$&lt;>&#34;"/></ncc>
      <!--<concat><string content="&#92;"/><dot/></concat>
      <concat><string content="&#92;"/><ncc><cs content="u"/></ncc></concat>
  		<concat>
       <string content="&#92;u"/>
       <cc><ci min="0" max="9"/><ci min="a" max="f"/><ci min="A" max="F"/></cc>
       <cc><ci min="0" max="9"/><ci min="a" max="f"/><ci min="A" max="F"/></cc>
       <cc><ci min="0" max="9"/><ci min="a" max="f"/><ci min="A" max="F"/></cc>
       <cc><ci min="0" max="9"/><ci min="a" max="f"/><ci min="A" max="F"/></cc>
      </concat>
  	 </alt>-->
  	</token>
  
    <token tsymbol="maskedcharacter">
      <concat><string content="&#92;"/><dot/></concat>
    </token>
  
    <token tsymbol="minus">
     <string content="-"/>
    </token>
  
    <token tsymbol="hat">
     <string content="^"/>
    </token>
  
    <token tsymbol="dollar">
     <string content="$"/>
    </token>
  
    <token tsymbol="ccbegin">
     <string content="["/>
    </token>
  
    <token tsymbol="ccend">
     <string content="]"/>
    </token>
  
    <token tsymbol="regexdot">
     <string content="."/>
    </token>
  
    <token tsymbol="dopen">
     <string content="("/>
    </token>
  
    <token tsymbol="dclose">
     <string content=")"/>
    </token>
  
    <token tsymbol="questionmark">
     <string content="?"/>
    </token>
  
    <token tsymbol="mult">
     <string content="*"/>
    </token>
  
    <token tsymbol="plus">
     <string content="+"/>
    </token>
  
   </tokens>
  
   <ignorabletokens>
    <token tsymbol="comment">
     <alt>
      <concat><string content="//"/><ncc minOccurs="0" maxOccurs="*"><cs content="&#10;"/></ncc></concat>
      <concat>
       <string content="/*"/>
       <alt minOccurs="0" maxOccurs="*">
        <ncc><cs content="*"/></ncc>
        <concat><string content="*"/><ncc><cs content="/"/></ncc></concat>
       </alt>
       <string content="*/"/>
      </concat>
     </alt>
    </token>
   
    <token tsymbol="whitespace"> 
     <cc maxOccurs="*"><cs content="&#10;&#13;&#9;&#32;"/></cc>
    </token>
   </ignorabletokens>
  
   <productions>
  
    <production ntsymbol="intervall">
     <tsymbol name="character"/><tsymbol name="minus"/><tsymbol name="character"/>
  	</production>
  
    <production ntsymbol="intervall">
     <tsymbol name="maskedcharacter"/><tsymbol name="minus"/><tsymbol name="character"/>
    </production>
  
    <production ntsymbol="intervall">
     <tsymbol name="character"/><tsymbol name="minus"/><tsymbol name="maskedcharacter"/>
    </production>
  
    <production ntsymbol="intervall">
     <tsymbol name="maskedcharacter"/><tsymbol name="minus"/><tsymbol name="maskedcharacter"/>
    </production>
  
    <production ntsymbol="sequence" reducetype="resolve">
  	 <ntsymbol name="sequence"/><ntsymbol name="intervall"/>
  	</production>
  
    <production ntsymbol="sequence" reducetype="resolve">
     <ntsymbol name="sequence"/><tsymbol name="character"/>
    </production>
  
    <production ntsymbol="sequence" reducetype="resolve">
     <ntsymbol name="sequence"/><tsymbol name="maskedcharacter"/>
    </production>
  
    <production ntsymbol="sequence" reducetype="resolve">
     <ntsymbol name="intervall"/>
    </production>
  
    <production ntsymbol="sequence" reducetype="resolve">
     <tsymbol name="character"/>
    </production>
  
    <production ntsymbol="sequence" reducetype="resolve">
     <tsymbol name="maskedcharacter"/>
    </production>
  
    <production ntsymbol="string" reducetype="append">
     <ntsymbol name="string"/><tsymbol name="character"/>
    </production>
  
    <production ntsymbol="string" reducetype="append">
     <ntsymbol name="string"/><tsymbol name="maskedcharacter"/>
    </production>
  
    <production ntsymbol="string" reducetype="append">
     <tsymbol name="character"/>
    </production>
  
    <production ntsymbol="string" reducetype="append">
     <tsymbol name="maskedcharacter"/>
    </production>
  
    <production ntsymbol="characterclass">
  	 <tsymbol name="ccbegin"/><ntsymbol name="sequence"/><tsymbol name="ccend"/>
    </production>
  
    <production ntsymbol="negatedcharacterclass">
     <tsymbol name="ccbegin"/><tsymbol name="hat"/><ntsymbol name="sequence"/><tsymbol name="ccend"/>
    </production>
  
  	<production ntsymbol="regexdot">
  	 <tsymbol name="regexdot"/>
  	</production>
  
    <production ntsymbol="regexbol">
     <tsymbol name="hat"/>
    </production>
  
    <production ntsymbol="regexeol">
     <tsymbol name="dollar"/>
    </production>
  
    <production ntsymbol="regexklammer">
  	 <tsymbol name="dopen"/><ntsymbol name="regexalternation"/><tsymbol name="dclose"/>
  	</production>
  
    <production ntsymbol="regexabref">
     <tsymbol name="abopen"/><tsymbol name="id"/><tsymbol name="abclose"/>
    </production>
  
    <production ntsymbol="regexterm" reducetype="resolve">
  	 <ntsymbol name="characterclass"/>
  	</production>
  
    <production ntsymbol="regexterm" reducetype="resolve">
     <ntsymbol name="negatedcharacterclass"/>
    </production>
  
    <production ntsymbol="regexterm" reducetype="resolve">
     <ntsymbol name="regexklammer"/>
    </production>
  
    <production ntsymbol="regexterm" reducetype="resolve">
     <ntsymbol name="string"/>
    </production>
  
    <production ntsymbol="regexterm" reducetype="resolve">
     <ntsymbol name="regexdot"/>
    </production>
  
    <production ntsymbol="regexterm" reducetype="resolve">
     <ntsymbol name="regexbol"/>
    </production>
  
    <production ntsymbol="regexterm" reducetype="resolve">
     <ntsymbol name="regexeol"/>
    </production>
  
    <production ntsymbol="regexterm" reducetype="resolve">
     <ntsymbol name="regexabref"/>
    </production>
  
    <production ntsymbol="regexoptional">
  	 <ntsymbol name="regexterm"/><tsymbol name="questionmark"/>
  	</production>
  
    <production ntsymbol="regexstar">
  	 <ntsymbol name="regexterm"/><tsymbol name="mult"/>
  	</production>
  
    <production ntsymbol="regexplus">
     <ntsymbol name="regexterm"/><tsymbol name="plus"/>
    </production>
  
    <production ntsymbol="regexmultiplicator">
     <tsymbol name="copen"/><tsymbol name="number"/><tsymbol name="cclose"/>
    </production>
  
    <production ntsymbol="regexmultiplicator">
     <tsymbol name="copen"/><tsymbol name="number"/>
     <tsymbol name="comma"/><tsymbol name="number"/><tsymbol name="cclose"/>
    </production>
  
    <production ntsymbol="regexvar">
     <ntsymbol name="regexterm"/><ntsymbol name="regexmultiplicator"/>
    </production>
  
  	<production ntsymbol="regexquantifier" reducetype="resolve">
  	 <ntsymbol name="regexoptional"/>
  	</production>
  
    <production ntsymbol="regexquantifier" reducetype="resolve">
     <ntsymbol name="regexstar"/>
    </production>
  
    <production ntsymbol="regexquantifier" reducetype="resolve">
     <ntsymbol name="regexplus"/>
    </production>
  
    <production ntsymbol="regexquantifier" reducetype="resolve">
     <ntsymbol name="regexterm"/>
    </production>
  
    <production ntsymbol="regexquantifier" reducetype="resolve">
     <ntsymbol name="regexvar"/>
    </production>
  
  	<production ntsymbol="regexconcatenation" reducetype="append">
  	 <ntsymbol name="regexconcatenation"/><ntsymbol name="regexquantifier"/>
  	</production>
  
    <production ntsymbol="regexconcatenation" reducetype="resolve">
     <ntsymbol name="regexquantifier"/>
    </production>
  
    <production ntsymbol="regexalternation" reducetype="append">
  	 <ntsymbol name="regexalternation"/><tsymbol name="alt"/><ntsymbol name="regexconcatenation"/>
  	</production>
  
    <production ntsymbol="regexalternation" reducetype="resolve">
     <ntsymbol name="regexconcatenation"/>
    </production>
  
    <production ntsymbol="regexexpression">
  	 <ntsymbol name="regexalternation"/>
    </production>
  
    <production ntsymbol="grammar">
     <ntsymbol name="token_decls"/><tsymbol name="delimiter"/>
     <ntsymbol name="production_decls"/>
  	</production>
  
    <production ntsymbol="token_decls" reducetype="append">
     <ntsymbol name="token_decls"/> <ntsymbol name="token_decl"/>
    </production>
  
    <production ntsymbol="token_decls" reducetype="append">
     <ntsymbol name="token_decl"/>
    </production>
  
    <production ntsymbol="token_decls" reducetype="append">
     <ntsymbol name="token_decls"/><ntsymbol name="start_decl"/>
    </production>
  
    <production ntsymbol="token_decls" reducetype="append">
     <ntsymbol name="start_decl"/>
    </production>
  
    <production ntsymbol="token_decls" reducetype="append">
     <ntsymbol name="token_decls"/><ntsymbol name="ignorabletoken_decl"/>
    </production>
  
    <production ntsymbol="token_decls" reducetype="append">
     <ntsymbol name="ignorabletoken_decl"/>
    </production>
  
    <production ntsymbol="token_decls" reducetype="append">
     <ntsymbol name="token_decls"/><ntsymbol name="uri_decl"/>
    </production>
    
    <production ntsymbol="token_decls" reducetype="append">
     <ntsymbol name="uri_decl"/>
    </production>
  
    <production ntsymbol="token_decls" reducetype="append">
     <ntsymbol name="token_decls"/><ntsymbol name="ab_decl"/>
    </production>
    
    <production ntsymbol="token_decls" reducetype="append">
     <ntsymbol name="ab_decl"/>
    </production>
  
    <production ntsymbol="token_decl">
     <tsymbol name="token_decl"/><tsymbol name="id"/><ntsymbol name="regexexpression"/><tsymbol name="semicolon"/>
    </production>
  
    <production ntsymbol="start_decl">
     <tsymbol name="start_decl"/><tsymbol name="id"/><tsymbol name="semicolon"/>
    </production>
  
    <production ntsymbol="ignorabletoken_decl">
     <tsymbol name="ignorabletoken_decl"/><tsymbol name="id"/><ntsymbol name="regexexpression"/>
     <tsymbol name="semicolon"/>
    </production>
  
    <production ntsymbol="uri_decl">
     <tsymbol name="uri_decl"/><tsymbol name="string"/><tsymbol name="semicolon"/>
    </production>
  
    <production ntsymbol="ab_decl">
     <tsymbol name="ab_decl"/><tsymbol name="id"/><ntsymbol name="regexexpression"/><tsymbol name="semicolon"/>
    </production>
  
    <production ntsymbol="production_decls" reducetype="append">
     <ntsymbol name="production_decls"/><ntsymbol name="production_decl"/>
    </production>
  
    <production ntsymbol="production_decls" reducetype="append">
     <ntsymbol name="production_decl"/>
    </production>
  
    <production ntsymbol="production_decl">
     <tsymbol name="id"/><tsymbol name="colon"/><ntsymbol name="production_defs"/><tsymbol name="semicolon"/>
    </production>
  
    <production ntsymbol="production_defs" reducetype="append">
     <ntsymbol name="production_defs"/><tsymbol name="alt"/><ntsymbol name="production_def"/>
    </production>
   
    <production ntsymbol="production_defs" reducetype="append">
     <ntsymbol name="production_def"/>
    </production>
  
    <production ntsymbol="prec_decl" reducetype="append">
     <tsymbol name="prec_decl"/><tsymbol name="id"/>
    </production>
  
    <production ntsymbol="production_def" reducetype="append">
     <ntsymbol name="ids"/>
    </production>
  
    <production ntsymbol="production_def" reducetype="append">
     <ntsymbol name="ids"/><ntsymbol name="prec_decl"/>
    </production>
  
    <production ntsymbol="production_def" reducetype="append">
     <ntsymbol name="ids"/><tsymbol name="reducetype_decl"/>
    </production>
  
    <production ntsymbol="production_def" reducetype="append">
     <ntsymbol name="ids"/><ntsymbol name="prec_decl"/><tsymbol name="reducetype_decl"/>
    </production>
  
    <production ntsymbol="ids" reducetype="append">
     <ntsymbol name="ids"/><tsymbol name="id"/>
    </production>
  
    <production ntsymbol="ids" reducetype="append">
     <tsymbol name="id"/>
    </production>
   </productions>
  
   <ssymbol ntsymbol="grammar"/>
  </grammar>
  
  
  
  1.1                  xml-forrest/src/resources/editor/chaperon/grammars/wiki.grm
  
  Index: wiki.grm
  ===================================================================
  <?xml version="1.0" encoding="US-ASCII"?>
  <!--<!DOCTYPE grammar PUBLIC "-//Chaperon//DTD grammar 1.0//EN" "grammar.dtd">-->
  <grammar uri="http://chaperon.sourceforge.net/grammar/wiki/1.0">
  <tokens>
  <token tsymbol="LINE">
  <concat>
  <string content="---"/>
  <concat maxOccurs="*" minOccurs="1">
  <string content="-"/>
  </concat>
  </concat>
  </token>
  <token tsymbol="QUOTE">
  <string content=":"/>
  </token>
  <token tsymbol="BULLETED">
  <concat maxOccurs="*" minOccurs="1">
  <string content="*"/>
  </concat>
  </token>
  <token tsymbol="NUMBERED3">
  <string content="###"/>
  </token>
  <token tsymbol="NUMBERED2">
  <string content="##"/>
  </token>
  <token tsymbol="NUMBERED1">
  <string content="#"/>
  </token>
  <token tsymbol="HEAD">
  <concat maxOccurs="*" minOccurs="1">
  <string content="!"/>
  </concat>
  </token>
  <token assoc="left" tsymbol="ITALIC">
  <string content="&quot;"/>
  </token>
  <token assoc="left" tsymbol="BOLD">
  <string content="__"/>
  </token>
  <token assoc="left" tsymbol="UNDERLINE">
  <string content="_"/>
  </token>
  <token tsymbol="LINK">
  <concat>
  <alt>
  <string content="http"/>
  <string content="ftp"/>
  <string content="mailto"/>
  <string content="news"/>
  </alt>
  <string content=":"/>
  <concat minOccurs="1" maxOccurs="3">
  <string content="/"/>
  </concat>
  <concat maxOccurs="*" minOccurs="0">
  <cc>
  <ci min="A" max="Z"/>
  <ci min="a" max="z"/>
  <ci min="0" max="9"/>
  <cs content="."/>
  <cs content="_"/>
  <cs content="-"/>
  </cc>
  </concat>
  </concat>
  </token>
  <token tsymbol="BOPEN">
  <string content="["/>
  </token>
  <token tsymbol="BCLOSE">
  <string content="]"/>
  </token>
  <token tsymbol="TEXT">
  <concat>
  <concat maxOccurs="*" minOccurs="1">
  <cc>
  <ci min="A" max="Z"/>
  <ci min="a" max="z"/>
  <ci min="0" max="9"/>
  <cs content=","/>
  <cs content="'"/>
  <cs content="."/>
  <cs content="?"/>
  <cs content=":"/>
  </cc>
  </concat>
  <concat maxOccurs="*" minOccurs="0">
  <cc>
  <ci min="A" max="Z"/>
  <ci min="a" max="z"/>
  <ci min="0" max="9"/>
  <cs content=" "/>
  <cs content="	"/>
  <cs content=","/>
  <cs content="'"/>
  <cs content="."/>
  <cs content="?"/>
  <cs content="!"/>
  <cs content=":"/>
  </cc>
  </concat>
  </concat>
  </token>
  <token assoc="left" tsymbol="EMPTY">
  <alt>
  <concat>
  <string content="&#10;"/>
  <concat maxOccurs="*" minOccurs="0">
  <cc>
  <cs content=" "/>
  <cs content="	"/>
  </cc>
  </concat>
  <string content="&#10;"/>
  </concat>
  <concat>
  <string content="&#13;"/>
  <concat maxOccurs="*" minOccurs="0">
  <cc>
  <cs content=" "/>
  <cs content="	"/>
  </cc>
  </concat>
  <string content="&#13;"/>
  </concat>
  <concat>
  <string content="&#10;"/>
  <concat maxOccurs="*" minOccurs="0">
  <cc>
  <cs content=" "/>
  <cs content="	"/>
  </cc>
  </concat>
  <string content="&#10;"/>
  </concat>
  </alt>
  </token>
  <token tsymbol="EOL">
  <alt>
  <concat>
  <string content="&#13;"/>
  <concat maxOccurs="1" minOccurs="0">
  <string content="&#10;"/>
  </concat>
  </concat>
  <string content="&#10;"/>
  </alt>
  </token>
  </tokens>
   <ignorabletokens>
    <token tsymbol="whitespace">
  <concat maxOccurs="*" minOccurs="1">
  <cc>
  <cs content=" "/>
  <cs content="&#13;"/>
  <cs content="&#10;"/>
  </cc>
  </concat>
    </token>
   </ignorabletokens>
  <productions>
  <production ntsymbol="wiki" reducetype="append">
  <ntsymbol name="wiki"/>
  <ntsymbol name="paragraphs"/>
  </production>
  <production ntsymbol="wiki" reducetype="append">
  <ntsymbol name="paragraphs"/>
  </production>
  <production ntsymbol="paragraphs" reducetype="append">
  <ntsymbol name="paragraphs"/>
  <ntsymbol name="paragraph"/>
  </production>
  <production ntsymbol="paragraphs" reducetype="append">
  <ntsymbol name="paragraph"/>
  </production>
  <production ntsymbol="paragraph">
  <ntsymbol name="bulletedlist"/>
  </production>
  <production ntsymbol="paragraph">
  <ntsymbol name="numberedlist1"/>
  </production>
  <production ntsymbol="paragraph">
  <ntsymbol name="textitem"/>
  </production>
  <production ntsymbol="paragraph">
  <ntsymbol name="headitem"/>
  </production>
  <production ntsymbol="paragraph">
  <ntsymbol name="footnote"/>
  </production>
  <production ntsymbol="paragraph">
  <tsymbol name="LINE"/>
  </production>
  <production ntsymbol="paragraph">
  <tsymbol name="EMPTY"/>
  </production>
  <production ntsymbol="bulletedlist" reducetype="append">
  <ntsymbol name="bulletedlist"/>
  <ntsymbol name="bulletedlistitem"/>
  </production>
  <production ntsymbol="bulletedlist" reducetype="append">
  <ntsymbol name="bulletedlistitem"/>
  </production>
  <production ntsymbol="bulletedlistitem">
  <tsymbol name="BULLETED"/>
  <ntsymbol name="textblock"/>
  <ntsymbol name="textsequence"/>
  </production>
  <production ntsymbol="bulletedlistitem">
  <tsymbol name="BULLETED"/>
  <ntsymbol name="textblock"/>
  </production>
  <production ntsymbol="numberedlist1" reducetype="append">
  <ntsymbol name="numberedlist1"/>
  <ntsymbol name="numberedlistitem1"/>
  </production>
  <production ntsymbol="numberedlist1" reducetype="append">
  <ntsymbol name="numberedlistitem1"/>
  </production>
  <production ntsymbol="numberedlist1" reducetype="append">
  <ntsymbol name="numberedlist1"/>
  <ntsymbol name="numberedlist2"/>
  </production>
  <production ntsymbol="numberedlist1" reducetype="append">
  <ntsymbol name="numberedlist2"/>
  </production>
  <production ntsymbol="numberedlistitem1">
  <tsymbol name="NUMBERED1"/>
  <ntsymbol name="textblock"/>
  <ntsymbol name="textsequence"/>
  </production>
  <production ntsymbol="numberedlistitem1">
  <tsymbol name="NUMBERED1"/>
  <ntsymbol name="textblock"/>
  </production>
  <production ntsymbol="numberedlist2" reducetype="append">
  <ntsymbol name="numberedlist2"/>
  <ntsymbol name="numberedlistitem2"/>
  </production>
  <production ntsymbol="numberedlist2" reducetype="append">
  <ntsymbol name="numberedlistitem2"/>
  </production>
  <production ntsymbol="numberedlist2" reducetype="append">
  <ntsymbol name="numberedlist2"/>
  <ntsymbol name="numberedlist3"/>
  </production>
  <production ntsymbol="numberedlist2" reducetype="append">
  <ntsymbol name="numberedlist3"/>
  </production>
  <production ntsymbol="numberedlistitem2">
  <tsymbol name="NUMBERED2"/>
  <ntsymbol name="textblock"/>
  <ntsymbol name="textsequence"/>
  </production>
  <production ntsymbol="numberedlistitem2">
  <tsymbol name="NUMBERED2"/>
  <ntsymbol name="textblock"/>
  </production>
  <production ntsymbol="numberedlist3" reducetype="append">
  <ntsymbol name="numberedlist3"/>
  <ntsymbol name="numberedlistitem3"/>
  </production>
  <production ntsymbol="numberedlist3" reducetype="append">
  <ntsymbol name="numberedlistitem3"/>
  </production>
  <production ntsymbol="numberedlistitem3">
  <tsymbol name="NUMBERED3"/>
  <ntsymbol name="textblock"/>
  <ntsymbol name="textsequence"/>
  </production>
  <production ntsymbol="numberedlistitem3">
  <tsymbol name="NUMBERED3"/>
  <ntsymbol name="textblock"/>
  </production>
  <production ntsymbol="textitem">
  <ntsymbol name="firstblock"/>
  <ntsymbol name="textblock"/>
  <ntsymbol name="textsequence"/>
  </production>
  <production ntsymbol="textitem">
  <ntsymbol name="firstblock"/>
  <ntsymbol name="textblock"/>
  </production>
  <production ntsymbol="textitem">
  <ntsymbol name="firstblock"/>
  </production>
  <production ntsymbol="headitem">
  <tsymbol name="HEAD"/>
  <ntsymbol name="textblock"/>
  <ntsymbol name="textsequence"/>
  </production>
  <production ntsymbol="headitem">
  <tsymbol name="HEAD"/>
  <ntsymbol name="textblock"/>
  </production>
  <production ntsymbol="footnote">
  <ntsymbol name="note"/>
  <ntsymbol name="textblock"/>
  <ntsymbol name="textsequence"/>
  </production>
  <production ntsymbol="footnote">
  <ntsymbol name="note"/>
  <ntsymbol name="textblock"/>
  </production>
  <production ntsymbol="textsequence" reducetype="resolve">
  <ntsymbol name="textsequence"/>
  <tsymbol name="EOL"/>
  </production>
  <production ntsymbol="textsequence" reducetype="resolve">
  <tsymbol name="EOL"/>
  </production>
  <production ntsymbol="textsequence" reducetype="resolve">
  <ntsymbol name="textsequence"/>
  <ntsymbol name="textblock"/>
  </production>
  <production ntsymbol="textsequence" reducetype="resolve">
  <ntsymbol name="textblock"/>
  </production>
  <production ntsymbol="textblock">
  <tsymbol name="LINK"/>
  </production>
  <production ntsymbol="textblock">
  <ntsymbol name="boldblock"/>
  </production>
  <production ntsymbol="textblock">
  <ntsymbol name="italicblock"/>
  </production>
  <production ntsymbol="textblock">
  <ntsymbol name="underlineblock"/>
  </production>
  <production ntsymbol="textblock">
  <tsymbol name="TEXT"/>
  </production>
  <production ntsymbol="textblock">
  <ntsymbol name="note"/>
  </production>
  <production ntsymbol="firstblock">
  <tsymbol name="LINK"/>
  </production>
  <production ntsymbol="firstblock">
  <ntsymbol name="boldblock"/>
  </production>
  <production ntsymbol="firstblock">
  <ntsymbol name="italicblock"/>
  </production>
  <production ntsymbol="firstblock">
  <ntsymbol name="underlineblock"/>
  </production>
  <production ntsymbol="firstblock">
  <tsymbol name="TEXT"/>
  </production>
  <production ntsymbol="italicblock">
  <tsymbol name="ITALIC"/>
  <tsymbol name="TEXT"/>
  <tsymbol name="ITALIC"/>
  </production>
  <production ntsymbol="boldblock">
  <tsymbol name="BOLD"/>
  <tsymbol name="TEXT"/>
  <tsymbol name="BOLD"/>
  </production>
  <production ntsymbol="underlineblock">
  <tsymbol name="UNDERLINE"/>
  <tsymbol name="TEXT"/>
  <tsymbol name="UNDERLINE"/>
  </production>
  <production ntsymbol="note">
  <tsymbol name="BOPEN"/>
  <tsymbol name="TEXT"/>
  <tsymbol name="BCLOSE"/>
  </production>
  <production ntsymbol="note">
  <tsymbol name="BOPEN"/>
  <tsymbol name="LINK"/>
  <tsymbol name="BCLOSE"/>
  </production>
  </productions>
  <ssymbol ntsymbol="wiki"/>
  </grammar>
  
  
  
  1.1                  xml-forrest/src/resources/editor/chaperon/grammars/wiki.rgrm
  
  Index: wiki.rgrm
  ===================================================================
  %uri "http://chaperon.sourceforge.net/grammar/wiki/1.0";
  
  %token LINE \-\-\-(\-)+;
  
  %token QUOTE  :;
  %token BULLETED (\*)+;
  
  %token NUMBERED3 \#\#\#;
  %token NUMBERED2 \#\#;
  %token NUMBERED1 \#;
  
  %token HEAD (\!)+;
  
  %left ITALIC \";
  %left BOLD __;
  %left UNDERLINE _;
  
  %token LINK (http|ftp|mailto|news):(/){1,3}[A-Za-z0-9\.\_\-]*;
  
  %token BOPEN \[;
  %token BCLOSE \];
  
  %token TEXT [A-Za-z0-9\,\'\.\?\:]+[A-Za-z0-9\ \t\,\'\.\?\!\:]*;
  
  %left EMPTY \r\n [\ \t]* \r\n |
              \r   [\ \t]* \r   |
              \n   [\ \t]* \n   ;
  
  %token EOL (\r(\n)?|\n);
  
  
  %start wiki;
  
  %ignore whitespace [\ \r\n]+;
  
  %%
  
  wiki : wiki paragraphs %append
       | paragraphs      %append
       ;
  
  paragraphs : paragraphs paragraph %append
             | paragraph            %append
             ;
  
  paragraph : bulletedlist
            | numberedlist1
            | textitem 
            | headitem 
            | footnote
            | LINE
            | EMPTY
            ;
  
  bulletedlist : bulletedlist bulletedlistitem %append
               | bulletedlistitem              %append
               ;
  
  bulletedlistitem : BULLETED textblock textsequence
                   | BULLETED textblock
                   ;
  
  numberedlist1 : numberedlist1 numberedlistitem1 %append
                | numberedlistitem1               %append
                | numberedlist1 numberedlist2     %append
                | numberedlist2                   %append
                ;
  
  numberedlistitem1 : NUMBERED1 textblock textsequence
                    | NUMBERED1 textblock
                    ;
  
  numberedlist2 : numberedlist2 numberedlistitem2 %append
                | numberedlistitem2               %append
                | numberedlist2 numberedlist3     %append
                | numberedlist3                   %append
                ; 
  
  numberedlistitem2 : NUMBERED2 textblock textsequence
                    | NUMBERED2 textblock 
                    ;
  
  numberedlist3 : numberedlist3 numberedlistitem3 %append
                | numberedlistitem3               %append
                ; 
  
  numberedlistitem3 : NUMBERED3 textblock textsequence
                    | NUMBERED3 textblock 
                    ;
  
  textitem : firstblock textblock textsequence
           | firstblock textblock
           | firstblock
           ;
  
  headitem : HEAD textblock textsequence
           | HEAD textblock
           ;
  
  footnote : note textblock textsequence
           | note textblock
           ;
  
  textsequence : textsequence EOL       %resolve
               | EOL                    %resolve
               | textsequence textblock %resolve
               | textblock              %resolve
               ; 
  
  textblock : LINK                           
            | boldblock                      
            | italicblock            
            | underlineblock                
            | TEXT                         
            | note                         
            ;
  
  firstblock : LINK                 
             | boldblock                
             | italicblock                
             | underlineblock          
             | TEXT               
             ;
  
  italicblock : ITALIC TEXT ITALIC
              ;
  
  boldblock : BOLD TEXT BOLD
            ;
  
  underlineblock : UNDERLINE TEXT UNDERLINE 
                 ;
  
  note : BOPEN TEXT BCLOSE
       | BOPEN LINK BCLOSE
       ;
  
  
  
  1.34      +8 -0      xml-forrest/src/resources/conf/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/sitemap.xmap,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- sitemap.xmap	5 Nov 2002 08:00:34 -0000	1.33
  +++ sitemap.xmap	5 Nov 2002 10:59:25 -0000	1.34
  @@ -329,6 +329,14 @@
   
     <map:pipeline internal-only="false">
   
  +   <!-- ======================    editor    ============================== -->
  +   <map:match pattern="edit**">
  +     <map:mount uri-prefix="edit" src="editor.xmap" check-reload="yes"/>
  +   </map:match>
  +   
  +   <!-- ==================   External URI-space    ========================= -->   
  +
  +
      <map:match pattern="">
       <map:redirect-to uri="/{context:context}/index.html"/>
      </map:match>
  
  
  
  1.1                  xml-forrest/lib/core/chaperon-1.3-dev.jar
  
  	<<Binary file>>
  
  
  1.1                  xml-forrest/lib/core/chaperon-block.jar
  
  	<<Binary file>>
  
  
  1.1                  xml-forrest/lib/core/cocoon-scratchpad-20021030.jar
  
  	<<Binary file>>
  
  
  1.1                  xml-forrest/src/resources/editor/editor/images/dir.gif
  
  	<<Binary file>>
  
  
  1.1                  xml-forrest/src/resources/editor/editor/images/file.gif
  
  	<<Binary file>>
  
  
  1.1                  xml-forrest/src/resources/editor/editor/images/get.gif
  
  	<<Binary file>>
  
  
  1.1                  xml-forrest/src/resources/editor/editor/images/new.gif
  
  	<<Binary file>>
  
  
  1.1                  xml-forrest/src/resources/editor/editor/images/see.gif
  
  	<<Binary file>>
  
  

Mime
View raw message