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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> + 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="[EMAIL PROTECTED]" /> <person name="Sylvain Wallez" email="[EMAIL PROTECTED]" /> </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 'P' into a 'S1'.<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><a ...></code>)</li> <li><jump href="file:">Jump</jump>is hard window replacing link (equivalent of <code><a ... target="_top"></code>)</li> <li><fork href="file:">Fork</fork>is hard window forking link (equivalent of <code><a ... target="_new"></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'n'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'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("Hello World!"); } }</source> </s1> </body> <footer> <legal>(c) 2002 The Apache Software Foundation.</legal> </footer> </document>
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]