forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject cvs commit: xml-forrest/src/resources/skins/common/xslt/html document2html.xsl
Date Mon, 08 Sep 2003 13:48:15 GMT
nicolaken    2003/09/08 06:48:15

  Modified:    .        status.xml
               src/resources/fresh-site/src/documentation/content/xdocs
                        site.xml
               src/resources/fresh-site forrest.properties
               src/resources/skins/common/xslt/html document2html.xsl
  Added:       src/resources/fresh-site/src/documentation/content/xdocs/samples
                        multiple-namespaces.xml html-sample.html
  Log:
        <action dev="NKB" type="add" context="skins">
          In the common skin and derivatives, allow xhtml-namespaced elements in
          document elements to passthrough when rendering to html.
          Added also example in the forrest seed (fresh-site).
        </action>
  
  Revision  Changes    Path
  1.204     +7 -1      xml-forrest/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/status.xml,v
  retrieving revision 1.203
  retrieving revision 1.204
  diff -u -r1.203 -r1.204
  --- status.xml	8 Sep 2003 12:08:22 -0000	1.203
  +++ status.xml	8 Sep 2003 13:48:15 -0000	1.204
  @@ -25,6 +25,11 @@
   
     <changes>
       <release version="0.5-dev" date="unreleased">
  +      <action dev="NKB" type="add" context="skins">
  +        In the common skin and derivatives, allow xhtml-namespaced elements in
  +        document elements to passthrough when rendering to html.
  +        Added also example in the forrest seed (fresh-site).
  +      </action>    
         <action dev="JT" type="update" context="skins">
           In the forrest-site skin and derivatives, display the author and version at the
           bottom of the page, as krysalis-site does.  Also added parsing for CVS Revision
  @@ -1153,4 +1158,5 @@
     </issues>
   
   </status>
  +
   
  
  
  
  1.19      +7 -3      xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/site.xml
  
  Index: site.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/site.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- site.xml	2 Sep 2003 21:02:30 -0000	1.18
  +++ site.xml	8 Sep 2003 13:48:15 -0000	1.19
  @@ -30,12 +30,16 @@
       </sample>
       <sample2 label="Static content" href="sample2.html" 
         description="More Samples" />
  +    <sample-multiple-namespaces label="Multiple namespaces" href="multiple-namespaces.html"

  +      description="Multiple Namespaces" />
       <sample-wiki label="Wiki page" href="wiki-sample.html" 
  -      description="wiki-sample" />
  +      description="Wiki Sample" />
  +    <sample-html label="html page" href="html-sample.html" 
  +      description="Test HTML page" />
       <sample-ihtml label="ihtml page" href="ihtml-sample.html" 
  -      description="Test iHTML page" />
  +      description="Test iHTML page (deprecated)" />
       <sample-ehtml label="ehtml page" href="ehtml-sample.html" 
  -      description="Sample HTML page" />
  +      description="Sample eHTML page (deprecated)" />
       <faq label="FAQ" href="faq.html" description="Frequently Asked Questions" />
       <sdocbook label="Simplifed Docbook page" href="sdocbook.html" 
         description="Simplified DocBook title" />
  
  
  
  1.1                  xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/samples/multiple-namespaces.xml
  
  Index: multiple-namespaces.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "http://apache.org/forrest/dtd/document-v12.dtd">
  <document xmlns:xhtml="http://www.w3.org/1999/xhtml"> 
    <header> 
      <title>The document-v1.2 DTD</title> 
      <authors><person name="Jeff Turner" email="jefft@apache.org"/> 
      </authors> 
      <notice>This document doesn't make any sense at all.</notice> 
      <abstract>A nonsense document using all possible elements in the current
        <code>document-v12.dtd</code>.</abstract> 
    </header> 
    <body> 
      <section>
        <title>Sample Mixed-Namespace Content</title>
       
        <p>It's possible to add elements from other namespaces to the documents,
           and the skins can be changed to output meaningful representations of them.</p>

        <p>In particular, the default Forrest skins allow to add xhtml content 
           to the pages, as in this one</p> 
        <warning>The xhtml-namespaced elements will be outputted <strong>only</strong>
                 for html and xml outputs, and will not render in PDF.</warning> 
        <note>For now validation is performed with DTDs, so multiple-namespaced
              documents must be excluded from validation.</note>                
                 
      </section>
      <section>
        <title>Example</title>
       
       <xhtml:form>
          <xhtml:select xhtml:name="skin">
            <xhtml:option xhtml:value="krysalis-site">krysalis-site</xhtml:option>
            <xhtml:option xhtml:value="forrest-site">forrest-site</xhtml:option>
          </xhtml:select>
          <xhtml:input xhtml:type="submit" xhtml:value="Change Skin (temporarily, in the
