stephan 2003/03/27 05:12:21
Modified: src/blocks/chaperon/samples sitemap.xmap
src/blocks/chaperon/samples/grammars wiki.grm
src/blocks/chaperon/samples/stylesheets wiki2xdoc.xsl
src/blocks/chaperon/samples/wikitest selftest.txt
Log:
Fixed some issues.
Revision Changes Path
1.5 +1 -1 cocoon-2.1/src/blocks/chaperon/samples/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/sitemap.xmap,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sitemap.xmap 27 Mar 2003 08:50:06 -0000 1.4
+++ sitemap.xmap 27 Mar 2003 13:12:21 -0000 1.5
@@ -121,7 +121,7 @@
<map:pipelines>
- <map:pipeline type="caching" internal-only="true">
+ <map:pipeline type="caching">
<!-- Hint: During development you could expose this pipeline, to help
with writing your grammars. Use a text grammar myapp.grm and request
the myapp.xlex and myapp.xgrm URLs and then view source.
1.2 +11 -4 cocoon-2.1/src/blocks/chaperon/samples/grammars/wiki.grm
Index: wiki.grm
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/grammars/wiki.grm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- wiki.grm 9 Mar 2003 00:02:54 -0000 1.1
+++ wiki.grm 27 Mar 2003 13:12:21 -0000 1.2
@@ -1,5 +1,5 @@
-%token line "\-\-\-\- (\-+)";
+%token line "\-\-\-\- (\-*)";
%token bulleteditem "\*+";
@@ -25,11 +25,15 @@
%token link "\[( [^\[\|\]]* \| )? [^\[\|\]]* \]";
-%token text "([^\ \t\n\r\[\{\}\|\*_!#'] | _[^_] | \{[^\{] | \}[^\}] | '[^'] | \[\[)
- ([^ \n\r\[\{\}\|_'] | _[^_] | \{[^\{] | \}[^\}] | '[^'] | \[\[
| \|[^\|\ \t])*";
+%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 hardbreak "(\r(\n?) | \n) (\r(\n?) | \n)+";
%ignore "[\ \t]+";
@@ -47,6 +51,7 @@
section
: title paragraphs
| title hardbreak paragraphs
+ | title
;
paragraphs
@@ -142,7 +147,9 @@
: textsequence textblock softbreak
| textsequence textblock
| textblock softbreak
- | textblock
+ | textblock
+ | textsequence textblock break
+ | textblock break
;
textblock
1.2 +14 -6 cocoon-2.1/src/blocks/chaperon/samples/stylesheets/wiki2xdoc.xsl
Index: wiki2xdoc.xsl
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/blocks/chaperon/samples/stylesheets/wiki2xdoc.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- wiki2xdoc.xsl 9 Mar 2003 00:02:59 -0000 1.1
+++ wiki2xdoc.xsl 27 Mar 2003 13:12:21 -0000 1.2
@@ -13,7 +13,7 @@
<xsl:template match="st:document">
<document>
<header>
- <title>Wiki page</title>
+ <title><xsl:value-of select="st:section/st:title/st:textsequence"/></title>
</header>
<body>
<xsl:apply-templates select="st:paragraphs/st:paragraph/st:*"
mode="paragraph"/>
@@ -37,10 +37,14 @@
<xsl:template match="st:textsequence" mode="paragraph">
<p>
- <xsl:apply-templates select="st:textblock/st:*"/>
+ <xsl:apply-templates select="st:textblock/st:*|st:break"/>
</p>
</xsl:template>
+ <xsl:template match="st:line" mode="paragraph">
+
<p>--------------------------------------------------------------------------------</p>
+ </xsl:template>
+
<xsl:template match="st:table" mode="paragraph">
<table>
<xsl:apply-templates select="st:tablehead|st:tablerows/st:tablecolumns"/>
@@ -72,7 +76,11 @@
</xsl:template>
<xsl:template match="st:text">
- <xsl:value-of select="."/>
+ <xsl:value-of select="."/><xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="st:break">
+ <br/>
</xsl:template>
<xsl:template match="st:link">
@@ -140,15 +148,15 @@
</xsl:template>
<xsl:template match="st:emblock">
- <em><xsl:value-of select="st:text"/></em>
+ <em><xsl:value-of select="st:text"/></em><xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="st:strongblock">
- <strong><xsl:value-of select="st:text"/></strong>
+ <strong><xsl:value-of select="st:text"/></strong><xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="st:codeblock">
- <code><xsl:value-of select="st:text"/></code>
+ <code><xsl:value-of select="st:text"/></code><xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="st:bulletedlist" mode="paragraph">
1.3 +0 -4 cocoon-2.1/src/blocks/chaperon/samples/wikitest/selftest.txt
Index: selftest.txt
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/wikitest/selftest.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- selftest.txt 27 Mar 2003 08:50:25 -0000 1.2
+++ selftest.txt 27 Mar 2003 13:12:21 -0000 1.3
@@ -19,11 +19,7 @@
* 0.1 This bullet list is invisible in the html output if there is no section title
before it
* Headings are not nested as they should (use cocoon-view=xdoc to check xdocs XML
output)
* 1.2, heading is interpreted as text under heading 1.1
-* 4.2, missing space in 4.1 after bold and italic words
* 5.1 relative link points to wiki.cocoondev.org (but is it by design?)
-* 6,1 no ruler line
-* 6.2 no line break
-* 7.1 missing spaces ("allwords" and "befollowed").
-- 1.HEADINGS --