Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 28863 invoked from network); 20 Feb 2004 11:29:41 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 20 Feb 2004 11:29:41 -0000 Received: (qmail 46022 invoked by uid 500); 20 Feb 2004 11:29:12 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 45970 invoked by uid 500); 20 Feb 2004 11:29:12 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 45959 invoked by uid 500); 20 Feb 2004 11:29:12 -0000 Delivered-To: apmail-cocoon-2.1-cvs@apache.org Received: (qmail 45955 invoked from network); 20 Feb 2004 11:29:12 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 20 Feb 2004 11:29:12 -0000 Received: (qmail 28766 invoked by uid 1509); 20 Feb 2004 11:29:39 -0000 Date: 20 Feb 2004 11:29:39 -0000 Message-ID: <20040220112939.28765.qmail@minotaur.apache.org> From: stephan@apache.org To: cocoon-2.1-cvs@apache.org Subject: cvs commit: cocoon-2.1/src/blocks/chaperon/samples/stylesheets quote2page.xsl X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N stephan 2004/02/20 03:29:38 Modified: src/blocks/chaperon/samples sitemap.xmap src/blocks/chaperon/samples/grammars quote.grm src/blocks/chaperon/samples/misc samples.xml src/blocks/chaperon/samples/stylesheets quote2page.xsl Added: src/blocks/chaperon/samples/misc quote1.txt quote2.txt Removed: src/blocks/chaperon/samples/grammars quote.xgrm quote.xlex src/blocks/chaperon/samples/misc quote.txt Log: Add another CSV example. Update grammar to process empty cells, see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27061 Revision Changes Path 1.19 +4 -4 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.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- sitemap.xmap 5 Feb 2004 14:37:42 -0000 1.18 +++ sitemap.xmap 20 Feb 2004 11:29:38 -0000 1.19 @@ -195,10 +195,10 @@ - - - - + + + + 1.3 +11 -3 cocoon-2.1/src/blocks/chaperon/samples/grammars/quote.grm Index: quote.grm =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/grammars/quote.grm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- quote.grm 11 Dec 2003 11:21:36 -0000 1.2 +++ quote.grm 20 Feb 2004 11:29:38 -0000 1.3 @@ -1,7 +1,7 @@ %ignore "^#(.*)"; %token Comma "\,"; %token Value "[^\n\r\,]+"; -%token Break "\r(\n?) | \n"; +%token Break "\r(\n?) | \n"; %start document; @@ -11,6 +11,7 @@ document : rows Break | rows + | /* empty */ ; // each row seprated with one break @@ -22,6 +23,13 @@ // values separated by spaces row - : row Comma Value - | Value + : row Comma column + | column ; + +// allow empty columns +column + : Value + | /* empty */ + ; + 1.6 +4 -1 cocoon-2.1/src/blocks/chaperon/samples/misc/samples.xml Index: samples.xml =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/misc/samples.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- samples.xml 20 Jan 2004 15:23:58 -0000 1.5 +++ samples.xml 20 Feb 2004 11:29:38 -0000 1.6 @@ -39,8 +39,11 @@ - + This example processes a CSV file and generates a table from it. + + + This example processes a CSV file generate by MS Excel. 1.1 cocoon-2.1/src/blocks/chaperon/samples/misc/quote1.txt Index: quote1.txt =================================================================== Date,Open,High,Low,Close,Volume 20021101,0.11,0.11,0.11,0.11,74000 20021104,0.11,0.11,0.1,0.105,1166900 20021105,0.1,0.105,0.1,0.105,759670 20021106,0.1,0.105,0.1,0.105,101000 20021107,0.105,0.105,0.097,0.097,808230 20021108,0.1,0.105,0.1,0.1,685199 20021111,0.105,0.11,0.1,0.1,1109000 20021112,0.105,0.105,0.1,0.1,0 20021113,0.105,0.11,0.105,0.105,564856 20021114,0.105,0.105,0.1,0.105,617400 20021115,0.105,0.11,0.105,0.11,343500 20021118,0.11,0.11,0.105,0.11,427602 20021119,0.11,0.11,0.105,0.105,458679 20021120,0.11,0.115,0.11,0.115,669019 20021121,0.115,0.14,0.115,0.135,2906144 20021122,0.135,0.135,0.125,0.13,749000 20021125,0.13,0.13,0.12,0.12,1417533 20021126,0.125,0.125,0.12,0.12,505800 20021127,0.12,0.12,0.115,0.115,195472 20021128,0.115,0.12,0.11,0.12,322800 20021129,0.12,0.12,0.115,0.115,371600 20021202,0.115,0.115,0.11,0.11,1112575 20021203,0.11,0.11,0.105,0.105,252652 20021204,0.11,0.115,0.11,0.115,829171 20021205,0.115,0.115,0.11,0.11,390148 20021206,0.11,0.11,0.105,0.105,640881 20021209,0.11,0.115,0.11,0.11,1809529 20021210,0.11,0.11,0.105,0.105,1251090 20021211,0.105,0.11,0.1,0.1,515300 20021212,0.105,0.105,0.105,0.105,139000 20021213,0.11,0.115,0.11,0.11,2567966 20021216,0.115,0.115,0.11,0.115,605650 20021217,0.115,0.115,0.105,0.11,1219014 20021218,0.115,0.115,0.11,0.115,718090 20021219,0.12,0.125,0.115,0.12,2068299 20021220,0.12,0.125,0.12,0.125,954000 20021223,0.12,0.12,0.115,0.12,153300 20021224,0.12,0.12,0.12,0.12,554900 20021225,0.12,0.12,0.12,0.12,0 20021226,0.12,0.12,0.12,0.12,0 20021227,0.12,0.125,0.12,0.12,537133 20021230,0.12,0.125,0.115,0.115,1012467 20021231,0.12,0.12,0.115,0.115,442733 20030101,0.115,0.115,0.115,0.115,0 20030102,0.12,0.12,0.115,0.115,218000 20030103,0.12,0.12,0.115,0.12,640134 20030106,0.12,0.12,0.115,0.12,922506 20030107,0.125,0.125,0.115,0.12,529170 20030108,0.12,0.12,0.11,0.115,586026 20030109,0.12,0.135,0.115,0.135,6947552 20030110,0.14,0.155,0.14,0.145,7828670 20030113,0.15,0.15,0.135,0.14,3047764 20030114,0.14,0.14,0.125,0.125,2840680 20030115,0.125,0.13,0.12,0.125,1365666 20030116,0.13,0.13,0.12,0.13,1208000 20030117,0.13,0.13,0.12,0.12,1387520 20030120,0.125,0.125,0.12,0.12,664292 20030121,0.12,0.12,0.115,0.12,2164262 20030122,0.12,0.13,0.12,0.13,2751434 20030123,0.125,0.135,0.125,0.13,2718754 20030124,0.135,0.135,0.13,0.13,1035888 20030128,0.130,0.135,0.130,0.135,1933154 20030129,0.135,0.135,0.130,0.130,681900 20030130,0.130,0.130,0.125,0.125,661360 1.1 cocoon-2.1/src/blocks/chaperon/samples/misc/quote2.txt Index: quote2.txt =================================================================== DATE,EVENT,VENUE,RACE DISTANCE,ORGANISER,CONTAC No. JAN,,,,, 17th,GAUTENG NORTH AQUATHLON CHAMPS,Blue Bay quarry,Standard (run-swim-run),JOHAN KOK,072 659 2014 24th,TUKKIES TRIATHLON,ROODEPLAAT,1/2 Standard,ALBIE DE LANGE,082 453 0096 31st,TRI CHAMPS GAUTENG NORTH,ROODEPLAAT,Standard(swim-cycle-run),JEAN-PIERRE TEN NAPEL,082 358 4005 FEB,,,,, 8th,GARY WHITEHOUSE MEMORIAL,ROODEPLAAT,1/2 Standard(swim-cycle-run),HENNING VAN ASWEGEN,082 344 5641 14th,GAUTENG NORTH TRIATHLON CLINIC,LC DE VILLIERS,,JAN VAN ROOYEN,083 601 8103 28th,S.A. TRIATHLON CHAMPS,TBA,Standard (swim-cycle-run),, MAR,,,,, 1.6 +16 -37 cocoon-2.1/src/blocks/chaperon/samples/stylesheets/quote2page.xsl Index: quote2page.xsl =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/stylesheets/quote2page.xsl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- quote2page.xsl 20 Jan 2004 15:23:58 -0000 1.5 +++ quote2page.xsl 20 Feb 2004 11:29:38 -0000 1.6 @@ -12,58 +12,37 @@
- Stock quote + CSV Example -

- The example Comma-Separated Values (CSV) file is three months of end-of-day - data for one particular stock symbol (data such as that obtained from - Yahoo Finance). -

-

- Here are the first 5 lines (total 64) of the input file ... -

-
--------------------------------------------
  -20021101,0.11,0.11,0.11,0.11,74000
  -20021104,0.11,0.11,0.1,0.105,1166900
  -20021105,0.1,0.105,0.1,0.105,759670
  -20021106,0.1,0.105,0.1,0.105,101000
  -20021107,0.105,0.105,0.097,0.097,808230
  -...
  ---------------------------------------------
-

- After processing with the Lexer Transformer and the Parser Transformer, - here is the result ... -

- - - - - - - - - - + +
Line #DateOpenHighLowCloseVolume
- - + + + Line # + + - - + + - - + + + + + +