webapp)"/>
        </xhtml:form>
        and other HTML <xhtml:blink>delights</xhtml:blink>               
                 
      </section>
    </body> 
    <footer> 
      <legal>© 2002 Apache Forrest</legal> 
    </footer>
  </document>
  
  
  
  1.1                  xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/samples/html-sample.html
  
  Index: html-sample.html
  ===================================================================
  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <html>
  <head>
  </head>
  	<body>
  		
  <h1>Test HTML page</h1>
  		
  <p> 		This HTML is used to render the page instead of using the Forrest
  XML DTD directly.</p>
  <p> 		The source is cleaned of non-recognized html tags, such as 
  presentational tags, made into valid xml, and skinned as other native
  xdocument sources.</p>
  <p> 		This supercedes the ihtml pages and keeps the same functionality.</p>
  		
  <p>All linked-to pages, like <a href="../test2.html">this one</a>, are
  		also available. 		</p>
  <hr> 		[<a href="index.html">Index</a>] 	
  </body>
  </html>
  
  
  
  1.30      +1 -1      xml-forrest/src/resources/fresh-site/forrest.properties
  
  Index: forrest.properties
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/fresh-site/forrest.properties,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- forrest.properties	4 Sep 2003 18:28:43 -0000	1.29
  +++ forrest.properties	8 Sep 2003 13:48:15 -0000	1.30
  @@ -80,7 +80,7 @@
   #forrest.validate.xdocs.failonerror=${forrest.validate.failonerror}
   #
   #forrest.validate.xdocs.includes=**/*.x*
  -#forrest.validate.xdocs.excludes=site.xml
  +forrest.validate.xdocs.excludes=site.xml,samples/multiple-namespaces.xml
   #
   #forrest.validate.skinconf.includes=${skinconf-file}
   #forrest.validate.skinconf.excludes=
  
  
  
  1.30      +20 -2     xml-forrest/src/resources/skins/common/xslt/html/document2html.xsl
  
  Index: document2html.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/common/xslt/html/document2html.xsl,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- document2html.xsl	8 Sep 2003 12:11:13 -0000	1.29
  +++ document2html.xsl	8 Sep 2003 13:48:15 -0000	1.30
  @@ -15,7 +15,9 @@
   
   $Id$
   -->
  -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  +<xsl:stylesheet version="1.0" 
  +                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  +                xmlns:xhtml="http://www.w3.org/1999/xhtml">
   
     <!-- the skinconf file -->
     <xsl:param name="config-file" select="'../../../../skinconf.xml'"/>
  @@ -441,4 +443,20 @@
         <xsl:apply-templates/>
       </xsl:copy>
     </xsl:template>
  +  
  +  <!-- make xhtml elements passthrough by default -->
  +    <xsl:template match="xhtml:*">
  +    <xsl:element name="{local-name()}">
  +      <xsl:apply-templates select="@*|node()"/>
  +    </xsl:element>
  +  </xsl:template>
  +  
  +  <!-- make xhtml attributes passthrough by default -->
  +  <xsl:template match="@xhtml:*">
  +    <xsl:attribute name="{local-name()}">
  +      <xsl:value-of select="."/>
  +    </xsl:attribute>
  +  </xsl:template>
  +  
  +  
   </xsl:stylesheet>
  
  
  

Mime
View raw message