home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / parser-transformer.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  2.3 KB  |  73 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17. <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "document-v10.dtd">
  18.  
  19. <document>
  20.  <header>
  21.   <title>Parser Transformer</title>
  22.   <version>0.1</version>
  23.   <type>Technical document</type>
  24.   <authors>
  25.    <person id="SMS" name="Stephan Michels" email="stephan@apache.org"/>
  26.   </authors>
  27.   <abstract>This document describes the parser transformer of Cocoon.</abstract>
  28.  </header>
  29.  <body>
  30.   <s1 title="Parser Transformer">
  31.    <p>The parser transformer builds a syntax tree of a list of lexemes
  32.       (tokens), by using a grammar file.</p>
  33.  
  34.    <ul>
  35.     <li>Name: parser</li>
  36.     <li>Class: org.apache.cocoon.transformation.ParserTransformer</li>
  37.     <li>Cacheable: yes - uses the last modification date of the grammar
  38.       document for validation.</li>
  39.    </ul>
  40.  
  41.    <p>The parser uses the following elements from the SAX stream, and
  42.       replaces them through a syntax tree.</p>
  43.  
  44.    <source><![CDATA[
  45. <lexemes xmlns="http://chaperon.sourceforge.net/schema/lexemes/1.0">
  46.  <lexeme symbol="word" text="..."/>
  47.  <lexeme symbol="word" text="..."/>
  48.  <lexeme symbol="word" text="..."/>
  49.  <lexeme symbol="punctation" text="..."/>
  50. </lexemes>
  51. ]]></source>
  52.  
  53.    <p>The parser transformer will replace those elements with a syntax tree.
  54.    </p>
  55.  
  56.    <source><![CDATA[
  57. <paragraph xmlns="http://chaperon.sourceforge.net/schema/syntaxtree/1.0">
  58.  <sentence>
  59.   <word>...</word>
  60.   <word>...</word>
  61.   <word>...</word>
  62.   <punctation>...</punctation>
  63.  </sentence>
  64. </paragraph>
  65. ]]></source>
  66.  
  67.    <p>A detailed explanation of function and the grammar format can be found at <link
  68.      href="http://chaperon.sourceforge.net/">Chaperon</link>.</p>
  69.  
  70.   </s1>
  71.  </body>
  72. </document>
  73.