You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by sy...@apache.org on 2002/03/04 22:47:34 UTC

cvs commit: xml-cocoon2/src/documentation/xdocs/css testdoc.xml document.css

sylvain     02/03/04 13:47:34

  Modified:    src/documentation/xdocs/css document.css
  Added:       src/documentation/xdocs/css testdoc.xml
  Log:
  Enhancement to the CSS and sample document.
  Submitted by Fabien Tregan <fa...@airbus.aeromatra.com>
  
  Revision  Changes    Path
  1.2       +40 -17    xml-cocoon2/src/documentation/xdocs/css/document.css
  
  Index: document.css
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/css/document.css,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- document.css	3 Mar 2002 21:10:27 -0000	1.1
  +++ document.css	4 Mar 2002 21:47:34 -0000	1.2
  @@ -1,7 +1,7 @@
   /*===============================================================
     A CSS stylesheet for the document DTD, version 1.0
     
  -  $Id: document.css,v 1.1 2002/03/03 21:10:27 sylvain Exp $
  +  $Id: document.css,v 1.2 2002/03/04 21:47:34 sylvain Exp $
   
     PURPOSE:
       This CSS allows wysiwyg edition of xdocs with a CSS2-enabled
  @@ -12,6 +12,7 @@
   
     AUTHORS:
       Sylvain Wallez <sy...@apache.org>
  +    Fabien Tregan
     ===============================================================*/
   
   /*===============================================================
  @@ -19,7 +20,7 @@
     ===============================================================*/
   /* A person is a general human entity */
   person {
  -    content: paragraph(attr(name) ' (' attr(email) ')');
  +    content: paragraph(attr(name) ' <' attr(email) '>');
   }
   
   /*===============================================================
  @@ -147,12 +148,15 @@
   }
   
   /* Source Paragraph (normally space is preserved) */
  +/* need to center this block !! */
   source { 
       display: block;
       white-space: pre;
  -    background-color: #E0E0E0;
  -    border: thin solid gray;
  +    background-color: white;
  +    border: thin solid #0086b2;
       font-family: monospace;
  +    margin-left: 10ex;
  +    margin-right: 10ex;
   }
   
   /* Note Paragraph (normally shown encapsulated) */
  @@ -162,6 +166,7 @@
   }
   
   note:before {
  +    font-weight: bold;
       content: 'Note : ';
   }
   
  @@ -173,9 +178,10 @@
   }
   
   fixme:before {
  +    font-weight: bold;
       font-style: italic;
       color: green;
  -    content: 'FIXME [' attr(author) ']';
  +    content: 'FIXME [' attr(author) '] ';
   }
   
       /*====================================================
  @@ -312,33 +318,33 @@
         ====================================================*/
   
   header {
  +    border: thin solid #0086b2;
       display: block;
  -    background-color: #EEF;
  -    border: thin solid blue;
  -    padding: .6ex;
  +    margin-top: .5ex;
   }
   
   title { 
       display: block;
  -    text-align: center;
  +    color: #ffffff;
  +    background-color: #0086b2;
  +    text-align: right;
       font-weight: bold;
       font-size: 2em;
  -    color: maroon;
  -    margin-top: .67ex;
  -    margin-bottom: .67ex;
   }
   
   subtitle {
       display: block;
  -    text-align: center;
  +    color: #ffffff;
  +    background-color: #0086b2;
  +    text-align: right;
       font-weight: bold;
       font-size: 1.5em;
  -    color: maroon;
  -    margin-bottom: .67ex;
  +    margin-bottom: .8ex;
   }
   
   version {
       display: block;
  +    margin-bottom: .8ex;
   }
   version:before {
       content: 'Version : ';
  @@ -346,6 +352,7 @@
   
   type {
       display: block;
  +    margin-bottom: .8ex;
   }
   type:before {
       content: 'Type : ';
  @@ -353,28 +360,35 @@
   
   authors {
       display: block;
  +    margin-bottom: .8ex;
   }
   authors:before {
  -    text-align: center;
  +    text-align: left;
       content: paragraph('Authors : ');
   }
   /* 'person' in 'authors' */
   authors > person {
       display: block;
  -    text-align: center;
  +    margin-left: 5ex;
   }
   
   notice {
       display: block;
  +    margin-left: 5ex;
  +    margin-bottom: .8ex;
   }
   notice:before {
  +    display: block;
       content: 'Notice :';
   }
   
   abstract {
       display: block;
  +    margin-left: 5ex;
  +    margin-bottom: .8ex;
   }
   abstract:before {
  +    display: block;
       content: 'Abstract :';
   }
   
  @@ -383,6 +397,7 @@
         ====================================================*/
   body {
       display: block;
  +    font-family: sans-serif;
   }
   
   s1, s2, s3, s4 {
  @@ -405,6 +420,8 @@
   
   s1:before {
       font-size:2em;
  +    border: thin solid white;
  +    border-bottom-color: #0086b2;
   }
   
   s2:before {
  @@ -419,8 +436,14 @@
          Footer
         ====================================================*/
   footer {
  +    display: block;
  +    border: thin solid white;
  +    border-top-color: #0086b2;
  +    text-align: center;
  +    margin-top: 2em;
   }
   
   legal {
  +    color: #0086b2;
   }
   
  
  
  
  1.1                  xml-cocoon2/src/documentation/xdocs/css/testdoc.xml
  
  Index: testdoc.xml
  ===================================================================
  <?xml version='1.0' encoding='UTF-8'?>
  <?xml-stylesheet type="text/css"
  href="document.css"
  ?>
  <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN"
  "../dtd/document-v10.dtd">
  <document>
    <header>
      <title>Fast guide to XDoc Writing</title>
  
      <subtitle>A comprehensive intro to the xdoc DTD</subtitle>
  
      <version>1.0</version>
  
      <type>sample document</type>
  
      <authors>
        <person name="Fabien TREGAN"
                email="sorry@this_is_not_mail_supported.arg" />
  
        <person name="Sylvain Wallez"
                email="sylvain@apache.org" />
      </authors>
  
      <notice>This document should not be included in the docs !</notice>
  
      <abstract>This document is an example of <em>all</em> constucts in the DTD
      to test the CSS2 stylesheet.</abstract>
    </header>
  
    <body>
      <s1 title="Introduction">
        <p>This is a typical example : a &#39;P&#39; into a &#39;S1&#39;.<br />
        After this line break we have some <strong>strong text</strong>and a bit
        of <em>emphasis</em> to let you see how it looks.</p>
  
        <p>This second paragraph <sub>is subscripted a</sub>n<sup>d supscripted</sup>.</p>
  
        <p>Now that we have shown normal text, lets add figure and anchor :</p>
  
        <anchor id="ID_of_the_anchor" />
  
        <figure alt="This is my picture."
                src="file:C:\mypicture.gif" />
      </s1>
  
      <s1 title="Linking">
        <p>We have several types of links :</p>
  
        <ul>
          <li><link href="file:">Link</link>is hard replacing link (equivalent
          of <code>&#60;a ...&#62;</code>)</li>
  
          <li><jump href="file:">Jump</jump>is hard window replacing link
          (equivalent of <code>&#60;a ... target=&#34;_top&#34;&#62;</code>)</li>
  
          <li><fork href="file:">Fork</fork>is hard window forking link
          (equivalent of <code>&#60;a ... target=&#34;_new&#34;&#62;</code>)</li>
  
          <li><connect href="put_your_href_here">Connect</connect>is Soft link
          between processed pages (no equivalent in HTML)</li>
        </ul>
  
        <fixme author="FT">Does someone have an example for Connect ?</fixme>
      </s1>
  
      <s1 title="Hierarchy">
        <s2 title="First S2">
          <p>This is the first S2</p>
  
          <s3 title="First S3">
            <s4 title="And first S4">
              <p>but do we really need S4 ? :)</p>
            </s4>
          </s3>
  
          <s3 title="Second S3">
            <p>Mmmh... I hope you have a CSS 2 enabled editor :)</p>
  
            <p>If not, follow this <link
            href="http://www.xmlmind.com/xmleditor/">link</link></p>
          </s3>
        </s2>
  
        <s2 title="Second S2">
          <ol>
            <li>This is first Li in an OL</li>
  
            <li>This is the second one</li>
          </ol>
  
          <sl>
            <li>This is first LI in a SL</li>
  
            <li>This is the second one</li>
          </sl>
  
          <ul>
            <li>This is first LI in a UL</li>
  
            <li>This is the second one.</li>
          </ul>
  
          <dl>
            <dt>DL</dt>
  
            <dd>Definition List : contains a DT (Title) and a DD (Definition).</dd>
          </dl>
        </s2>
      </s1>
  
      <s1 title="Notes&#39;n&#39;notices">
        <p>Here they are :</p>
  
        <fixme author="Fabien TREGAN">Did I forget something important like a
        FIXME ?</fixme>
  
        <note>I should not forget to include an example of NOTE.</note>
      </s1>
  
      <s1 title="What about tables ?">
        <table>
          <tr>
            <th>This is a TH one of TR one</th>
  
            <td>This is a TD one of TR one</td>
          </tr>
  
          <tr>
            <td>This is a TD one of TR two</td>
  
            <td>This is a TD two of TR two.</td>
          </tr>
        </table>
      </s1>
  
      <s1 title="Let&#39;s finish with some code...">
        <p>You must be aware of that here is a difference between <code>code</code>
        wich is an inline element representing the name of a method or a
        property such as <code>java.lang.String</code>, or a small quotation
        from a source file, and source, wich contains much more code (usually a
        whole method or file) :</p>
  
        <source>public class Source {
    Source() {
      System.out.println(&#34;Hello World!&#34;);
    }
  }</source>
      </s1>
    </body>
  
    <footer>
      <legal>(c) 2002 The Apache Software Foundation.</legal>
    </footer>
  </document>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org