Author: sjur Date: Fri Jan 18 09:54:19 2013 New Revision: 1435063 URL: http://svn.apache.org/viewvc?rev=1435063&view=rev Log: A number of changes: * Added support for definition list constructs (;Term:definition). * Fixed numerous spacing bugs: extra or missing spaces after inline elements. * Improved support for inline formatting and breaks, especially in tables. * Fixed processing of no-link constructs: [[text] should be rendered as [text], earlier it was rendered as [[text]. The plugin should now support all relevant jspwiki markup. As part of the changes, I also added whitespace to the grammar and the xsl, to make them more readable. I also added comments to the xsl. Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/grammars/wiki.grm forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/wiki2xdoc.xsl forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/status.xml Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/grammars/wiki.grm URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/grammars/wiki.grm?rev=1435063&r1=1435062&r2=1435063&view=diff ============================================================================== --- forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/grammars/wiki.grm (original) +++ forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/grammars/wiki.grm Fri Jan 18 09:54:19 2013 @@ -33,19 +33,30 @@ %token source "\{\{\{ (\}{0,2}[^\}])* \}\}\}"; +%token text "([^\ \t\n\r\[\{\}\|\*\\\-_!#';:] + | _[^_\n\r] + | \{[^\{\n\r] + | \}[^\}\n\r] + | '[^'\n\r] + | \[\[ + | \\[^\\\n\r] + | \-{1,3}[^\-\n\r]?) + ([^ \n\r\[\{\}\|\\\-_':] + | _[^_\n\r] + | \{[^\{\n\r] + | \}[^\}\n\r] + | '[^'\n\r] + | \[\[ + | \\[^\\\n\r] + | \-{1,3}[^\-\n\r]? + | \|[^\|\ \t])*"; + %token anchor "\[( [^\[\|\]]* \| )? # [^\[\|\]]* \]"; %token link "\[( [^\[\|\]]* \| )? [^\[\|\]]* \]"; -%token text "([^\ \t\n\r\[\{\}\|\*\\\-_!#'] | _[^_\n\r] | \{[^\{\n\r] | \}[^\}\n\r] | '[^'\n\r] - | \[\[ | \\[^\\\n\r] | \-{1,3}[^\-\n\r]?) - ([^ \n\r\[\{\}\|\\\-_'] | _[^_\n\r] | \{[^\{\n\r] | \}[^\}\n\r] | '[^'\n\r] - | \[\[ | \\[^\\\n\r] | \-{1,3}[^\-\n\r]? | \|[^\|\ \t])*"; - -%right softbreak "\r(\n?) | \n"; - -%right break "\\\\"; - +%right break "\\\\"; +%right softbreak "\r(\n?) | \n"; %right hardbreak "(\r(\n?) | \n) ([\ \t]* (\r(\n?) | \n))+"; %token bulleted1item "\*"; @@ -56,6 +67,9 @@ %token numbered2item "##"; %token numbered3item "###"; +%right deftermstart "\;"; +%token deftermdefstart "\:"; + %ignore "[\ \t]+"; %start document; @@ -143,6 +157,7 @@ paragraphs paragraph : bulletedlist1 | numberedlist1 + | deflist | textsequence | line | source %prec softbreak @@ -240,24 +255,45 @@ tablecolumns ; tablecolumn - : tablecolumnitem textblock + : tablecolumnitem limitedtextsequence ; -textsequence - : textsequence textblock softbreak - | textsequence textblock +limitedtextsequence + : textblock break limitedtextsequence + | textblock limitedtextsequence + | textblock + ; + +textsequence + : textblock textsequence softbreak + | textblock textsequence | textblock softbreak | textblock - | textsequence textblock break - | textblock break ; textblock : link | anchor - | strongblock - | emblock - | text + | strongblock + | emblock + | text + | codeblock + | deftermdefstart + | break + ; + +termtextsequence + : termtextblock break termtextsequence + | termtextblock termtextsequence + | termtextblock + ; + +termtextblock + : link + | anchor + | strongblock + | emblock + | text | codeblock ; @@ -273,8 +309,22 @@ codeblock : codeopenitem text codecloseitem ; -/* -deflistblock - : defliststart text deflistnext +deflist + : defentry deflist %prec PLUS + | defentry + ; + +defentry + : deflistterm deflistdef + ; + +deflistterm + : deftermstart termtextsequence + | deftermstart + ; + +deflistdef + : deftermdefstart textsequence + | deftermdefstart softbreak + | deftermdefstart ; -*/ Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/wiki2xdoc.xsl URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/wiki2xdoc.xsl?rev=1435063&r1=1435062&r2=1435063&view=diff ============================================================================== --- forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/wiki2xdoc.xsl (original) +++ forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/resources/chaperon/stylesheets/wiki2xdoc.xsl Fri Jan 18 09:54:19 2013 @@ -20,12 +20,13 @@ xmlns:st="http://chaperon.sourceforge.net/schema/syntaxtree/2.0" exclude-result-prefixes="st"> + (ABCDEFGHIJKLMNOPQRSTUVWXYZ @@ -62,6 +63,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -90,6 +130,8 @@ + +
<xsl:value-of select="st:title/st:textsequence"/> @@ -108,19 +150,24 @@
+ +

+
+ + @@ -141,18 +188,44 @@ + + + + + + + + + + + + + + + + + + + + + + +
+ + @@ -171,7 +244,9 @@ + + @@ -181,16 +256,15 @@ - - + {$text} - - - + + + @@ -203,11 +277,11 @@ - - + +

@@ -222,26 +296,34 @@

+ +
- + - + - + + +
-
  • +
  • + +
    • @@ -249,7 +331,11 @@
    -
  • +
  • + +
    • @@ -257,32 +343,75 @@
    -
  • +
  • + +
  • + +
    -
  • +
  • + +
  • +
    -
  • +
  • + +
  • +
    -
  • +
  • + +
  • +
    + + + +
    + +
    +
    + + + + + +
    + +
    +
    + +
    + +
    + + Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/status.xml URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/status.xml?rev=1435063&r1=1435062&r2=1435063&view=diff ============================================================================== --- forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/status.xml (original) +++ forrest/trunk/plugins/org.apache.forrest.plugin.input.wiki/status.xml Fri Jan 18 09:54:19 2013 @@ -23,6 +23,19 @@ + + Added support for definition list constructs (;Term:definition). + Fixed numerous spacing bugs: extra or missing spaces after inline elements. + Improved support for inline formatting and breaks, especially in tables. + Fixed processing of no-link constructs: [[text] should be + rendered as [text], earlier it was rendered as [[text]. + The plugin should now support all relevant jspwiki markup. + + + Fixed locationmap resource lookup, so that it is possible to override the + wiki parsing grammar and the wiki2xdocs stylesheet in the projecct source tree. + Added handling of localised content in wiki format, that is, filenames following the filename.locale.wiki format, where each locale variant
    - +