cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From step...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/chaperon/samples/stylesheets egrm2xegrm.xsl
Date Thu, 05 Feb 2004 14:37:42 GMT
stephan     2004/02/05 06:37:42

  Modified:    src/blocks/chaperon/samples sitemap.xmap
               src/blocks/chaperon/samples/misc view.xml wiki.js
               src/blocks/chaperon/samples/stylesheets egrm2xegrm.xsl
  Added:       src/blocks/chaperon/samples/misc source.xml
  Log:
  Add link to get the wiki content as xdoc.
  
  Revision  Changes    Path
  1.18      +8 -0      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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- sitemap.xmap	5 Feb 2004 10:45:17 -0000	1.17
  +++ sitemap.xmap	5 Feb 2004 14:37:42 -0000	1.18
  @@ -142,6 +142,14 @@
       <map:serialize type="html"/>
      </map:match>
   
  +   <map:match pattern="wiki/source.xml">
  +    <map:generate  type="jx"      src="misc/source.xml" />
  +    <map:transform type="lexer"   src="cocoon:/wiki.xlex"/>
  +    <map:transform type="parser"  src="cocoon:/wiki.xgrm"         label="ast"/>
  +    <map:transform                src="stylesheets/wiki2xdoc.xsl" label="xdoc"/>
  +    <map:serialize type="xml"/>
  +   </map:match>
  +
     </map:pipeline>
   
     <map:pipeline type="caching"> 
  
  
  
  1.3       +1 -0      cocoon-2.1/src/blocks/chaperon/samples/misc/view.xml
  
  Index: view.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/misc/view.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- view.xml	22 Jan 2004 16:28:59 -0000	1.2
  +++ view.xml	5 Feb 2004 14:37:42 -0000	1.3
  @@ -3,6 +3,7 @@
    <header>
     <title>Wiki example</title>
     <tab title="Edit" href="edit.do?page=${page}"/>
  +  <tab title="Source" href="source.do?page=${page}"/>
     <tab title="back" href="."/>
    </header>
    <body>
  
  
  
  1.2       +12 -0     cocoon-2.1/src/blocks/chaperon/samples/misc/wiki.js
  
  Index: wiki.js
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/misc/wiki.js,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- wiki.js	20 Jan 2004 15:23:58 -0000	1.1
  +++ wiki.js	5 Feb 2004 14:37:42 -0000	1.2
  @@ -46,6 +46,18 @@
       cocoon.sendPage("wiki/view.html", {page:page, text:text});
   }
   
  +function source() {
  +                                                                                      
                                                                                        
  +    var page = cocoon.request.getParameter("page");
  +                                                                                      
                                                                                        
  +    if (page==null)
  +        page = "index";
  +                                                                                      
                                                                                        
  +    var text = read(page);
  +                                                                                      
                                                                                        
  +    cocoon.sendPage("wiki/source.xml", {page:page, text:text});
  +}
  +
   
   function read(page) {
   
  
  
  
  1.1                  cocoon-2.1/src/blocks/chaperon/samples/misc/source.xml
  
  Index: source.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <document>
   <header>
    <title>Wiki example</title>
   </header>
   <body>
    <text xmlns="http://chaperon.sourceforge.net/schema/text/1.0" source="wiki/${page}.txt"
line="1" column="1">${text}</text>
   </body>
  </document>
  
  
  
  1.3       +2 -7      cocoon-2.1/src/blocks/chaperon/samples/stylesheets/egrm2xegrm.xsl
  
  Index: egrm2xegrm.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/stylesheets/egrm2xegrm.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- egrm2xegrm.xsl	5 Feb 2004 10:45:17 -0000	1.2
  +++ egrm2xegrm.xsl	5 Feb 2004 14:37:42 -0000	1.3
  @@ -9,17 +9,14 @@
    <xsl:output indent="yes" method="xml" encoding="ASCII"/>
   
    <xsl:template match="st:output/st:grammar">
  -  <grammar>
  +  <grammar start="{st:start/st:name}">
   
      <xsl:if test="not (st:start)">
  -    bla
       <xsl:message terminate="yes">
        Start element is not defined!
       </xsl:message>
      </xsl:if>
   
  -   <xsl:attribute name="start"><xsl:value-of select="st:start/st:name"/></xsl:attribute>
  -
      <xsl:comment>This file was generated! Don't edit!</xsl:comment>
   
      <xsl:apply-templates select="st:definition"/>
  @@ -27,9 +24,7 @@
    </xsl:template>
   
    <xsl:template match="st:definition">
  -  <definition>
  -   <xsl:attribute name="name"><xsl:value-of select="st:name"/></xsl:attribute>
  -     
  +  <definition name="{st:name}">
      <xsl:apply-templates select="st:regex"/>
     </definition>
    </xsl:template>
  
  
  

Mime
View raw message