cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject cvs commit: cocoon-2.1/src/webapp/samples/hello-world/style/xsl page2chtml.xsl
Date Wed, 04 Jun 2003 22:45:08 GMT
joerg       2003/06/04 15:45:08

  Modified:    src/webapp/samples/hello-world samples.xml sitemap.xmap
  Added:       src/webapp/samples/hello-world/style/xsl page2chtml.xsl
  Log:
  added cHTML/iMode sample (bug 20477, provided by Arje Cahn)
  
  Revision  Changes    Path
  1.8       +8 -6      cocoon-2.1/src/webapp/samples/hello-world/samples.xml
  
  Index: samples.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/hello-world/samples.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- samples.xml	9 May 2003 09:47:54 -0000	1.7
  +++ samples.xml	4 Jun 2003 22:45:07 -0000	1.8
  @@ -35,12 +35,14 @@
       in WML (Wireless Markup Language) which is the markup language used
       in WAP-enabled agents (such as PDA or cell phones).
      </sample>
  +   <sample name="CHTML" href="hello.chtml">
  +    Or, as CHTML (Compact HTML), which is used by i-Mode compatible cell phones.
  +   </sample>
      <sample name="SVG" href="hello.svg">
       Given the power of XSLT and the fact that many presentation languages are
       based on the XML syntax, it is possible to generate even vector graphics
  -    from your content. Here is an example that renders to 
  -    SVG (Scalable Vector Graphics). (You need an SVG plugin, or an SVG-capable
  -    browser to see this.)
  +    from your content. Here is an example that renders to  SVG (Scalable Vector
  +    Graphics). (You need an SVG plugin, or an SVG-capable browser to see this.)
      </sample>   
      <sample name="Plain Text" href="hello.txt">
       Sometimes you don't need to be very fancy, so here is a plain text
  @@ -84,7 +86,7 @@
       This drawing shows how a simple XML page can be presented in OpenOffice Draw file format.
      </sample>
     </group>
  -  
  +
     <group name="Hello World Web Service">
      <sample name="Web Service" href="hello.service">
       Here is a super-simple web service that says hi!
  @@ -93,5 +95,5 @@
       And this is the corresponding WSDL descriptor.
      </sample>
     </group>
  -   
  +
   </samples>
  
  
  
  1.10      +15 -10    cocoon-2.1/src/webapp/samples/hello-world/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/hello-world/sitemap.xmap,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- sitemap.xmap	20 May 2003 00:54:12 -0000	1.9
  +++ sitemap.xmap	4 Jun 2003 22:45:07 -0000	1.10
  @@ -41,7 +41,13 @@
       <map:transform src="style/xsl/page2wml.xsl"/>
       <map:serialize type="wml"/>
      </map:match>
  -   
  +
  +   <map:match pattern="hello.chtml">
  +    <map:generate src="content/hello.xml"/>
  +    <map:transform src="style/xsl/page2chtml.xsl"/>
  +    <map:serialize type="chtml"/>
  +   </map:match>
  +
      <map:match pattern="hello.vml">
       <map:generate src="content/hello.xml"/>
       <map:transform src="style/xsl/page2vml.xsl"/>
  @@ -53,49 +59,48 @@
       <map:transform src="style/xsl/page2svg.xsl"/>
       <map:serialize type="svgxml"/>
      </map:match>
  -      
  +
      <map:match pattern="hello.wrl">
       <map:generate src="content/hello.xml"/>
       <map:transform src="style/xsl/page2vrml.xsl"/>
       <map:serialize type="vrml"/>
      </map:match>
   
  -
      <map:match pattern="hello.service">
       <map:generate src="content/hello.xml"/>
       <map:serialize type="xml"/>
      </map:match>
  -   
  +
      <map:match pattern="hello.service/WSDL">
       <map:generate src="webservice/HelloWorld.wsdl"/>
       <map:serialize type="xml"/>
      </map:match>
  -            
  +
      <map:match pattern="hello.sxw">
       <map:generate src="content/hello.xml"/>
       <map:transform src="style/xsl/page2sxw.xsl"/>
       <map:serialize type="sxw"/>
      </map:match>
  -            
  +
      <map:match pattern="hello.sxc">
       <map:generate src="content/hello.xml"/>
       <map:transform src="style/xsl/page2sxc.xsl"/>
       <map:serialize type="sxc"/>
      </map:match>
  -            
  +
      <map:match pattern="hello.sxi">
       <map:generate src="content/hello.xml"/>
       <!-- FIXME: XSLTC fails on this stylesheet -->
       <map:transform type="xalan" src="style/xsl/page2sxi.xsl"/>
       <map:serialize type="sxi"/>
      </map:match>
  -   
  +
      <map:match pattern="hello.sxd">
       <map:generate src="content/hello.xml"/>
       <map:transform src="style/xsl/page2sxd.xsl"/>
       <map:serialize type="sxd"/>
      </map:match>
  -   
  +
     </map:pipeline>
    </map:pipelines>
   </map:sitemap>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/hello-world/style/xsl/page2chtml.xsl
  
  Index: page2chtml.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
    <xsl:template match="page">
     <html version="C-HTML 1.0">
      <head>
       <meta name="CHTML" content="yes"/>
       <title>
        <xsl:value-of select="title"/>
       </title>
      </head>
      <body>
       <xsl:apply-templates/>
      </body>
     </html>
    </xsl:template>
  
    <xsl:template match="title">
     <center>
      <font color="#0000ff">
       <xsl:apply-templates/>
      </font>
     </center>
     <hr/>
    </xsl:template>
  
    <xsl:template match="para">
     <p>
      <xsl:apply-templates/>
     </p>
    </xsl:template>
  
    <xsl:template match="@*|node()" priority="-2">
     <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
     </xsl:copy>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  

Mime
View raw message