forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: xml-forrest/src/resources/stylesheets wiki2document.xsl
Date Sat, 26 Apr 2003 12:23:15 GMT
jefft       2003/04/26 05:23:15

  Modified:    .        build.xml status.xml
               src/documentation/content/xdocs site.xml
               src/resources/conf forrest.xmap sitemap.xmap
               src/resources/forrest-shbat forrest.build.xml
               src/resources/fresh-site/src/documentation/content/xdocs
                        site.xml
  Added:       src/documentation/content/xdocs wiki-sample.cwiki
               src/resources/fresh-site/src/documentation/content/xdocs
                        wiki-sample.cwiki
               src/resources/grammars grammar-v20.dtd grm.xgrm grm.xlex
                        grm2xgrm.xsl grm2xlex.xsl lexicon-v20.dtd link.xlex
                        regex.xgrm regex.xlex text4regex.xsl wiki.grm
                        wiki.xgrm wiki.xlex
               src/resources/stylesheets wiki2document.xsl
  Log:
  Wiki syntax should now work
  
  Revision  Changes    Path
  1.65      +6 -0      xml-forrest/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/build.xml,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- build.xml	11 Apr 2003 14:46:19 -0000	1.64
  +++ build.xml	26 Apr 2003 12:23:14 -0000	1.65
  @@ -267,6 +267,12 @@
         <fileset dir="${resource.dir}/images"/>
       </copy>
   
  +    <!-- Copy Chaperon grammars -->
  +    <copy todir="${bare-context.dir}/resources/grammars" >
  +      <fileset dir="${resource.dir}/grammars"/>
  +    </copy>
  +
  +
       <!-- Copy Cocoon configuration and sitemap -->
       <copy todir="${bare-context.dir}">
         <fileset dir="${resource.dir}/conf">
  
  
  
  1.148     +3 -0      xml-forrest/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/status.xml,v
  retrieving revision 1.147
  retrieving revision 1.148
  diff -u -r1.147 -r1.148
  --- status.xml	24 Apr 2003 09:10:32 -0000	1.147
  +++ status.xml	26 Apr 2003 12:23:14 -0000	1.148
  @@ -24,6 +24,9 @@
   
     <changes>
       <release version="0.5-dev" date="unreleased">
  +      <action dev="JT" type="fix" context="core">
  +        Get the Wiki syntax support working again.
  +      </action>
         <action dev="JT" type="update" context="schemas">
           Created new document-v12 DTD module, containing all DTD improvements
           made since 0.4 was released, and use it to define new v12 versions of
  
  
  
  1.11      +3 -1      xml-forrest/src/documentation/content/xdocs/site.xml
  
  Index: site.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/documentation/content/xdocs/site.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- site.xml	24 Apr 2003 09:07:42 -0000	1.10
  +++ site.xml	26 Apr 2003 12:23:14 -0000	1.11
  @@ -47,8 +47,10 @@
     <samples label="Some Samples">
       <document-v11 label="document-v11" href="document-v11.html"/>
       <document-v12 label="document-v12" href="document-v12.html"/>
  +
       <how-tos label="How-Tos" href="community/howto/index.html"/>
  -  </samples>
  +    <wiki label="Wiki Reference" href="wiki-sample.html"/>
  + </samples>
   
     <community label="Community" href="community/">
       <index label="About" href="index.html"/>
  
  
  
  1.1                  xml-forrest/src/documentation/content/xdocs/wiki-sample.cwiki
  
  Index: wiki-sample.cwiki
  ===================================================================
  !!!Forrest's Wiki Support
  
  Forrest now has partial support for documentation in Wiki format, thanks to the
  [Chaperon parser|http://chaperon.sf.net]. Wiki is a simple text format that can
  be learned in minutes. This page provides an overview of the syntax that
  Forrest supports, namely a subset of that used by the [Cocoon
  Wiki|http://wiki.cocoondev.org].
  
  !Quick reference
  
  {{{
  ----       = Make a horizontal ruler. Extra '-' is ignored.
  \\         = force a line break, \\\=force line break and clear.
  
  [link]     = creates a hyperlink to an internal WikiPage called 'Link'.
  [this is also a link] = creates a hyperlink to an internal WikiPage called
  'ThisIsAlsoALink'.
  [click here|link] = creates a hyperlink to an internal WikiPage called
  'Link', but displays the text 'click here' to the
  user instead of 'Link'.
  [1]        = Makes a reference to a footnote numbered 1.
  [#1]       = Marks the footnote number 1.
  [[link]    = creates text '[link]'.
  
  !heading   = small heading with text 'heading'
  !!heading  = medium heading with text 'heading'
  !!!heading = large heading with text 'heading'
  
  ''text''   = prints 'text' in italic.
  __text__   = prints 'text' in bold.
  {{text}}   = prints 'text' in monospaced font.
  
  * text     = makes a bulleted list item with 'text'
  # text     = makes a numbered list item with 'text'
  ;term:ex   = makes a definition for 'term' with the explanation 'ex'
  }}}
  
  !Writing text
  
  You don't need to know anything about the Wiki text formatting rules to use
  Wiki.  Just write normal text, and then use an empty line to mark a paragraph.
  It's just like writing an email.
  
  !Hyperlinks
  The link can also be a direct URL starting with http:, ftp:, mailto:, https:, or news:, in which case the link points to
  an external entity. For example, to point at the java.sun.com home page, use [[http://java.sun.com], which becomes
  [http://java.sun.com/] or [[Java home page|http://java.sun.com], which becomes [Java home page|http://java.sun.com].
  
  To add a new page you just create a link to it from somewhere else. After all, there isn't much point in having a page
  if you can't access it! You'll then see a small question mark after the page name when you return to that page. Then
  click on it and you have created a new page!
  
  It's allowed to use almost any kind of characters inside a [[WikiName], as long
  as they are letters or numbers.
  
  Note also that this Wiki can be configured to support standard CamelCase linking (if it's supported, the word CamelCase
  should be a link).  It's off by default, but if your friendly administrator has turned it on, then well, CamelCase all
  you want =).
  
  !Adding pictures
  
  For security reasons uploading images is not permitted, but you can embed
  any image in the wiki code by putting the image available somewhere on the web in one of the allowed formats, and then
  just linking to it.
  For example, this is an inlined PNG image: [http://www.ecyrd.com/~jalkanen/test.png].
  
  If you specify a link text ([[this one here|http://example.com/example.png]) it becomes
  the ALT text for those who either can't or don't want to view images.
  
  !Bulleted lists
  Use an asterisk (*) in the first column to make bulleted lists. Use more asterisks for deeper indentation. For example:
  {{{
  * One
  * Two
  * Three
  ** Three.One
  }}}
  
  creates
  * One
  * Two
  * Three
  ** Three.One
  
  !Numbered lists
  Just like with bulleted lists, but use a hash (#) instead of the asterisk. Like this:
  {{{
  # One
  # Two
  # Three
  ## Three.One
  }}}
  
  creates
  # One
  # Two
  # Three
  ## Three.One
  
  If you want to write the list item on multiple lines, just add one or more spaces on the next line and the line will be
  automatically added to the
  previous item.  If this sounds complicated, edit this page for an example, below.
  
  * This is a single-line item.
  * This is actually a multi-line item.
    We continue the second sentence on a line on a line of its own.
    We might as well do a third line while we're at it...
    Notice, however, as all these sentences get put inside a single item!
  * The third line is again a single-line item for your convinience.
  
  !Definition lists and comments
  
  A simple way to make definition lists is to use the ';:' -construct:
  
  ;__Construct__:''Something you use to do something with''
  
  Another nice use for the ';:' is that you can use it to comment shortly on other people's text, by having an empty
  'term' in the definition, like this:
  {{{
  ;:''Comment here.''
  }}}
  Which would be seen as
  ;:''Comment here.''
  
  !Text effects
  
  You may use __bold__ text or ''italic'' text, by using two underscores (_) and two single quotes ('), respectively. If
  you're on a Windows computer, make sure that you are using the correct quote sign, as there is one that looks the same,
  but really isn't.
  
  
  !Preformatted text
  
  If you want to add preformatted text (like code) just use three consecutive braces ({) to open a block, and three
  consecutive braces (}) to close a block. Edit this page for an example.
  
  !Tables
  
  You can do simple tables by using using pipe signs ('|').  Use double pipe
  signs to start the heading of a table, and single pipe signs to then
  write the rows of the table.  End with a line that is not a table.
  
  For example:
  
  {{{
  || Heading 1 || Heading 2
  | ''Gobble'' | Bar
  | [[Main]     | [[SandBox]
  }}}
  
  gives you the following table.  Note how you can use links also inside tables.
  
  || Heading 1 || Heading 2
  | ''Gobble'' | Bar
  | [[Main]     | [[SandBox]
  
  
  
  1.13      +52 -17    xml-forrest/src/resources/conf/forrest.xmap
  
  Index: forrest.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/forrest.xmap,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- forrest.xmap	24 Apr 2003 09:10:32 -0000	1.12
  +++ forrest.xmap	26 Apr 2003 12:23:14 -0000	1.13
  @@ -4,9 +4,19 @@
     <map:components>
       <map:generators default="file">
         <map:generator name="html" src="org.apache.cocoon.generation.HTMLGenerator" />
  +      <map:generator name="text2xml" src="org.apache.cocoon.generation.TextGenerator" />
       </map:generators>
       <map:serializers default="html"/>
  -    <map:transformers default="xslt"/>
  +    <map:transformers default="xslt">
  +      <map:transformer name="lexer" src="org.apache.cocoon.transformation.LexicalTransformer" logger="sitemap.transformer.lexer"/>
  +      <map:transformer name="parser" src="org.apache.cocoon.transformation.ParserTransformer" logger="sitemap.transformer.parser">
  +        <parameter name="flatten" value="true"/>
  +        <parameter name="ignoring" value="true"/>
  +      </map:transformer>
  +    </map:transformers>
  +
  +
  +
       <map:readers default="resource"/>
       <map:matchers default="wildcard"/>
       <map:actions>
  @@ -134,22 +144,6 @@
           </map:act>
         </map:match>
   
  -
  -        <!--
  -        <map:act type="resource-exists">
  -          <map:parameter name="url" value="content/xdocs/{1}.cwiki" />
  -          <map:generate src="content/xdocs/{../1}.cwiki" type="textparser">
  -            <map:parameter name="grammar" value="chaperon/grammars/wiki.grm" />
  -            <map:parameter name="includeignorabletokens" value="true" />
  -          </map:generate>
  -          <map:transform src="resources/stylesheets/wiki2htmlpage.xsl" />
  -          <map:transform src="resources/stylesheets/wiki2html.xsl" />
  -          <map:transform src="resources/stylesheets/html2document.xsl" />
  -          <map:transform type="idgen" />
  -          <map:serialize type="xml"/>
  -        </map:act>
  -        -->
  -
           <!-- ============================================================ -->
           <!-- SOURCE FORMATS                                               -->
           <!-- ============================================================ -->
  @@ -163,6 +157,20 @@
             <map:transform type="idgen" />
             <map:serialize type="xml"/>
           </map:act>
  +        <map:act type="resource-exists">
  +          <map:parameter name="url" value="content/xdocs/{1}.cwiki" />
  +          <map:generate type="text2xml" src="content/xdocs/{../1}.cwiki" />
  +          <map:transform type="lexer"   src="resources/grammars/wiki.xlex"/>
  +          <map:transform type="parser"  src="resources/grammars/wiki.xgrm"/>
  +          <!--  Dynamically generated equivalents.  Matchers need to be added to
  +          the root sitemap for this to work.
  +          <map:transform type="lexer"   src="cocoon:/wiki.xlex"/>
  +          <map:transform type="parser"  src="cocoon:/wiki.xgrm"/>
  +          -->
  +          <map:transform src="resources/stylesheets/wiki2document.xsl"/>
  +          <map:transform type="idgen" />
  +          <map:serialize type="xml"/>
  +        </map:act>
   
           <map:generate src="content/xdocs/{1}.xml" />
           <map:call resource="transform-to-document">
  @@ -170,6 +178,33 @@
           </map:call>
           <map:serialize type="xml"/>
         </map:match>
  +
  +
  +      <!--
  +      These pipelines dynamically generate the wiki.{xlex,xgrm} files used in
  +      the *.cwiki pipeline.  They are not used by default to avoid the overhead.
  +   <map:match pattern="*.xlex">
  +    <map:generate                src="resources/grammars/{1}.grm"/>
  +    <map:transform type="lexer"  src="resources/grammars/grm.xlex"/>
  +    <map:transform type="parser" src="resources/grammars/grm.xgrm"/>
  +    <map:transform               src="resources/grammars/text4regex.xsl"/>
  +    <map:transform type="lexer"  src="resources/grammars/regex.xlex"/>
  +    <map:transform type="parser" src="resources/grammars/regex.xgrm"/>
  +    <map:transform               src="resources/grammars/grm2xlex.xsl"/>
  +    <map:serialize type="xml"/>
  +   </map:match>
  +   
  +   <map:match pattern="*.xgrm">
  +    <map:generate                src="resources/grammars/{1}.grm"/>
  +    <map:transform type="lexer"  src="resources/grammars/grm.xlex"/>
  +    <map:transform type="parser" src="resources/grammars/grm.xgrm"/>
  +    <map:transform               src="resources/grammars/text4regex.xsl"/>
  +    <map:transform type="lexer"  src="resources/grammars/regex.xlex"/>
  +    <map:transform type="parser" src="resources/grammars/regex.xgrm"/>
  +    <map:transform               src="resources/grammars/grm2xgrm.xsl"/>
  +    <map:serialize type="xml"/>
  +   </map:match>
  +      -->
   
       </map:pipeline>
     </map:pipelines>
  
  
  
  1.91      +0 -3      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.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- sitemap.xmap	10 Apr 2003 14:22:31 -0000	1.90
  +++ sitemap.xmap	26 Apr 2003 12:23:14 -0000	1.91
  @@ -41,9 +41,6 @@
         </map:transformer>
   
         <map:transformer name="xinclude" src="org.apache.cocoon.transformation.XIncludeTransformer" logger="sitemap.transformer.xinclude" pool-grow="2" pool-max="16" pool-min="2" />
  -      <map:transformer logger="sitemap.transformer.lexer" name="lexer" src="org.apache.cocoon.transformation.LexicalTransformer"/>
  -      <map:transformer logger="sitemap.transformer.lexer" name="parser" src="org.apache.cocoon.transformation.ParserTransformer"/>
  -      <map:transformer logger="sitemap.transformer.lexer" name="pattern" src="org.apache.cocoon.transformation.PatternTransformer"/>
       </map:transformers>
   
       <map:readers default="resource">
  
  
  
  1.61      +12 -3     xml-forrest/src/resources/forrest-shbat/forrest.build.xml
  
  Index: forrest.build.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrest-shbat/forrest.build.xml,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- forrest.build.xml	11 Apr 2003 11:26:29 -0000	1.60
  +++ forrest.build.xml	26 Apr 2003 12:23:14 -0000	1.61
  @@ -82,6 +82,7 @@
       <property name="project.stylesheets-dir" location="${project.content-dir}/resources/stylesheets" />
       <property name="project.images-dir"  location="${project.content-dir}/resources/images" />
       <property name="project.schema-dir"  location="${project.content-dir}/resources/schema" />
  +    <property name="project.grammars-dir" location="${project.content-dir}/resources/grammars" />
       <property name="project.catalog"     location="${project.schema-dir}/catalog.xcat" />
       <property name="forrest.catalog.verbosity" value="1" />
       <property name="project.skins-dir"   location="${project.content-dir}/skins" />
  @@ -104,6 +105,7 @@
       <available property="sitemap.present" file="${project.sitemap-dir}" type="dir"/>
       <available property="xdocs.present" file="${project.xdocs-dir}" type="dir"/>
       <available property="images.present" file="${project.images-dir}" type="dir"/>
  +    <available property="grammars.present" file="${project.grammars-dir}" type="dir"/>
       <available property="schema.present" file="${project.schema-dir}" type="dir"/>
       <available property="stylesheets.present" file="${project.stylesheets-dir}" type="dir"/>
       <available property="lib.present" file="${project.lib-dir}" type="dir"/>
  @@ -373,11 +375,11 @@
          param: location to make temporary context-dir ${project.ctxt-dir} 
          =============================================================== -->
     <target name="project-context-bot" depends="init, examine-proj, copy-conf, copy-sitemap,
  -    copy-xdocs, copy-stylesheets, copy-images, copy-content, copy-lib, 
  +    copy-xdocs, copy-stylesheets, copy-images, copy-grammars, copy-content, copy-lib, 
       copy-classes, copy-skins, copy-skinconf, copy-status"/>
   
     <target name="project-context" depends="examine-proj, ensure-content, validate, init, bare-context, copy-sitemap, copy-conf,
  -    copy-xdocs, copy-stylesheets, copy-images, copy-content, copy-lib, 
  +    copy-xdocs, copy-stylesheets, copy-images, copy-grammars, copy-content, copy-lib, 
       copy-classes, copy-skins, copy-skinconf, copy-status"/>
   
     <target name="copy-conf" if="conf.present">
  @@ -421,6 +423,13 @@
       <copy toDir="${project.ctxt-dir}/resources/images" filtering="false"
         overwrite="true" failonerror="false">
         <fileset dir="${project.images-dir}"/>
  +    </copy>
  +  </target>
  +
  +  <target name="copy-grammars" if="grammars.present">
  +    <copy toDir="${project.ctxt-dir}/resources/grammars" filtering="false"
  +      overwrite="true" failonerror="false">
  +      <fileset dir="${project.grammars-dir}"/>
       </copy>
     </target>
   
  
  
  
  1.14      +1 -0      xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/site.xml
  
  Index: site.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/site.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- site.xml	24 Apr 2003 09:10:32 -0000	1.13
  +++ site.xml	26 Apr 2003 12:23:14 -0000	1.14
  @@ -23,6 +23,7 @@
         <section href="#section"/>
       </sample>
       <sample2 label="Static content" href="sample2.html"/>
  +    <sample-wiki label="Sample Wiki page" href="wiki-sample.html"/>
       <sample-ihtml label="Sample ihtml page" href="ihtml-sample.html"/>
       <sample-ehtml label="Sample ehtml page" href="ehtml-sample.html"/>
       <faq label="FAQ" href="faq.html"/>
  
  
  
  1.1                  xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/wiki-sample.cwiki
  
  Index: wiki-sample.cwiki
  ===================================================================
  !!!Forrest's Wiki Support
  
  Forrest now has partial support for documentation in Wiki format, thanks to the
  [Chaperon parser|http://chaperon.sf.net]. Wiki is a simple text format that can
  be learned in minutes. This page provides an overview of the syntax that
  Forrest supports, namely a subset of that used by the [Cocoon
  Wiki|http://wiki.cocoondev.org].
  
  !Quick reference
  
  {{{
  ----       = Make a horizontal ruler. Extra '-' is ignored.
  \\         = force a line break, \\\=force line break and clear.
  
  [link]     = creates a hyperlink to an internal WikiPage called 'Link'.
  [this is also a link] = creates a hyperlink to an internal WikiPage called
  'ThisIsAlsoALink'.
  [click here|link] = creates a hyperlink to an internal WikiPage called
  'Link', but displays the text 'click here' to the
  user instead of 'Link'.
  [1]        = Makes a reference to a footnote numbered 1.
  [#1]       = Marks the footnote number 1.
  [[link]    = creates text '[link]'.
  
  !heading   = small heading with text 'heading'
  !!heading  = medium heading with text 'heading'
  !!!heading = large heading with text 'heading'
  
  ''text''   = prints 'text' in italic.
  __text__   = prints 'text' in bold.
  {{text}}   = prints 'text' in monospaced font.
  
  * text     = makes a bulleted list item with 'text'
  # text     = makes a numbered list item with 'text'
  ;term:ex   = makes a definition for 'term' with the explanation 'ex'
  }}}
  
  !Writing text
  
  You don't need to know anything about the Wiki text formatting rules to use
  Wiki.  Just write normal text, and then use an empty line to mark a paragraph.
  It's just like writing an email.
  
  !Hyperlinks
  The link can also be a direct URL starting with http:, ftp:, mailto:, https:, or news:, in which case the link points to
  an external entity. For example, to point at the java.sun.com home page, use [[http://java.sun.com], which becomes
  [http://java.sun.com/] or [[Java home page|http://java.sun.com], which becomes [Java home page|http://java.sun.com].
  
  To add a new page you just create a link to it from somewhere else. After all, there isn't much point in having a page
  if you can't access it! You'll then see a small question mark after the page name when you return to that page. Then
  click on it and you have created a new page!
  
  It's allowed to use almost any kind of characters inside a [[WikiName], as long
  as they are letters or numbers.
  
  Note also that this Wiki can be configured to support standard CamelCase linking (if it's supported, the word CamelCase
  should be a link).  It's off by default, but if your friendly administrator has turned it on, then well, CamelCase all
  you want =).
  
  !Adding pictures
  
  For security reasons uploading images is not permitted, but you can embed
  any image in the wiki code by putting the image available somewhere on the web in one of the allowed formats, and then
  just linking to it.
  For example, this is an inlined PNG image: [http://www.ecyrd.com/~jalkanen/test.png].
  
  If you specify a link text ([[this one here|http://example.com/example.png]) it becomes
  the ALT text for those who either can't or don't want to view images.
  
  !Bulleted lists
  Use an asterisk (*) in the first column to make bulleted lists. Use more asterisks for deeper indentation. For example:
  {{{
  * One
  * Two
  * Three
  ** Three.One
  }}}
  
  creates
  * One
  * Two
  * Three
  ** Three.One
  
  !Numbered lists
  Just like with bulleted lists, but use a hash (#) instead of the asterisk. Like this:
  {{{
  # One
  # Two
  # Three
  ## Three.One
  }}}
  
  creates
  # One
  # Two
  # Three
  ## Three.One
  
  If you want to write the list item on multiple lines, just add one or more spaces on the next line and the line will be
  automatically added to the
  previous item.  If this sounds complicated, edit this page for an example, below.
  
  * This is a single-line item.
  * This is actually a multi-line item.
    We continue the second sentence on a line on a line of its own.
    We might as well do a third line while we're at it...
    Notice, however, as all these sentences get put inside a single item!
  * The third line is again a single-line item for your convinience.
  
  !Definition lists and comments
  
  A simple way to make definition lists is to use the ';:' -construct:
  
  ;__Construct__:''Something you use to do something with''
  
  Another nice use for the ';:' is that you can use it to comment shortly on other people's text, by having an empty
  'term' in the definition, like this:
  {{{
  ;:''Comment here.''
  }}}
  Which would be seen as
  ;:''Comment here.''
  
  !Text effects
  
  You may use __bold__ text or ''italic'' text, by using two underscores (_) and two single quotes ('), respectively. If
  you're on a Windows computer, make sure that you are using the correct quote sign, as there is one that looks the same,
  but really isn't.
  
  
  !Preformatted text
  
  If you want to add preformatted text (like code) just use three consecutive braces ({) to open a block, and three
  consecutive braces (}) to close a block. Edit this page for an example.
  
  !Tables
  
  You can do simple tables by using using pipe signs ('|').  Use double pipe
  signs to start the heading of a table, and single pipe signs to then
  write the rows of the table.  End with a line that is not a table.
  
  For example:
  
  {{{
  || Heading 1 || Heading 2
  | ''Gobble'' | Bar
  | [[Main]     | [[SandBox]
  }}}
  
  gives you the following table.  Note how you can use links also inside tables.
  
  || Heading 1 || Heading 2
  | ''Gobble'' | Bar
  | [[Main]     | [[SandBox]
  
  
  
  1.1                  xml-forrest/src/resources/grammars/grammar-v20.dtd
  
  Index: grammar-v20.dtd
  ===================================================================
  <!-- GRAMMAR DTD -->
  <!ELEMENT grammar ((priority)?,(associativity)*,(production)*, start)>
  
  <!-- PRIORITY -->
  <!ELEMENT priority (terminal)+>
  
  <!-- PRODUCTION -->
  <!ELEMENT associativity EMPTY>
  <!ATTLIST associativity symbol CDATA    #REQUIRED
                          type   (left|right|nonassoc) "nonassoc">
                 
  <!-- PRODUCTION -->
  <!ELEMENT production (terminal|nonterminal)+>
  <!ATTLIST production symbol     CDATA    #REQUIRED
                       precedence CDATA    #IMPLIED>
  
  <!-- TOKEN REFERENZ -->
  <!ELEMENT terminal EMPTY>
  <!ATTLIST terminal symbol CDATA    #REQUIRED>
  
  <!-- TOKEN REFERENZ -->
  <!ELEMENT nonterminal EMPTY>
  <!ATTLIST nonterminal symbol CDATA    #REQUIRED>
  
  <!-- START SYMBOL -->
  <!ELEMENT start EMPTY>
  <!ATTLIST start symbol CDATA    #REQUIRED>
  
  
  
  
  
  1.1                  xml-forrest/src/resources/grammars/grm.xgrm
  
  Index: grm.xgrm
  ===================================================================
  <?xml version="1.0" standalone="no"?>
  <!DOCTYPE grammar PUBLIC "-//Chaperon//DTD grammar 2.0//EN" "grammar-v20.dtd">
  
  <grammar>
  
   <production symbol="grammar">
    <nonterminal symbol="token_decls"/><terminal symbol="delimiter"/>
    <nonterminal symbol="production_decls"/>
   </production>
  
   <production symbol="token_decls">
    <nonterminal symbol="token_decls"/> <nonterminal symbol="token_decl"/>
   </production>
  
   <production symbol="token_decls">
    <nonterminal symbol="token_decl"/>
   </production>
  
   <production symbol="token_decls">
    <nonterminal symbol="token_decls"/><nonterminal symbol="start_decl"/>
   </production>
  
   <production symbol="token_decls">
    <nonterminal symbol="start_decl"/>
   </production>
  
   <production symbol="token_decls">
    <nonterminal symbol="token_decls"/><nonterminal symbol="ignorabletoken_decl"/>
   </production>
  
   <production symbol="token_decls">
    <nonterminal symbol="ignorabletoken_decl"/>
   </production>
  
   <production symbol="token_decls">
    <nonterminal symbol="token_decls"/><nonterminal symbol="ab_decl"/>
   </production>
    
   <production symbol="token_decls">
    <nonterminal symbol="ab_decl"/>
   </production>
  
   <production symbol="token_decl">
    <terminal symbol="token_decl"/><terminal symbol="id"/>
    <terminal symbol="string"/><terminal symbol="semicolon"/>
   </production>
  
   <production symbol="start_decl">
    <terminal symbol="start_decl"/><terminal symbol="id"/><terminal symbol="semicolon"/>
   </production>
  
   <production symbol="ignorabletoken_decl">
    <terminal symbol="ignorabletoken_decl"/><terminal symbol="string"/><terminal symbol="semicolon"/>
   </production>
  
   <production symbol="ab_decl">
    <terminal symbol="ab_decl"/><terminal symbol="id"/>
    <terminal symbol="string"/><terminal symbol="semicolon"/>
   </production>
  
   <production symbol="production_decls">
    <nonterminal symbol="production_decls"/><nonterminal symbol="production_decl"/>
   </production>
  
   <production symbol="production_decls">
    <nonterminal symbol="production_decl"/>
   </production>
  
   <production symbol="production_decl">
    <terminal symbol="id"/><terminal symbol="colon"/><nonterminal symbol="production_defs"/>
    <terminal symbol="semicolon"/>
   </production>
  
   <production symbol="production_defs">
    <nonterminal symbol="production_defs"/><terminal symbol="alt"/><nonterminal symbol="production_def"/>
   </production>
   
   <production symbol="production_defs">
    <nonterminal symbol="production_def"/>
   </production>
  
   <production symbol="prec_decl">
    <terminal symbol="prec_decl"/><terminal symbol="id"/>
   </production>
  
   <production symbol="production_def">
    <nonterminal symbol="ids"/>
   </production>
  
   <production symbol="production_def">
    <nonterminal symbol="ids"/><nonterminal symbol="prec_decl"/>
   </production>
  
   <production symbol="ids">
    <nonterminal symbol="ids"/><terminal symbol="id"/>
   </production>
  
   <production symbol="ids">
    <terminal symbol="id"/>
   </production>
  
   <start symbol="grammar"/>
  </grammar>
  
  
  
  1.1                  xml-forrest/src/resources/grammars/grm.xlex
  
  Index: grm.xlex
  ===================================================================
  <?xml version="1.0" standalone="no"?>
  <!DOCTYPE lexicon PUBLIC "-//Chaperon//DTD lexicon 2.0//EN" "lexicon-v20.dtd">
  
  <lexicon>
  
   <lexeme symbol="token_decl">
    <alt>
     <cstring content="%token"/>
     <cstring content="%left"/>
     <cstring content="%right"/>
    </alt>
   </lexeme>
  
   <lexeme symbol="ab_decl">
    <cstring content="%ab"/>
   </lexeme>
  
   <lexeme symbol="start_decl">
    <cstring content="%start"/>
   </lexeme>
  
   <lexeme symbol="ignorabletoken_decl">
    <cstring content="%ignore"/>
   </lexeme>
  
   <lexeme symbol="prec_decl">
    <cstring content="%prec"/>
   </lexeme>
  
   <lexeme symbol="delimiter">
    <cstring content="%%"/>
   </lexeme>
  
   <lexeme symbol="colon">
    <cstring content=":"/>
   </lexeme>
  
   <lexeme symbol="alt">
    <cstring content="|"/>
   </lexeme>
  
   <lexeme symbol="semicolon">
    <cstring content=";"/>
   </lexeme>
  
   <lexeme symbol="string">
    <concat>
     <cstring content="&#34;"/>
     <alt minOccurs="1" maxOccurs="*">
      <cclass exclusive="true"><cset content="&#92;&#34;"/></cclass>
      <concat><cstring content="&#92;"/><cclass exclusive="true"><cset content="u"/></cclass></concat>
      <concat>
       <cstring content="&#92;u"/>
       <cclass><cinterval min="0" max="9"/><cinterval min="a" max="f"/><cinterval min="A" max="F"/></cclass>
       <cclass><cinterval min="0" max="9"/><cinterval min="a" max="f"/><cinterval min="A" max="F"/></cclass>
       <cclass><cinterval min="0" max="9"/><cinterval min="a" max="f"/><cinterval min="A" max="F"/></cclass>
       <cclass><cinterval min="0" max="9"/><cinterval min="a" max="f"/><cinterval min="A" max="F"/></cclass>
      </concat>
     </alt>
     <cstring content="&#34;"/>
    </concat>
   </lexeme>
  
   <lexeme symbol="id">
    <concat>
     <cclass><cinterval min="A" max="Z"/><cinterval min="a" max="z"/></cclass>
     <cclass minOccurs="0" maxOccurs="*">
      <cinterval min="A" max="Z"/><cinterval min="a" max="z"/><cinterval min="0" max="9"/><cset content="_"/>
     </cclass>
    </concat>
   </lexeme>
  
   <lexeme>
    <alt>
     <concat>
      <cstring content="//"/>
      <cclass exclusive="true" minOccurs="0" maxOccurs="*">
       <cset content="&#10;&#13;"/>
      </cclass>
     </concat>
     <concat>
      <cstring content="/*"/>
      <alt minOccurs="0" maxOccurs="*">
       <cclass exclusive="true"><cset content="*"/></cclass>
       <concat><cstring content="*"/><cclass exclusive="true"><cset content="/"/></cclass></concat>
      </alt>
      <cstring content="*/"/>
     </concat>
    </alt>
   </lexeme>
   
   <lexeme> 
    <cclass maxOccurs="*"><cset content="&#10;&#13;&#9;&#32;"/></cclass>
   </lexeme>
  </lexicon>
  
  
  
  1.1                  xml-forrest/src/resources/grammars/grm2xgrm.xsl
  
  Index: grm2xgrm.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0"
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                  xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0"
                  xmlns="http://chaperon.sourceforge.net/schema/grammar/1.0"
                  exclude-result-prefixes="st text">
  
   <xsl:output indent="yes" method="xml" encoding="ASCII"/>
  
   <xsl:template match="st:grammar" >
    <grammar><xsl:comment>This file was generated! Don't edit!</xsl:comment>
     <priority>
      <xsl:apply-templates select="st:token_decls/st:token_decl" mode="priority"/>
     </priority>
     <xsl:apply-templates select="st:token_decls/st:token_decl" mode="associativity"/>
     <xsl:apply-templates select="st:production_decls"/>
     <xsl:apply-templates select="st:token_decls/st:start_decl"/>
    </grammar>
   </xsl:template>
  
   <xsl:template match="st:token_decl" mode="priority">
    <terminal symbol="{st:id}"/>
   </xsl:template>
  
   <xsl:template match="st:token_decl" mode="associativity">
    <xsl:if test="st:token_decl = '%left'">
     <associativity symbol="{st:id}" type="left"/>
    </xsl:if>
    <xsl:if test="st:token_decl = '%right'">
     <associativity symbol="{st:id}" type="right"/>
    </xsl:if>
   </xsl:template>
  
   <xsl:template match="st:production_decls" >
    <xsl:for-each select="st:production_decl/st:production_defs/st:production_def">
     <production>
      <xsl:attribute name="symbol"><xsl:value-of select="../../st:id"/></xsl:attribute>
       
      <xsl:if test="st:prec_decl">
       <xsl:attribute name="precedence"><xsl:value-of select="st:prec_decl/st:id"/></xsl:attribute>
      </xsl:if>
  
      <xsl:apply-templates select="st:ids/st:id"/>
     </production>
    </xsl:for-each>
   </xsl:template>
  
   <xsl:template match="st:id" >
    <xsl:variable name="symbol" select="text()"/>
    <xsl:choose>
     <xsl:when test="/st:grammar/st:token_decls/st:token_decl/st:id[.=$symbol]">
      <terminal symbol="{.}"/>
     </xsl:when>
     <xsl:otherwise>
      <nonterminal symbol="{.}"/>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
  
   <xsl:template match="st:start_decl" >
    <start symbol="{st:id}"/>
   </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/grammars/grm2xlex.xsl
  
  Index: grm2xlex.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0"
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                  xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0"
                  xmlns="http://chaperon.sourceforge.net/schema/lexicon/1.0"
                  exclude-result-prefixes="st text">
  
   <xsl:output indent="yes" method="xml" encoding="ASCII"/>
  
   <xsl:template match="st:grammar" >
    <lexicon><xsl:comment>This file was generated! Don't edit!</xsl:comment>
     <xsl:apply-templates select="st:token_decls/st:token_decl | st:token_decls/st:ignorabletoken_decl"/>
    </lexicon>
   </xsl:template>
  
   <xsl:template match="st:token_decl" >
    <lexeme symbol="{st:id}">
     <xsl:if test="st:token_decl = '%left'">
      <xsl:attribute name="assoc">left</xsl:attribute>
     </xsl:if>
     <xsl:if test="st:token_decl = '%right'">
      <xsl:attribute name="assoc">right</xsl:attribute>
     </xsl:if>
     <xsl:apply-templates select="st:regexexpression"/>
    </lexeme>
   </xsl:template>
  
   <xsl:template match="st:ignorabletoken_decl" >
    <lexeme>
     <xsl:apply-templates select="st:regexexpression"/>
    </lexeme>
   </xsl:template>
  
   <xsl:template match="st:regexexpression" >
    <xsl:apply-templates select="st:regexalternation"/>
   </xsl:template>
  
   <xsl:template match="st:regexalternation" >
    <xsl:choose>
     <xsl:when test="count(st:regexconcatenation)>1">
      <alt>
       <xsl:apply-templates select="st:regexconcatenation"/>
      </alt>
     </xsl:when>
     <xsl:otherwise>
      <xsl:apply-templates select="st:regexconcatenation"/>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
  
   <xsl:template match="st:regexconcatenation" >
    <xsl:choose>
     <xsl:when test="count(st:regexquantifier)>1">
      <concat>
       <xsl:apply-templates select="st:regexquantifier"/>
      </concat>
     </xsl:when>
     <xsl:otherwise>
      <xsl:apply-templates select="st:regexquantifier"/>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
  
   <xsl:template match="st:regexquantifier" >
    <xsl:apply-templates select="st:regexoptional|st:regexstar|st:regexplus|st:regexterm|st:regexvar"/>
   </xsl:template>
  
   <xsl:template match="st:regexoptional" >
    <concat minOccurs="0" maxOccurs="1">
     <xsl:apply-templates select="st:regexterm"/>
    </concat>
   </xsl:template>
  
   <xsl:template match="st:regexstar" >
    <concat minOccurs="0" maxOccurs="*">
     <xsl:apply-templates select="st:regexterm"/>
    </concat>
   </xsl:template>
  
   <xsl:template match="st:regexplus" >
    <concat minOccurs="1" maxOccurs="*">
     <xsl:apply-templates select="st:regexterm"/>
    </concat>
   </xsl:template>
  
   <xsl:template match="st:regexvar">
    <xsl:choose>
     <xsl:when test="count(st:regexmultiplicator/st:string)=2">
      <concat>
       <xsl:attribute name="minOccurs"><xsl:value-of select="normalize-space(st:regexmultiplicator/st:string[1])"/></xsl:attribute>
       <xsl:attribute name="maxOccurs"><xsl:value-of select="normalize-space(st:regexmultiplicator/st:string[2])"/></xsl:attribute>
       <xsl:apply-templates select="st:regexterm"/>
      </concat>
     </xsl:when>
     <xsl:otherwise>
      <concat>
       <xsl:attribute name="minOccurs"><xsl:value-of select="normalize-space(st:regexmultiplicator/st:string)"/></xsl:attribute>
       <xsl:attribute name="maxOccurs"><xsl:value-of select="normalize-space(st:regexmultiplicator/st:string)"/></xsl:attribute>
       <xsl:apply-templates select="st:regexterm"/>
      </concat>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
  
   <xsl:template match="st:regexterm">
    <xsl:apply-templates select="st:characterclass|st:exclusivecharacterclass|st:regexklammer|st:string|st:maskedcharacter|st:regexdot|st:regexbol|st:regexabref"/>
   </xsl:template>
  
   <xsl:template match="st:regexklammer">
    <xsl:apply-templates select="st:regexalternation"/>
   </xsl:template>
  
   <xsl:template match="st:regexdot">
    <cclass exclusive="true">
     <cset code="10"/>
     <cset code="13"/>
    </cclass>
   </xsl:template>
  
   <xsl:template match="st:regexbol">
    <bol/>
   </xsl:template>
  
   <xsl:template match="st:regexeol">
    <eol/>
   </xsl:template>
  
   <xsl:template match="st:regexabref">
    <xsl:variable name="ref" select="translate(normalize-space(st:string), ' ', '')"/>
    <xsl:apply-templates select="/st:grammar/st:token_decls/st:ab_decl[st:id=$ref]/st:regexexpression"/>
   </xsl:template>
  
   <xsl:template match="st:string" mode="name">
    <xsl:for-each select="st:character"><xsl:value-of select="normalize-space(.)"/></xsl:for-each>
   </xsl:template>
  
   <xsl:template match="st:string">
    <cstring>
     <xsl:attribute name="content"><xsl:apply-templates select="st:character" mode="string"/></xsl:attribute>
    </cstring>
   </xsl:template>
  
   <xsl:template match="st:characterclass">
    <cclass>
     <xsl:apply-templates select="st:sequence"/>
    </cclass>
   </xsl:template>
  
   <xsl:template match="st:exclusivecharacterclass" >
    <cclass exclusive="true">
     <xsl:apply-templates select="st:sequence"/>
    </cclass>
   </xsl:template>
  
   <xsl:template match="st:sequence">
    <xsl:apply-templates select="st:character|st:maskedcharacter|st:intervall" mode="cclass"/>
   </xsl:template>
  
   <xsl:template match="st:character" mode="cclass">
    <cset>
     <xsl:attribute name="content"><xsl:value-of select="translate(normalize-space(.), ' ', '')"/></xsl:attribute>
    </cset>
   </xsl:template>
  
   <xsl:template match="st:maskedcharacter" mode="cclass">
    <cset>
     <xsl:choose>
      <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'n'">
       <xsl:attribute name="code">10</xsl:attribute>
      </xsl:when>
      <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'r'">
       <xsl:attribute name="code">13</xsl:attribute>
      </xsl:when>
      <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 't'">
       <xsl:attribute name="code">9</xsl:attribute>
      </xsl:when>
      <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'u'">
       <xsl:attribute name="code">#<xsl:value-of select="substring(translate(normalize-space(.), ' ', ''),2,6)"/></xsl:attribute>
      </xsl:when>
      <xsl:when test="contains(.,'\ ')">
       <xsl:attribute name="content"><xsl:text disable-output-escaping="yes">&#32;</xsl:text></xsl:attribute>
      </xsl:when>
      <xsl:otherwise>
       <xsl:attribute name="content"><xsl:value-of select="substring(translate(normalize-space(.), ' ', ''), 2,1)"/></xsl:attribute>
      </xsl:otherwise>
     </xsl:choose>
    </cset>
   </xsl:template>
  
   <xsl:template match="st:character" mode="string">
    <xsl:value-of select="translate(normalize-space(.), ' ', '')"/>
   </xsl:template>
   
   <xsl:template match="st:maskedcharacter">
    <xsl:choose>
      <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'n'">
       <cstring code="10"/>
      </xsl:when>
      <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'r'">
       <cstring code="13"/>
      </xsl:when>
      <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 't'">
       <cstring code="9"/>
      </xsl:when>
      <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'u'">
       <cstring code="#{substring(translate(normalize-space(.), ' ', ''), 2,6)}"/>
      </xsl:when>
      <xsl:when test="contains(.,'\ ')">
       <cstring content=" "/>
      </xsl:when>
      <xsl:otherwise>
       <cstring content="{substring(translate(normalize-space(.), ' ', ''),2,1)}"/>
      </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
  
   <xsl:template match="st:intervall" mode="cclass">
    <cinterval>
     <xsl:attribute name="min"><xsl:value-of select="st:character[1]"/></xsl:attribute>
     <xsl:attribute name="max"><xsl:value-of select="st:character[2]"/></xsl:attribute>
    </cinterval>
   </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/grammars/lexicon-v20.dtd
  
  Index: lexicon-v20.dtd
  ===================================================================
  <!-- LEXICON DTD -->
  <!ELEMENT lexicon (lexeme)+>
                 
  <!-- LEXEME -->
  <!ELEMENT lexeme (concat|alt|cstring|cclass|cuniversal|bol|eol)>
  <!ATTLIST lexeme symbol      CDATA    #IMPLIED>
  
  <!-- CONCATENATION -->
  <!ELEMENT concat (concat|alt|cstring|cclass|cuniversal|bol|eol)+>
  <!ATTLIST concat minOccurs CDATA "1"
                   maxOccurs CDATA "1">
  
  <!-- ALTERNATION -->
  <!ELEMENT alt (concat|alt|cstring|cclass|cuniversal|bol|eol)+>
  <!ATTLIST alt minOccurs CDATA "1"
                maxOccurs CDATA "1">
  
  <!-- CHARACTER STRING -->
  <!ELEMENT cstring EMPTY>
  <!ATTLIST cstring content CDATA    #REQUIRED
                    minOccurs CDATA "1"
                    maxOccurs CDATA "1">
  
  <!-- UNIVERSAL CHARACTER -->
  <!ELEMENT cuniversal EMPTY>
  <!ATTLIST cuniversal minOccurs CDATA "1"
                       maxOccurs CDATA "1">
  
  <!-- CHARACTER CLASS -->
  <!ELEMENT cclass (cset|cinterval)+>
  <!ATTLIST cclass exclusive (true|false) "false"
                   minOccurs CDATA "1"
                   maxOccurs CDATA "1">
  
  <!-- CHARACTER SET  -->
  <!ELEMENT cset EMPTY>   
  <!ATTLIST cset content  CDATA #REQUIRED>
  
  <!-- CHARACTER INTERVALL -->
  <!ELEMENT cinterval EMPTY>   
  <!ATTLIST cinterval min  CDATA #REQUIRED
                      max  CDATA #REQUIRED>
  
  
  
  
  
  
  1.1                  xml-forrest/src/resources/grammars/link.xlex
  
  Index: link.xlex
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE lexicon PUBLIC "-//Chaperon//DTD lexicon 2.0//EN" "lexicon-v20.dtd">
  
  <lexicon>
   <!-- (([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? -->
   <lexeme symbol="link">
    <concat>
     <concat>
      <cclass maxOccurs="*">
       <cinterval min="A" max="Z"/>
       <cinterval min="a" max="z"/>
      </cclass>
      <cstring content=":"/>
      <cstring content="/"/>
     </concat>
   
     <concat minOccurs="0">
      <cstring content="/"/>
      <cclass minOccurs="0" maxOccurs="*">
       <cinterval min="A" max="Z"/>
       <cinterval min="a" max="z"/>
       <cinterval min="0" max="9"/>
       <cset content="._-:"/>
      </cclass>
     </concat>
   
     <cclass minOccurs="0" maxOccurs="*">
      <cinterval min="A" max="Z"/>
      <cinterval min="a" max="z"/>
      <cinterval min="0" max="9"/>
      <cset content="._-:/"/>
     </cclass>
  
     <concat minOccurs="0">
      <cstring content="?"/>
      <cclass minOccurs="0" maxOccurs="*">
       <cinterval min="A" max="Z"/>
       <cinterval min="a" max="z"/>
       <cinterval min="0" max="9"/>
       <cset content="._-:/?"/>
      </cclass>
     </concat>
  
     <concat minOccurs="0">
      <cstring content="#"/>
      <cclass minOccurs="0" maxOccurs="*">
       <cinterval min="A" max="Z"/>
       <cinterval min="a" max="z"/>
       <cinterval min="0" max="9"/>
       <cset content="._-:/?#"/>
      </cclass>
     </concat>
    </concat>
   </lexeme>
  
   <lexeme symbol="email">
    <concat>
     <concat>
      <group>
       <cclass maxOccurs="*">
        <cinterval min="A" max="Z"/>
        <cinterval min="a" max="z"/>
        <cinterval min="0" max="9"/>
        <cset content="._-:"/>
       </cclass>
      </group>
      <cstring content="@"/>
      <group>
       <cclass maxOccurs="*">
        <cinterval min="A" max="Z"/>
        <cinterval min="a" max="z"/>
        <cinterval min="0" max="9"/>
        <cset content="._-:"/>
       </cclass>
      </group>
     </concat>
    </concat>
   </lexeme>
  </lexicon>
  
  
  
  1.1                  xml-forrest/src/resources/grammars/regex.xgrm
  
  Index: regex.xgrm
  ===================================================================
  <?xml version="1.0" standalone="no"?>
  <!DOCTYPE grammar PUBLIC "-//Chaperon//DTD grammar 2.0//EN" "grammar-v20.dtd">
  <grammar>
   <priority>
    <terminal symbol="plus"/>
   </priority>
  
   <associativity symbol="plus" type="right"/>
  
   <production symbol="intervall">
    <terminal symbol="character"/><terminal symbol="minus"/><terminal symbol="character"/>
   </production>
  
   <production symbol="intervall">
    <terminal symbol="maskedcharacter"/><terminal symbol="minus"/><terminal symbol="character"/>
   </production>
  
   <production symbol="intervall">
    <terminal symbol="character"/><terminal symbol="minus"/><terminal symbol="maskedcharacter"/>
   </production>
  
   <production symbol="intervall">
    <terminal symbol="maskedcharacter"/><terminal symbol="minus"/><terminal symbol="maskedcharacter"/>
   </production>
  
   <production symbol="sequence">
    <nonterminal symbol="sequence"/><nonterminal symbol="intervall"/>
   </production>
  
   <production symbol="sequence">
    <nonterminal symbol="sequence"/><terminal symbol="character"/>
   </production>
  
   <production symbol="sequence">
    <nonterminal symbol="sequence"/><terminal symbol="maskedcharacter"/>
   </production>
  
   <production symbol="sequence">
    <nonterminal symbol="intervall"/>
   </production>
  
   <production symbol="sequence">
    <terminal symbol="character"/>
   </production>
  
   <production symbol="sequence">
    <terminal symbol="maskedcharacter"/>
   </production>
  
   <production symbol="string">
    <nonterminal symbol="string"/><terminal symbol="character"/>
   </production>
  
  <!-- <production symbol="string">
    <nonterminal symbol="string"/><terminal symbol="maskedcharacter"/>
   </production>-->
  
   <production symbol="string">
    <terminal symbol="character"/>
   </production>
  
  <!-- <production symbol="string">
    <terminal symbol="maskedcharacter"/>
   </production>-->
  
   <production symbol="characterclass">
    <terminal symbol="ccbegin"/><nonterminal symbol="sequence"/><terminal symbol="ccend"/>
   </production>
  
   <production symbol="exclusivecharacterclass">
    <terminal symbol="ccbegin"/><terminal symbol="hat"/><nonterminal symbol="sequence"/><terminal symbol="ccend"/>
   </production>
  
   <production symbol="regexdot">
    <terminal symbol="regexdot"/>
   </production>
  
   <production symbol="regexbol">
    <terminal symbol="hat"/>
   </production>
  
   <production symbol="regexeol">
    <terminal symbol="dollar"/>
   </production>
  
   <production symbol="regexklammer">
    <terminal symbol="dopen"/><nonterminal symbol="regexalternation"/><terminal symbol="dclose"/>
   </production>
  
   <production symbol="regexabref">
    <terminal symbol="abopen"/><nonterminal symbol="string"/><terminal symbol="abclose"/>
   </production>
  
   <production symbol="regexterm">
    <nonterminal symbol="characterclass"/>
   </production>
  
   <production symbol="regexterm">
    <nonterminal symbol="exclusivecharacterclass"/>
   </production>
  
   <production symbol="regexterm">
    <nonterminal symbol="regexklammer"/>
   </production>
  
   <production symbol="regexterm">
    <nonterminal symbol="string"/>
   </production>
  
   <production symbol="regexterm">
    <terminal symbol="maskedcharacter"/>
   </production>
  
   <production symbol="regexterm">
    <nonterminal symbol="regexdot"/>
   </production>
  
   <production symbol="regexterm">
    <nonterminal symbol="regexbol"/>
   </production>
  
   <production symbol="regexterm">
    <nonterminal symbol="regexabref"/>
   </production>
  
   <production symbol="regexoptional">
    <nonterminal symbol="regexterm"/><terminal symbol="questionmark"/>
   </production>
  
   <production symbol="regexstar">
    <nonterminal symbol="regexterm"/><terminal symbol="mult"/>
   </production>
  
   <production symbol="regexplus">
    <nonterminal symbol="regexterm"/><terminal symbol="plus"/>
   </production>
  
   <production symbol="regexmultiplicator">
    <terminal symbol="copen"/><nonterminal symbol="string"/><terminal symbol="cclose"/>
   </production>
  
   <production symbol="regexmultiplicator">
    <terminal symbol="copen"/><nonterminal symbol="string"/>
    <terminal symbol="comma"/><nonterminal symbol="string"/><terminal symbol="cclose"/>
   </production>
  
   <production symbol="regexvar">
    <nonterminal symbol="regexterm"/><nonterminal symbol="regexmultiplicator"/>
   </production>
  
   <production symbol="regexquantifier">
    <nonterminal symbol="regexoptional"/>
   </production>
  
   <production symbol="regexquantifier">
    <nonterminal symbol="regexstar"/>
   </production>
  
   <production symbol="regexquantifier">
    <nonterminal symbol="regexplus"/>
   </production>
  
   <production symbol="regexquantifier" precedence="plus">
    <nonterminal symbol="regexterm"/>
   </production>
  
   <production symbol="regexquantifier">
    <nonterminal symbol="regexvar"/>
   </production>
  
   <production symbol="regexconcatenation">
    <nonterminal symbol="regexconcatenation"/><nonterminal symbol="regexquantifier"/>
   </production>
  
   <production symbol="regexconcatenation">
    <nonterminal symbol="regexquantifier"/>
   </production>
  
   <production symbol="regexalternation">
    <nonterminal symbol="regexalternation"/><terminal symbol="alt"/><nonterminal symbol="regexconcatenation"/>
   </production>
  
   <production symbol="regexalternation">
    <nonterminal symbol="regexconcatenation"/>
   </production>
  
   <production symbol="regexexpression">
    <nonterminal symbol="regexalternation"/>
   </production>
  
   <start symbol="regexexpression"/>
  </grammar>
  
  
  
  1.1                  xml-forrest/src/resources/grammars/regex.xlex
  
  Index: regex.xlex
  ===================================================================
  <?xml version="1.0" standalone="no"?>
  <!DOCTYPE lexicon PUBLIC "-//Chaperon//DTD lexicon 2.0//EN" "lexicon-v20.dtd">
  
  <lexicon>
  
   <lexeme symbol="alt">
    <cstring content="|"/>
   </lexeme>
  
   <lexeme symbol="comma">
    <cstring content=","/>
   </lexeme>
  
   <lexeme symbol="copen">
    <cstring content="{"/>
   </lexeme>
  
   <lexeme symbol="cclose">
    <cstring content="}"/>
   </lexeme>
  
   <lexeme symbol="abopen">
    <cstring content="&lt;"/>
   </lexeme>
  
   <lexeme symbol="abclose">
    <cstring content=">"/>
   </lexeme>
  
   <lexeme symbol="character">
    <cclass exclusive="true">
     <cset content="&#92;[]-&#10;&#13;&#32;()[]|+?*^$.&lt;>&#34;"/>
    </cclass>
   </lexeme>
  
   <lexeme symbol="maskedcharacter">
    <alt>
     <concat>
      <cstring content="&#92;"/>
      <cclass exclusive="true">
       <cset content="u"/>
      </cclass>
     </concat>
     <concat>
      <cstring content="&#92;u"/>
      <cclass><cinterval min="0" max="9"/><cinterval min="a" max="f"/><cinterval min="A" max="F"/></cclass>
      <cclass><cinterval min="0" max="9"/><cinterval min="a" max="f"/><cinterval min="A" max="F"/></cclass>
      <cclass><cinterval min="0" max="9"/><cinterval min="a" max="f"/><cinterval min="A" max="F"/></cclass>
      <cclass><cinterval min="0" max="9"/><cinterval min="a" max="f"/><cinterval min="A" max="F"/></cclass>
     </concat>
    </alt>
   </lexeme>
  
   <lexeme symbol="minus">
    <cstring content="-"/>
   </lexeme>
  
   <lexeme symbol="hat">
    <cstring content="^"/>
   </lexeme>
  
   <lexeme symbol="dollar">
    <cstring content="$"/>
   </lexeme>
  
   <lexeme symbol="ccbegin">
    <cstring content="["/>
   </lexeme>
  
   <lexeme symbol="ccend">
    <cstring content="]"/>
   </lexeme>
  
   <lexeme symbol="regexdot">
    <cstring content="."/>
   </lexeme>
  
   <lexeme symbol="dopen">
    <cstring content="("/>
   </lexeme>
  
   <lexeme symbol="dclose">
    <cstring content=")"/>
   </lexeme>
  
   <lexeme symbol="questionmark">
    <cstring content="?"/>
   </lexeme>
  
   <lexeme symbol="mult">
    <cstring content="*"/>
   </lexeme>
  
   <lexeme symbol="plus">
    <cstring content="+"/>
   </lexeme>
  
   <lexeme> 
    <cclass maxOccurs="*"><cset content="&#10;&#13;&#9;&#32;"/></cclass>
   </lexeme>
  
  </lexicon>
  
  
  
  1.1                  xml-forrest/src/resources/grammars/text4regex.xsl
  
  Index: text4regex.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet version="1.0" 
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0"
      xmlns:text="http://chaperon.sourceforge.net/schema/text/1.0"
      exclude-result-prefixes="st">
  
   <xsl:output encoding="ASCII"/>
  
   <xsl:template match="st:string">
    <text:text><xsl:value-of select="substring(.,2,string-length(.)-2)"/></text:text>
   </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/grammars/wiki.grm
  
  Index: wiki.grm
  ===================================================================
  
  %token line "\-\-\-\- (\-+)";
  
  %token bulleteditem "\*+";
  
  %token numbered1item "#";
  %token numbered2item "##";
  %token numbered3item "###";
  
  %token tabletitleitem  "\|\|";
  %token tablecolumnitem "\|";
  
  %token titleitem "!+";
  
  %token emitem "''";
  
  %token codeopenitem "\{\{";
  %token codecloseitem "\}\}";
  
  %token strongitem "__";
  
  %token source "\{\{\{ (\}{0,2}[^\}])* \}\}\}";
  
  %token anchor "\[( [^\[\|\]]* \| )? # [^\[\|\]]* \]";
  
  %token link   "\[( [^\[\|\]]* \| )?   [^\[\|\]]* \]";
  
  %token text  "([^\ \t\n\r\[\{\}\|\*_!#'] | _[^_] | \{[^\{] | \}[^\}] | '[^'] | \[\[)
                ([^    \n\r\[\{\}\|_']     | _[^_] | \{[^\{] | \}[^\}] | '[^'] | \[\[ | \|[^\|\ \t])*";
  
  %right softbreak "\r(\n?) | \n";
  
  %right hardbreak "(\r(\n?) | \n) (\r(\n?) | \n)+";
  
  %ignore "[\ \t]+";
  
  %start document;
  
  %%
  
  document 
    : document section 
    | section
    | paragraphs
    ;
  
  section 
    : title paragraphs
    | title hardbreak paragraphs
    ;
  
  paragraphs  
    : paragraphs paragraph hardbreak
    | paragraphs paragraph 
    | paragraph hardbreak
    | paragraph
    ;
  
  paragraph 
    : bulletedlist
    | numberedlist1
    | textsequence
    | line 
    | source %prec softbreak
    | source softbreak
    | table
    ;
  
  bulletedlist 
    : bulletedlist bulletedlistitem 
    | bulletedlistitem              
    ;
  
  bulletedlistitem 
    : bulleteditem textsequence
    ;
  
  numberedlist1 
    : numberedlist1 numberedlistitem1 
    | numberedlistitem1               
    | numberedlist1 numberedlist2     
    | numberedlist2                   
    ;
  
  numberedlistitem1 
    : numbered1item textsequence
    ;
  
  numberedlist2 
    : numberedlist2 numberedlistitem2 
    | numberedlistitem2               
    | numberedlist2 numberedlist3     
    | numberedlist3                   
    ; 
  
  numberedlistitem2 
    : numbered2item textsequence
    ;
  
  numberedlist3 
    : numberedlist3 numberedlistitem3 
    | numberedlistitem3               
    ; 
  
  numberedlistitem3 
    : numbered3item textsequence
    ;
  
  table
    : tablehead softbreak tablerows
    | tablehead softbreak tablerows softbreak
    ;
  
  tablehead
    : tablehead tabletitle
    | tabletitle
    ; 
  
  tabletitle
    : tabletitleitem textblock
    ;
  
  tablerows
    : tablerows softbreak tablecolumns
    | tablecolumns
    ;
  
  tablecolumns
    : tablecolumns tablecolumn
    | tablecolumn
    ;
  
  tablecolumn
    : tablecolumnitem textblock
    ;
    
  title 
    : titleitem textsequence
    ;
  
  textsequence 
    : textsequence textblock softbreak
    | textsequence textblock 
    | textblock softbreak  
    | textblock           
    ; 
  
  textblock 
    : link
    | anchor
    | strongblock                      
    | emblock            
    | text                         
    | codeblock
    ;
  
  emblock 
    : emitem text emitem
    ;
  
  strongblock 
    : strongitem text strongitem
    ;
  
  codeblock 
    : codeopenitem text codecloseitem
    ;
  
  
  
  
  1.1                  xml-forrest/src/resources/grammars/wiki.xgrm
  
  Index: wiki.xgrm
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <grammar xmlns="http://chaperon.sourceforge.net/schema/grammar/1.0">
    <!--This file was generated! Don't edit!-->
    <priority>
      <terminal symbol="line"/>
      <terminal symbol="bulleteditem"/>
      <terminal symbol="numbered1item"/>
      <terminal symbol="numbered2item"/>
      <terminal symbol="numbered3item"/>
      <terminal symbol="tabletitleitem"/>
      <terminal symbol="tablecolumnitem"/>
      <terminal symbol="titleitem"/>
      <terminal symbol="emitem"/>
      <terminal symbol="codeopenitem"/>
      <terminal symbol="codecloseitem"/>
      <terminal symbol="strongitem"/>
      <terminal symbol="source"/>
      <terminal symbol="anchor"/>
      <terminal symbol="link"/>
      <terminal symbol="text"/>
      <terminal symbol="softbreak"/>
      <terminal symbol="hardbreak"/>
    </priority>
    <associativity symbol="softbreak" type="right"/>
    <associativity symbol="hardbreak" type="right"/>
    <production symbol="document">
      <nonterminal symbol="document"/>
      <nonterminal symbol="section"/>
    </production>
    <production symbol="document">
      <nonterminal symbol="section"/>
    </production>
    <production symbol="document">
      <nonterminal symbol="paragraphs"/>
    </production>
    <production symbol="section">
      <nonterminal symbol="title"/>
      <nonterminal symbol="paragraphs"/>
    </production>
    <production symbol="section">
      <nonterminal symbol="title"/>
      <terminal symbol="hardbreak"/>
      <nonterminal symbol="paragraphs"/>
    </production>
    <production symbol="paragraphs">
      <nonterminal symbol="paragraphs"/>
      <nonterminal symbol="paragraph"/>
      <terminal symbol="hardbreak"/>
    </production>
    <production symbol="paragraphs">
      <nonterminal symbol="paragraphs"/>
      <nonterminal symbol="paragraph"/>
    </production>
    <production symbol="paragraphs">
      <nonterminal symbol="paragraph"/>
      <terminal symbol="hardbreak"/>
    </production>
    <production symbol="paragraphs">
      <nonterminal symbol="paragraph"/>
    </production>
    <production symbol="paragraph">
      <nonterminal symbol="bulletedlist"/>
    </production>
    <production symbol="paragraph">
      <nonterminal symbol="numberedlist1"/>
    </production>
    <production symbol="paragraph">
      <nonterminal symbol="textsequence"/>
    </production>
    <production symbol="paragraph">
      <terminal symbol="line"/>
    </production>
    <production symbol="paragraph" precedence="softbreak">
      <terminal symbol="source"/>
    </production>
    <production symbol="paragraph">
      <terminal symbol="source"/>
      <terminal symbol="softbreak"/>
    </production>
    <production symbol="paragraph">
      <nonterminal symbol="table"/>
    </production>
    <production symbol="bulletedlist">
      <nonterminal symbol="bulletedlist"/>
      <nonterminal symbol="bulletedlistitem"/>
    </production>
    <production symbol="bulletedlist">
      <nonterminal symbol="bulletedlistitem"/>
    </production>
    <production symbol="bulletedlistitem">
      <terminal symbol="bulleteditem"/>
      <nonterminal symbol="textsequence"/>
    </production>
    <production symbol="numberedlist1">
      <nonterminal symbol="numberedlist1"/>
      <nonterminal symbol="numberedlistitem1"/>
    </production>
    <production symbol="numberedlist1">
      <nonterminal symbol="numberedlistitem1"/>
    </production>
    <production symbol="numberedlist1">
      <nonterminal symbol="numberedlist1"/>
      <nonterminal symbol="numberedlist2"/>
    </production>
    <production symbol="numberedlist1">
      <nonterminal symbol="numberedlist2"/>
    </production>
    <production symbol="numberedlistitem1">
      <terminal symbol="numbered1item"/>
      <nonterminal symbol="textsequence"/>
    </production>
    <production symbol="numberedlist2">
      <nonterminal symbol="numberedlist2"/>
      <nonterminal symbol="numberedlistitem2"/>
    </production>
    <production symbol="numberedlist2">
      <nonterminal symbol="numberedlistitem2"/>
    </production>
    <production symbol="numberedlist2">
      <nonterminal symbol="numberedlist2"/>
      <nonterminal symbol="numberedlist3"/>
    </production>
    <production symbol="numberedlist2">
      <nonterminal symbol="numberedlist3"/>
    </production>
    <production symbol="numberedlistitem2">
      <terminal symbol="numbered2item"/>
      <nonterminal symbol="textsequence"/>
    </production>
    <production symbol="numberedlist3">
      <nonterminal symbol="numberedlist3"/>
      <nonterminal symbol="numberedlistitem3"/>
    </production>
    <production symbol="numberedlist3">
      <nonterminal symbol="numberedlistitem3"/>
    </production>
    <production symbol="numberedlistitem3">
      <terminal symbol="numbered3item"/>
      <nonterminal symbol="textsequence"/>
    </production>
    <production symbol="table">
      <nonterminal symbol="tablehead"/>
      <terminal symbol="softbreak"/>
      <nonterminal symbol="tablerows"/>
    </production>
    <production symbol="table">
      <nonterminal symbol="tablehead"/>
      <terminal symbol="softbreak"/>
      <nonterminal symbol="tablerows"/>
      <terminal symbol="softbreak"/>
    </production>
    <production symbol="tablehead">
      <nonterminal symbol="tablehead"/>
      <nonterminal symbol="tabletitle"/>
    </production>
    <production symbol="tablehead">
      <nonterminal symbol="tabletitle"/>
    </production>
    <production symbol="tabletitle">
      <terminal symbol="tabletitleitem"/>
      <nonterminal symbol="textblock"/>
    </production>
    <production symbol="tablerows">
      <nonterminal symbol="tablerows"/>
      <terminal symbol="softbreak"/>
      <nonterminal symbol="tablecolumns"/>
    </production>
    <production symbol="tablerows">
      <nonterminal symbol="tablecolumns"/>
    </production>
    <production symbol="tablecolumns">
      <nonterminal symbol="tablecolumns"/>
      <nonterminal symbol="tablecolumn"/>
    </production>
    <production symbol="tablecolumns">
      <nonterminal symbol="tablecolumn"/>
    </production>
    <production symbol="tablecolumn">
      <terminal symbol="tablecolumnitem"/>
      <nonterminal symbol="textblock"/>
    </production>
    <production symbol="title">
      <terminal symbol="titleitem"/>
      <nonterminal symbol="textsequence"/>
    </production>
    <production symbol="textsequence">
      <nonterminal symbol="textsequence"/>
      <nonterminal symbol="textblock"/>
      <terminal symbol="softbreak"/>
    </production>
    <production symbol="textsequence">
      <nonterminal symbol="textsequence"/>
      <nonterminal symbol="textblock"/>
    </production>
    <production symbol="textsequence">
      <nonterminal symbol="textblock"/>
      <terminal symbol="softbreak"/>
    </production>
    <production symbol="textsequence">
      <nonterminal symbol="textblock"/>
    </production>
    <production symbol="textblock">
      <terminal symbol="link"/>
    </production>
    <production symbol="textblock">
      <terminal symbol="anchor"/>
    </production>
    <production symbol="textblock">
      <nonterminal symbol="strongblock"/>
    </production>
    <production symbol="textblock">
      <nonterminal symbol="emblock"/>
    </production>
    <production symbol="textblock">
      <terminal symbol="text"/>
    </production>
    <production symbol="textblock">
      <nonterminal symbol="codeblock"/>
    </production>
    <production symbol="emblock">
      <terminal symbol="emitem"/>
      <terminal symbol="text"/>
      <terminal symbol="emitem"/>
    </production>
    <production symbol="strongblock">
      <terminal symbol="strongitem"/>
      <terminal symbol="text"/>
      <terminal symbol="strongitem"/>
    </production>
    <production symbol="codeblock">
      <terminal symbol="codeopenitem"/>
      <terminal symbol="text"/>
      <terminal symbol="codecloseitem"/>
    </production>
    <start symbol="document"/>
  </grammar>
  
  
  
  1.1                  xml-forrest/src/resources/grammars/wiki.xlex
  
  Index: wiki.xlex
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <lexicon xmlns="http://chaperon.sourceforge.net/schema/lexicon/1.0">
    <!--This file was generated! Don't edit!-->
    <lexeme symbol="line">
      <concat>
        <cstring content="-"/>
        <cstring content="-"/>
        <cstring content="-"/>
        <cstring content="-"/>
        <concat minOccurs="1" maxOccurs="*">
          <cstring content="-"/>
        </concat>
      </concat>
    </lexeme>
    <lexeme symbol="bulleteditem">
      <concat minOccurs="1" maxOccurs="*">
        <cstring content="*"/>
      </concat>
    </lexeme>
    <lexeme symbol="numbered1item">
      <cstring content="#"/>
    </lexeme>
    <lexeme symbol="numbered2item">
      <concat>
        <cstring content="#"/>
        <cstring content="#"/>
      </concat>
    </lexeme>
    <lexeme symbol="numbered3item">
      <concat>
        <cstring content="#"/>
        <cstring content="#"/>
        <cstring content="#"/>
      </concat>
    </lexeme>
    <lexeme symbol="tabletitleitem">
      <concat>
        <cstring content="|"/>
        <cstring content="|"/>
      </concat>
    </lexeme>
    <lexeme symbol="tablecolumnitem">
      <cstring content="|"/>
    </lexeme>
    <lexeme symbol="titleitem">
      <concat minOccurs="1" maxOccurs="*">
        <cstring content="!"/>
      </concat>
    </lexeme>
    <lexeme symbol="emitem">
      <concat>
        <cstring content="'"/>
        <cstring content="'"/>
      </concat>
    </lexeme>
    <lexeme symbol="codeopenitem">
      <concat>
        <cstring content="{"/>
        <cstring content="{"/>
      </concat>
    </lexeme>
    <lexeme symbol="codecloseitem">
      <concat>
        <cstring content="}"/>
        <cstring content="}"/>
      </concat>
    </lexeme>
    <lexeme symbol="strongitem">
      <concat>
        <cstring content="_"/>
        <cstring content="_"/>
      </concat>
    </lexeme>
    <lexeme symbol="source">
      <concat>
        <cstring content="{"/>
        <cstring content="{"/>
        <cstring content="{"/>
        <concat minOccurs="0" maxOccurs="*">
          <concat>
            <concat minOccurs="0" maxOccurs="2">
              <cstring content="}"/>
            </concat>
            <cclass exclusive="true">
              <cset content="}"/>
            </cclass>
          </concat>
        </concat>
        <cstring content="}"/>
        <cstring content="}"/>
        <cstring content="}"/>
      </concat>
    </lexeme>
    <lexeme symbol="anchor">
      <concat>
        <cstring content="["/>
        <concat minOccurs="0" maxOccurs="1">
          <concat>
            <concat minOccurs="0" maxOccurs="*">
              <cclass exclusive="true">
                <cset content="["/>
                <cset content="|"/>
                <cset content="]"/>
              </cclass>
            </concat>
            <cstring content="|"/>
          </concat>
        </concat>
        <cstring content="#"/>
        <concat minOccurs="0" maxOccurs="*">
          <cclass exclusive="true">
            <cset content="["/>
            <cset content="|"/>
            <cset content="]"/>
          </cclass>
        </concat>
        <cstring content="]"/>
      </concat>
    </lexeme>
    <lexeme symbol="link">
      <concat>
        <cstring content="["/>
        <concat minOccurs="0" maxOccurs="1">
          <concat>
            <concat minOccurs="0" maxOccurs="*">
              <cclass exclusive="true">
                <cset content="["/>
                <cset content="|"/>
                <cset content="]"/>
              </cclass>
            </concat>
            <cstring content="|"/>
          </concat>
        </concat>
        <concat minOccurs="0" maxOccurs="*">
          <cclass exclusive="true">
            <cset content="["/>
            <cset content="|"/>
            <cset content="]"/>
          </cclass>
        </concat>
        <cstring content="]"/>
      </concat>
    </lexeme>
    <lexeme symbol="text">
      <concat>
        <alt>
          <cclass exclusive="true">
            <cset content=" "/>
            <cset code="9"/>
            <cset code="10"/>
            <cset code="13"/>
            <cset content="["/>
            <cset content="{"/>
            <cset content="}"/>
            <cset content="|"/>
            <cset content="*"/>
            <cset content="_"/>
            <cset content="!"/>
            <cset content="#"/>
            <cset content="'"/>
          </cclass>
          <concat>
            <cstring content="_"/>
            <cclass exclusive="true">
              <cset content="_"/>
            </cclass>
          </concat>
          <concat>
            <cstring content="{"/>
            <cclass exclusive="true">
              <cset content="{"/>
            </cclass>
          </concat>
          <concat>
            <cstring content="}"/>
            <cclass exclusive="true">
              <cset content="}"/>
            </cclass>
          </concat>
          <concat>
            <cstring content="'"/>
            <cclass exclusive="true">
              <cset content="'"/>
            </cclass>
          </concat>
          <concat>
            <cstring content="["/>
            <cstring content="["/>
          </concat>
        </alt>
        <concat minOccurs="0" maxOccurs="*">
          <alt>
            <cclass exclusive="true">
              <cset code="10"/>
              <cset code="13"/>
              <cset content="["/>
              <cset content="{"/>
              <cset content="}"/>
              <cset content="|"/>
              <cset content="_"/>
              <cset content="'"/>
            </cclass>
            <concat>
              <cstring content="_"/>
              <cclass exclusive="true">
                <cset content="_"/>
              </cclass>
            </concat>
            <concat>
              <cstring content="{"/>
              <cclass exclusive="true">
                <cset content="{"/>
              </cclass>
            </concat>
            <concat>
              <cstring content="}"/>
              <cclass exclusive="true">
                <cset content="}"/>
              </cclass>
            </concat>
            <concat>
              <cstring content="'"/>
              <cclass exclusive="true">
                <cset content="'"/>
              </cclass>
            </concat>
            <concat>
              <cstring content="["/>
              <cstring content="["/>
            </concat>
            <concat>
              <cstring content="|"/>
              <cclass exclusive="true">
                <cset content="|"/>
                <cset content=" "/>
                <cset code="9"/>
              </cclass>
            </concat>
          </alt>
        </concat>
      </concat>
    </lexeme>
    <lexeme symbol="softbreak" assoc="right">
      <alt>
        <concat>
          <cstring code="13"/>
          <concat minOccurs="0" maxOccurs="1">
            <cstring code="10"/>
          </concat>
        </concat>
        <cstring code="10"/>
      </alt>
    </lexeme>
    <lexeme symbol="hardbreak" assoc="right">
      <concat>
        <alt>
          <concat>
            <cstring code="13"/>
            <concat minOccurs="0" maxOccurs="1">
              <cstring code="10"/>
            </concat>
          </concat>
          <cstring code="10"/>
        </alt>
        <concat minOccurs="1" maxOccurs="*">
          <alt>
            <concat>
              <cstring code="13"/>
              <concat minOccurs="0" maxOccurs="1">
                <cstring code="10"/>
              </concat>
            </concat>
            <cstring code="10"/>
          </alt>
        </concat>
      </concat>
    </lexeme>
    <lexeme>
      <concat minOccurs="1" maxOccurs="*">
        <cclass>
          <cset content=" "/>
          <cset code="9"/>
        </cclass>
      </concat>
    </lexeme>
  </lexicon>
  
  
  
  1.1                  xml-forrest/src/resources/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:st="http://chaperon.sourceforge.net/schema/syntaxtree/1.0"
                  exclude-result-prefixes="st">
  
   <xsl:output indent="yes" 
               method="html"
               doctype-public="-//APACHE//DTD Documentation V1.1//EN"
               doctype-system="document-v11.dtd"
               cdata-section-elements="source"/>
  
   <xsl:template match="st:document">
    <document>
     <header>
      <title>
      <xsl:value-of select="st:section/st:title//st:text"/>
      </title>
     </header>
     <body>
      <xsl:apply-templates select="st:paragraphs/st:paragraph/st:*" mode="paragraph"/>  
      <xsl:apply-templates select="st:section"/>
     </body>
    </document>
   </xsl:template>
  
   <xsl:template match="st:section">
    <section>
     <title><xsl:value-of select="st:title/st:textsequence"/></title>
     <xsl:apply-templates select="st:paragraphs/st:paragraph/st:*" mode="paragraph"/>
    </section>
   </xsl:template>
  
   <xsl:template match="st:source" mode="paragraph">
    <source>
     <xsl:value-of select="substring(.,4,string-length(.)-6)"/>
    </source>
   </xsl:template>
  
   <xsl:template match="st:textsequence" mode="paragraph">
    <p>
     <xsl:apply-templates select="st:textblock/st:*"/>
    </p>
   </xsl:template>
  
   <xsl:template match="st:table" mode="paragraph"> 
    <table>
     <xsl:apply-templates select="st:tablehead|st:tablerows/st:tablecolumns"/>
    </table>
   </xsl:template>
  
   <xsl:template match="st:tablehead"> 
    <tr>
     <xsl:apply-templates select="st:tabletitle"/>
    </tr>
   </xsl:template>
  
   <xsl:template match="st:tabletitle">
    <th>
     <xsl:apply-templates select="st:textblock/st:*"/>
    </th>
   </xsl:template>
  
   <xsl:template match="st:tablecolumns">
    <tr>
     <xsl:apply-templates select="st:tablecolumn"/>
    </tr>
   </xsl:template>
  
   <xsl:template match="st:tablecolumn">
    <td>
     <xsl:apply-templates select="st:textblock/st:*"/>
    </td>
   </xsl:template>
  
   <xsl:template match="st:text">
    <xsl:value-of select="."/>
   </xsl:template>
  
   <xsl:template match="st:link">
    <xsl:choose>
     <xsl:when test="contains(.,'|')">
  
      <xsl:variable name="href" select="substring-before(substring-after(.,'|'),']')"/>
      <xsl:variable name="text" select="substring-after(substring-before(.,'|'),'[')"/>
  
      <xsl:choose>
       <xsl:when test="string(number($href)) != 'NaN'">
        <link href="#{$href}">
         <xsl:value-of select="$text"/>
        </link>
       </xsl:when>
       <xsl:when test="starts-with(@href,'http')">
        <link href="{$href}">
         <xsl:value-of select="$text"/>
        </link>
       </xsl:when>
       <xsl:otherwise>
        <link href="{$href}.html">
         <xsl:value-of select="$text"/>
        </link>
       </xsl:otherwise>
      </xsl:choose>
  
     </xsl:when>
     <xsl:otherwise>
      <xsl:variable name="href" select="substring(.,2,string-length(.)-2)"/>
      
      <xsl:choose>
       <xsl:when test="string(number($href)) != 'NaN'">
        <link href="#{$href}">
         [<xsl:value-of select="$href"/>]
        </link>
       </xsl:when>
       <xsl:when test="starts-with($href,'http')">
        <link href="{$href}">
         <xsl:value-of select="$href"/>
        </link>
       </xsl:when>
       <xsl:otherwise>
        <link href="{$href}.html">
         <xsl:value-of select="$href"/>
        </link>
       </xsl:otherwise>
      </xsl:choose>
  
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
  
   <xsl:template match="st:anchor" >
    <xsl:choose>
     <xsl:when test="contains(.,'|')">
      <anchor name="{substring-before(substring-after(.,'|#'),']')}">
       <xsl:value-of select="substring-after(substring-before(.,'|'),'[')"/>
      </anchor>
     </xsl:when>
     <xsl:otherwise>
      <anchor name="{substring(.,3,string-length(.)-3)}"/>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:template>
  
   <xsl:template match="st:emblock">
    <em><xsl:value-of select="st:text"/></em>
   </xsl:template>
  
   <xsl:template match="st:strongblock">
    <strong><xsl:value-of select="st:text"/></strong>
   </xsl:template>
  
   <xsl:template match="st:codeblock">
    <code><xsl:value-of select="st:text"/></code>
   </xsl:template>
  
   <xsl:template match="st:bulletedlist" mode="paragraph">
    <ul>
     <xsl:apply-templates select="st:bulletedlistitem"/>
    </ul>
   </xsl:template>
  
   <xsl:template match="st:bulletedlistitem" >
    <li>
     <xsl:apply-templates select="st:textsequence/st:textblock/st:*"/>
    </li>
   </xsl:template>
  
   <xsl:template match="st:numberedlist1" mode="paragraph">
    <ol>
     <xsl:apply-templates select="st:numberedlistitem1|st:numberedlist2"/>
    </ol>
   </xsl:template>
  
   <xsl:template match="st:numberedlistitem1" >
    <li>
     <xsl:apply-templates select="st:textsequence/st:textblock/st:*"/>
    </li>
   </xsl:template>
  
   <xsl:template match="st:numberedlist2" >
    <ol>
     <xsl:apply-templates select="st:numberedlistitem2|st:numberedlist3"/>
    </ol>
   </xsl:template>
      
   <xsl:template match="st:numberedlistitem2" >
    <li>
     <xsl:apply-templates select="st:textsequence/st:textblock/st:*"/>
    </li>
   </xsl:template>
  
   <xsl:template match="st:numberedlist3" >
    <ol>
     <xsl:apply-templates select="st:numberedlistitem3"/>
    </ol>
   </xsl:template>
      
   <xsl:template match="st:numberedlistitem3" >
    <li>
     <xsl:apply-templates select="st:textsequence/st:textblock/st:*"/>
    </li>
   </xsl:template>
  
   <xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
    <xsl:copy>
     <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
    </xsl:copy>
   </xsl:template>
  
  </xsl:stylesheet>
  
  
  

Mime
View raw message