stephan 2003/02/17 09:42:55 Modified: src/blocks/chaperon/samples sitemap.xmap src/blocks/chaperon/samples/grammars quote.grm quote.xgrm src/blocks/chaperon/samples/stylesheets grm2xgrm.xsl grm2xlex.xsl quote2html.xsl Log: Fixed sample from David Crossley, last line break wasn't consumed. Revision Changes Path 1.9 +2 -2 xml-cocoon2/src/blocks/chaperon/samples/sitemap.xmap Index: sitemap.xmap =================================================================== RCS file: /home/cvs/xml-cocoon2/src/blocks/chaperon/samples/sitemap.xmap,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- sitemap.xmap 17 Feb 2003 09:04:42 -0000 1.8 +++ sitemap.xmap 17 Feb 2003 17:42:54 -0000 1.9 @@ -113,7 +113,7 @@ <map:pipelines> - <map:pipeline type="noncaching"><!-- internal-only="true">--> + <map:pipeline type="caching" internal-only="true"> <map:match pattern="*.xlex"> <map:generate src="grammars/{1}.grm"/> <map:transform type="lexer" src="grammars/grm.xlex"/> @@ -147,7 +147,7 @@ </map:pipeline> - <map:pipeline> + <map:pipeline type="caching"> <map:match pattern=""> <map:redirect-to uri="welcome"/> </map:match> 1.2 +7 -7 xml-cocoon2/src/blocks/chaperon/samples/grammars/quote.grm Index: quote.grm =================================================================== RCS file: /home/cvs/xml-cocoon2/src/blocks/chaperon/samples/grammars/quote.grm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- quote.grm 17 Feb 2003 09:04:42 -0000 1.1 +++ quote.grm 17 Feb 2003 17:42:54 -0000 1.2 @@ -1,20 +1,20 @@ -%token Comment "^#"; -%token Comma "\,"; -%token Value "[^\n\r\,]+"; - -%right SoftBreak "\r(\n?) | \n"; +%ignore "^#(.*)"; +%token Comma "\,"; +%token Value "[^\n\r\,]+"; +%token SoftBreak "\r(\n?) | \n"; %start document; %% document - : document row SoftBreak + : document SoftBreak row | row SoftBreak + | row ; row - : row column + : row Comma column | column ; 1.2 +5 -9 xml-cocoon2/src/blocks/chaperon/samples/grammars/quote.xgrm Index: quote.xgrm =================================================================== RCS file: /home/cvs/xml-cocoon2/src/blocks/chaperon/samples/grammars/quote.xgrm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- quote.xgrm 17 Feb 2003 09:04:42 -0000 1.1 +++ quote.xgrm 17 Feb 2003 17:42:54 -0000 1.2 @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <grammar xmlns="http://chaperon.sourceforge.net/schema/grammar/1.0"> <priority> -<terminal symbol="Comment"/> <terminal symbol="Comma"/> <terminal symbol="Value"/> <terminal symbol="SoftBreak"/> @@ -9,25 +8,22 @@ <associativity symbol="SoftBreak" type="right"/> <production symbol="document"> <nonterminal symbol="document"/> -<nonterminal symbol="row"/> <terminal symbol="SoftBreak"/> +<nonterminal symbol="row"/> </production> <production symbol="document"> <nonterminal symbol="row"/> <terminal symbol="SoftBreak"/> </production> -<production symbol="row"> +<production symbol="document"> <nonterminal symbol="row"/> -<nonterminal symbol="column"/> </production> <production symbol="row"> -<nonterminal symbol="column"/> -</production> -<production symbol="column"> -<terminal symbol="Value"/> +<nonterminal symbol="row"/> <terminal symbol="Comma"/> +<terminal symbol="Value"/> </production> -<production symbol="column"> +<production symbol="row"> <terminal symbol="Value"/> </production> <start symbol="document"/> 1.2 +1 -1 xml-cocoon2/src/blocks/chaperon/samples/stylesheets/grm2xgrm.xsl Index: grm2xgrm.xsl =================================================================== RCS file: /home/cvs/xml-cocoon2/src/blocks/chaperon/samples/stylesheets/grm2xgrm.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- grm2xgrm.xsl 3 Feb 2003 19:15:35 -0000 1.1 +++ grm2xgrm.xsl 17 Feb 2003 17:42:54 -0000 1.2 @@ -8,7 +8,7 @@ <xsl:output indent="yes" method="xml" encoding="ASCII"/> <xsl:template match="st:grammar" > - <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> 1.2 +1 -9 xml-cocoon2/src/blocks/chaperon/samples/stylesheets/grm2xlex.xsl Index: grm2xlex.xsl =================================================================== RCS file: /home/cvs/xml-cocoon2/src/blocks/chaperon/samples/stylesheets/grm2xlex.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- grm2xlex.xsl 3 Feb 2003 19:15:35 -0000 1.1 +++ grm2xlex.xsl 17 Feb 2003 17:42:54 -0000 1.2 @@ -8,7 +8,7 @@ <xsl:output indent="yes" method="xml" encoding="ASCII"/> <xsl:template match="st:grammar" > - <lexicon> + <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> @@ -112,7 +112,6 @@ <xsl:template match="st:regexdot"> <cclass exclusive="true"> - <!--<cset content=" "/>--> <cset code="10"/> <cset code="13"/> </cclass> @@ -167,15 +166,12 @@ <cset> <xsl:choose> <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'n'"> -<!-- <xsl:attribute name="content"><xsl:text disable-output-escaping="yes"> </xsl:text></xsl:attribute>--> <xsl:attribute name="code">10</xsl:attribute> </xsl:when> <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'r'"> -<!-- <xsl:attribute name="content"><xsl:text disable-output-escaping="yes"> </xsl:text></xsl:attribute>--> <xsl:attribute name="code">13</xsl:attribute> </xsl:when> <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 't'"> -<!-- <xsl:attribute name="content"><xsl:text disable-output-escaping="yes">	</xsl:text></xsl:attribute>--> <xsl:attribute name="code">9</xsl:attribute> </xsl:when> <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'u'"> @@ -198,22 +194,18 @@ <xsl:template match="st:maskedcharacter"> <xsl:choose> <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'n'"> - <!--<xsl:text disable-output-escaping="yes"> </xsl:text>--> <cstring code="10"/> </xsl:when> <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'r'"> - <!--<xsl:text disable-output-escaping="yes"> </xsl:text>--> <cstring code="13"/> </xsl:when> <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 't'"> - <!--<xsl:text disable-output-escaping="yes">	</xsl:text>--> <cstring code="9"/> </xsl:when> <xsl:when test="substring(translate(normalize-space(.), ' ', ''), 2,1) = 'u'"> <cstring code="#{substring(translate(normalize-space(.), ' ', ''), 2,6)}"/> </xsl:when> <xsl:when test="contains(.,'\ ')"> - <!--<xsl:text disable-output-escaping="yes"> </xsl:text>--> <cstring content=" "/> </xsl:when> <xsl:otherwise> 1.2 +5 -3 xml-cocoon2/src/blocks/chaperon/samples/stylesheets/quote2html.xsl Index: quote2html.xsl =================================================================== RCS file: /home/cvs/xml-cocoon2/src/blocks/chaperon/samples/stylesheets/quote2html.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- quote2html.xsl 17 Feb 2003 09:04:43 -0000 1.1 +++ quote2html.xsl 17 Feb 2003 17:42:54 -0000 1.2 @@ -48,13 +48,15 @@ <xsl:template match="st:row"> <tr> - <xsl:for-each select="st:column"> - <td><xsl:value-of select="st:Value"/></td> - </xsl:for-each> + <xsl:apply-templates select="st:Value"/> </tr> </xsl:template> <xsl:template match="st:Comma | st:SoftBreak"> + </xsl:template> + + <xsl:template match="st:Value"> + <td><xsl:value-of select="."/></td> </xsl:template> <xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]