Author: vsiveton Date: Fri Aug 31 16:05:58 2007 New Revision: 571643 URL: http://svn.apache.org/viewvc?rev=571643&view=rev Log: o added test case
Added: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/java/org/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/java/org/apache/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/java/org/apache/maven/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/java/org/apache/maven/doxia/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/java/org/apache/maven/doxia/docrenderer/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/java/org/apache/maven/doxia/docrenderer/itext/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/java/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRendererTest.java (with props) maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/doc-without-TOC.xml (with props) maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/org/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/org/apache/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/org/apache/maven/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/org/apache/maven/doxia/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/org/apache/maven/doxia/docrenderer/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/org/apache/maven/doxia/docrenderer/itext/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRendererTest.xml (with props) maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/index.apt (with props) maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/overview.apt (with props) maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/resources.apt (with props) maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/fml/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/fml/faq.fml (with props) maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/css/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/css/site.css (with props) maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/images/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/images/architecture.odg (with props) maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/images/architecture.png (with props) maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/site.xml (with props) maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/xdoc/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/xdoc/references/ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/xdoc/references/fml-format.xml (with props) maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/xdoc/references/xdoc-format.xml (with props) Added: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/java/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRendererTest.java URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/java/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRendererTest.java?rev=571643&view=auto ============================================================================== --- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/java/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRendererTest.java (added) +++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/java/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRendererTest.java Fri Aug 31 16:05:58 2007 @@ -0,0 +1,106 @@ +package org.apache.maven.doxia.docrenderer.itext; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.io.File; + +import org.apache.maven.doxia.docrenderer.DocRenderer; +import org.codehaus.plexus.PlexusTestCase; +import org.codehaus.plexus.util.FileUtils; + +/** + * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Siveton</a> + * @version $Id$ + */ +public class DefaultPdfRendererTest + extends PlexusTestCase +{ + private static final String OUTPUT = "target/output"; + + private static final String SITE = "src/test/resources/site"; + + private static final String DESCRIPTOR_WITHOUT_TOC = "src/test/resources/doc-without-TOC.xml"; + + private File outputDirectory; + + private File siteDirectoryFile; + + private DocRenderer docRenderer; + + /** [EMAIL PROTECTED] */ + protected void setUp() + throws Exception + { + super.setUp(); + + docRenderer = (DocRenderer) lookup( DocRenderer.ROLE ); + + outputDirectory = getTestFile( OUTPUT ); + outputDirectory.mkdirs(); + + siteDirectoryFile = getTestFile( SITE ); + + FileUtils.copyDirectory( new File( siteDirectoryFile, "resources/css" ), new File( outputDirectory, "css" ), + "*.css", ".svn" ); + FileUtils.copyDirectory( new File( siteDirectoryFile, "resources/images" ), + new File( outputDirectory, "images" ), "*.png", ".svn" ); + } + + /** [EMAIL PROTECTED] */ + protected void tearDown() + throws Exception + { + release( docRenderer ); + super.tearDown(); + } + + /** + * @throws Exception + */ + public void testRenderFileFile() + throws Exception + { + docRenderer.render( siteDirectoryFile, outputDirectory ); + + assertTrue( new File( outputDirectory, "faq.pdf" ).exists() ); + assertTrue( new File( outputDirectory, "faq.pdf" ).length() > 0 ); + assertTrue( new File( outputDirectory, "index.pdf" ).exists() ); + assertTrue( new File( outputDirectory, "index.pdf" ).length() > 0 ); + assertTrue( new File( outputDirectory, "overview.pdf" ).exists() ); + assertTrue( new File( outputDirectory, "overview.pdf" ).length() > 0 ); + assertTrue( new File( outputDirectory, "resources.pdf" ).exists() ); + assertTrue( new File( outputDirectory, "resources.pdf" ).length() > 0 ); + + } + + /** + * @throws Exception + */ + public void testRenderFileFileFile() + throws Exception + { + File descriptor = getTestFile( DESCRIPTOR_WITHOUT_TOC ); + + docRenderer.render( siteDirectoryFile, outputDirectory, descriptor ); + + assertTrue( new File( outputDirectory, "doc-with-merged.pdf" ).exists() ); + assertTrue( new File( outputDirectory, "doc-with-merged.pdf" ).length() > 0 ); + } +} Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/java/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRendererTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/java/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRendererTest.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/doc-without-TOC.xml URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/doc-without-TOC.xml?rev=571643&view=auto ============================================================================== --- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/doc-without-TOC.xml (added) +++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/doc-without-TOC.xml Fri Aug 31 16:05:58 2007 @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<document outputName="doc-with-merged"> + <meta> + <title>Merged site</title> + <author>Vincent Siveton</author> + <subject>Merged site</subject> + <keywords>test</keywords> + </meta> +</document> Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/doc-without-TOC.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/doc-without-TOC.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRendererTest.xml URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRendererTest.xml?rev=571643&view=auto ============================================================================== --- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRendererTest.xml (added) +++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRendererTest.xml Fri Aug 31 16:05:58 2007 @@ -0,0 +1,37 @@ +<?xml version="1.0"?> +<!-- +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + --> +<plexus> + <components> + <component> + <role>org.apache.maven.doxia.docrenderer.DocRenderer</role> + <implementation>org.apache.maven.doxia.docrenderer.itext.DefaultPdfRenderer</implementation> + <requirements> + <requirement> + <role>org.apache.maven.doxia.module.site.manager.SiteModuleManager</role> + <field-name>siteModuleManager</field-name> + </requirement> + <requirement> + <role>org.apache.maven.doxia.Doxia</role> + <field-name>doxia</field-name> + </requirement> + </requirements> + </component> + </components> +</plexus> Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRendererTest.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRendererTest.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/index.apt URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/index.apt?rev=571643&view=auto ============================================================================== --- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/index.apt (added) +++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/index.apt Fri Aug 31 16:05:58 2007 @@ -0,0 +1,66 @@ + ----- + Doxia + ----- + Jason van Zyl + Vincent Siveton + ------ + July 2007 + ------ + +~~ Licensed to the Apache Software Foundation (ASF) under one +~~ or more contributor license agreements. See the NOTICE file +~~ distributed with this work for additional information +~~ regarding copyright ownership. The ASF licenses this file +~~ to you under the Apache License, Version 2.0 (the +~~ "License"); you may not use this file except in compliance +~~ with the License. You may obtain a copy of the License at +~~ +~~ http://www.apache.org/licenses/LICENSE-2.0 +~~ +~~ Unless required by applicable law or agreed to in writing, +~~ software distributed under the License is distributed on an +~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +~~ KIND, either express or implied. See the License for the +~~ specific language governing permissions and limitations +~~ under the License. + +~~ NOTE: For help with the syntax of this file, see: +~~ http://maven.apache.org/guides/mini/guide-apt-format.html + +Maven Doxia + + Doxia is a content generation framework which aims to provide its users with powerful + techniques for generating static and dynamic content: Doxia can be used in web-based + publishing context to generate static sites, in addition to being incorporated into + dynamic content generation systems like blogs, wikis and content management systems. + + Doxia supports markup languages with simple syntaxes. Lightweight markup languages + are used by people who might be expected to read the document source as well as the rendered output. + + Doxia is used extensively by Maven and it powers the entire documentation system of Maven. + It gives Maven the ability to take any document that Doxia supports and output it any format. + +* Brief History + + Based on the {{{http://www.xmlmind.com/aptconvert.html}Aptconvert}} project developed by + {{{http://www.xmlmind.com/}Xmlmind}} company, Doxia was initially hosted by Codehaus, to become + a sub-project of Maven early in 2006. + +* Main Features + + * Developed in Java + + * Support of several markup formats: APT (Almost Plain Text), Confluence, DocBook, + FML (FAQ Markup Language), LaTeX, RTF, TWiki, XDoc (popular in Apache land), XHTML + +~~ iText should be replaced by FOP + + * Easy to learn the syntax of the supported markup formats + + * Macro support + + * No need to have a corporate infrastructure (like wiki) to host your documentation + + * Extensible framework + + [] Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/index.apt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/index.apt ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/overview.apt URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/overview.apt?rev=571643&view=auto ============================================================================== --- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/overview.apt (added) +++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/overview.apt Fri Aug 31 16:05:58 2007 @@ -0,0 +1,104 @@ + ----- + Overview Of The Doxia Framework + ----- + Vincent Siveton + ------ + July 2007 + ------ + +~~ Licensed to the Apache Software Foundation (ASF) under one +~~ or more contributor license agreements. See the NOTICE file +~~ distributed with this work for additional information +~~ regarding copyright ownership. The ASF licenses this file +~~ to you under the Apache License, Version 2.0 (the +~~ "License"); you may not use this file except in compliance +~~ with the License. You may obtain a copy of the License at +~~ +~~ http://www.apache.org/licenses/LICENSE-2.0 +~~ +~~ Unless required by applicable law or agreed to in writing, +~~ software distributed under the License is distributed on an +~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +~~ KIND, either express or implied. See the License for the +~~ specific language governing permissions and limitations +~~ under the License. + +~~ NOTE: For help with the syntax of this file, see: +~~ http://maven.apache.org/guides/mini/guide-apt-format.html + +Overview Of The Doxia Framework + + The following figure represents the main components of the Doxia Framework. + +[images/architecture.png] Doxia Framework + + <<Note>>: Just like Maven, Doxia uses {{{http://plexus.codehaus.org/}Plexus}} extensively. + +*Sink API + + The <Sink> interface is a generic markup language interface. It contains several methods that + encapsulate common text syntax. A start tag is denoted by <xxxx()> method + and a end of tag by <xxxx_()> method. + + For instance, you could do things like: + +----- + sink.paragraph(); + sink.text( "my text" ); + sink.paragraph_(); +----- + + similar to this HTML markup: + +----- +<p>my text</p> +----- + + To find out more about the Sink API, you could read the Javadoc + {{{http://maven.apache.org/doxia/doxia-sink-api/apidocs/org/apache/maven/doxia/sink/Sink.html}here}}. + +*Doxia Core + + The <Core> is the API to parse a source and populate it in a <Sink> object. The <Parser> interface + contains only one method: + +----- +void parse( Reader source, Sink sink ) + throws ParseException; +----- + + The <ParseException> class has the responsibility to catch all parsing exceptions. It provides an + helper method, <getLineNumber()>, which helps to find where an error occurred. + + The <AbstractParser> class is an abstract implementation of the <Parser>. It provides a macro mechanism + to give dynamic functionalities for the parsing. For more information on macros, read the + {{{macros/index.html}Doxia Macro Guide}}. + + Finally, the <SiteModule> interface is the last part of the puzzle. It provides main definitions of a + given Doxia module and it is used by the <doxia-site-renderer> site tools. + +*Doxia Modules + + A Doxia module is an implementation of a given markup language like APT or Xdoc. Each module should + implement these interfaces: + + * <Parser> interface, more specifically the <AbstractParser> class + + * <SiteModule> interface + + [] + + Several modules provide also a <Sink> implementation to handle a specific markup language. + + For more information on modules, read the {{{modules/index.html}Doxia Module Guide}}. + +*Doxia Site Tools + + The <Site Tools> are a collection of tools to renderer an output. The main tool used by Maven, + specifically the {{{http://maven.apache.org/plugins/maven-site-plugin/}Maven Site Plugin}}, is the + <doxia-site-renderer> which renders in HTML any documents wrote with supported markup syntax. It used + {{{http://velocity.apache.org/}Velocity templates}} to customize the renderer and the + <site-decoration-model> tool to decorate the renderer. This component describes the layout of the site + defined in the <site.xml> file. + + The <doxia-doc-renderer> tool is used to renderer any document in another document. Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/overview.apt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/overview.apt ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/resources.apt URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/resources.apt?rev=571643&view=auto ============================================================================== --- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/resources.apt (added) +++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/resources.apt Fri Aug 31 16:05:58 2007 @@ -0,0 +1,49 @@ + ----- + External Resources + ----- + Vincent Siveton + ------ + July 2007 + ------ + +~~ Licensed to the Apache Software Foundation (ASF) under one +~~ or more contributor license agreements. See the NOTICE file +~~ distributed with this work for additional information +~~ regarding copyright ownership. The ASF licenses this file +~~ to you under the Apache License, Version 2.0 (the +~~ "License"); you may not use this file except in compliance +~~ with the License. You may obtain a copy of the License at +~~ +~~ http://www.apache.org/licenses/LICENSE-2.0 +~~ +~~ Unless required by applicable law or agreed to in writing, +~~ software distributed under the License is distributed on an +~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +~~ KIND, either express or implied. See the License for the +~~ specific language governing permissions and limitations +~~ under the License. + +~~ NOTE: For help with the syntax of this file, see: +~~ http://maven.apache.org/guides/mini/guide-apt-format.html + +External Resources + +*Articles + +*-----------+--------------+--------------+ +|| Title || Publisher || Author +*-----------+--------------+--------------+ +| {{{http://software.newsforge.com/article.pl?sid=04/04/16/1428219}Quick and dirty typesetting with APT}} | newsforge.com | Scott Nesbitt +*-----------+--------------+--------------+ +| {{{http://en.wikipedia.org/wiki/Lightweight_markup_language}Lightweight markup language}} | wikipedia.org | ? +*-----------+--------------+--------------+ +| {{{http://project.knowledgeforge.net/kforge/trac/wiki/TextProcessing}Simple (Ascii-Based) Text Formats}} | project.knowledgeforge.net | ? +*-----------+--------------+--------------+ + +*Tools + +*-----------+--------------+ +|| Name || Author +*-----------+--------------+ +| {{{http://apteditor.sourceforge.net/}APT Editor (Eclipse plugin)}} | Mathieu Avoine +*-----------+--------------+ Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/resources.apt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/apt/resources.apt ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/fml/faq.fml URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/fml/faq.fml?rev=571643&view=auto ============================================================================== --- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/fml/faq.fml (added) +++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/fml/faq.fml Fri Aug 31 16:05:58 2007 @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<faqs title="Frequently Asked Questions"> + <part id="General"> + <faq id="How to handle style in the APT markup language"> + <question>How to handle style in the APT markup language?</question> + <answer> + <p> + APT doesn't currently support style. It is in the roadmap. + </p> + </answer> + </faq> + <faq id="How to export in PDF"> + <question>How to export in PDF?</question> + <answer> + <p> + An <a href="http://www.lowagie.com/iText/">iText</a> module exists using the iText XML document. + Unfortunately, the iText team discontinued the XML to PDF functionalities. + </p> + <p> + A <a href="http://xmlgraphics.apache.org/fop/">FOP</a> module is currently in development in the + Doxia sandbox. You can get the source + <a href="http://svn.apache.org/repos/asf/maven/sandbox/trunk/doxia/doxia-module-fo/">here</a>. + </p> + </answer> + </faq> + <faq id="Is it possible to create a book"> + <question>Is it possible to create a book?</question> + <answer> + <p> + Doxia also has a fairly simple tool for writing books. It comes complete with a Maven plugin + to produce PDFs, LaTeX documents and Xdoc for direct integration in your Maven site. + </p> + <p> + The Doxia Book code is still in the + <a href="http://svn.apache.org/repos/asf/maven/sandbox/trunk/doxia/doxia-book/">Doxia sandbox</a>, + but it is fully functional allthough limited. + </p> + <p> + See <a href="./book/index.html">Writing Books in Doxia</a> for more information. + </p> + </answer> + </faq> + </part> +</faqs> \ No newline at end of file Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/fml/faq.fml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/fml/faq.fml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/css/site.css URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/css/site.css?rev=571643&view=auto ============================================================================== --- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/css/site.css (added) +++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/css/site.css Fri Aug 31 16:05:58 2007 @@ -0,0 +1,38 @@ +a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover { + background: none; + padding-right: 0; +} + +body ul { + list-style-type: square; +} + +#downloadbox { + float: right; + margin-left: 2em; + padding-left: 1em; + padding-right: 1em; + padding-bottom: 1em; + border: 1px solid #999; + background-color: #eee; + width: 17.5em; +} + +#downloadbox h5 { + color: #000; + margin: 0; + border-bottom: 1px solid #aaaaaa; + font-size: smaller; + padding: 0; + margin-top: 1em; +} + +#downloadbox p { + margin-top: 1em; + margin-bottom: 0; +} + +#downloadbox li { + text-indent: inherit; +} + Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/css/site.css ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/css/site.css ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/images/architecture.odg URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/images/architecture.odg?rev=571643&view=auto ============================================================================== Binary file - no diff available. Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/images/architecture.odg ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/images/architecture.png URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/images/architecture.png?rev=571643&view=auto ============================================================================== Binary file - no diff available. Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/resources/images/architecture.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/site.xml URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/site.xml?rev=571643&view=auto ============================================================================== --- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/site.xml (added) +++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/site.xml Fri Aug 31 16:05:58 2007 @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<!-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + --> + +<project name="Doxia"> + <bannerLeft> + <name>Doxia</name> + <src>images/apache-maven-project-2.png</src> + </bannerLeft> + <bannerRight> + <src>images/maven-logo-2.gif</src> + </bannerRight> + <publishDate format="dd MMM yyyy" position="right" /> + <skin> + <groupId>org.apache.maven.skins</groupId> + <artifactId>maven-stylus-skin</artifactId> + <version>1.0.1</version> + </skin> + <body> + <links> + <item name="Apache" href="http://www.apache.org/"/> + <item name="Maven 1.x" href="http://maven.apache.org/maven-1.x"/> + <item name="Maven 2.x" href="http://maven.apache.org/"/> + <item name="Continuum" href="http://maven.apache.org/continuum"/> + <item name="SCM" href="http://maven.apache.org/scm"/> + <item name="Wagon" href="http://maven.apache.org/wagon"/> + <item name="JXR" href="http://maven.apache.org/jxr"/> + <item name="Doxia" href="http://maven.apache.org/doxia"/> + </links> + + <head> + <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> + </script> + <script type="text/javascript"> + _uacct = "UA-140879-1"; + urchinTracker(); + </script> + </head> + + <menu name="About Doxia"> + <item name="What is Doxia?" href="index.html"/> + <item name="Overview" href="overview.html"/> + <item name="FAQ" href="faq.html"/> + </menu> + + <menu name="Documentation"> + <item name="References" href="references/index.html"> + <item name="Apt Format" href="references/apt-format.html"/> + <item name="FML Format" href="references/fml-format.html"/> + <item name="Xdoc Format" href="references/xdoc-format.html"/> + </item> + <item name="Doxia Modules Guide" href="modules/index.html"/> + <item name="Doxia Macros Guide" href="macros/index.html"/> + <item name="Writing Books" href="book/index.html"/> + <item name="Developer Centre" href="developers/index.html"/> + <item name="External Resources" href="resources.html"/> + </menu> + + <menu ref="reports"/> + </body> +</project> Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/site.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/site.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/xdoc/references/fml-format.xml URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/xdoc/references/fml-format.xml?rev=571643&view=auto ============================================================================== --- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/xdoc/references/fml-format.xml (added) +++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/xdoc/references/fml-format.xml Fri Aug 31 16:05:58 2007 @@ -0,0 +1,100 @@ +<?xml version="1.0"?> +<!-- +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + --> +<document> + + <properties> + <title>The FML (FAQ Markup Language) format</title> + <author email="ltheussl_AT_apache_DOT_org">Lukas Theussl</author> + </properties> + + <body> + + <section name="The FML format"> + + <subsection name="Overview"> + + <p> + An 'fml' is an XML document conforming to a small and simple set of tags. + The format was first used in the <a href="http://maven.apache.org/maven-1.x/">Maven 1</a>, + version of the <a href="http://maven.apache.org/maven-1.x/plugins/faq/">FAQ plugin</a>. + </p> + + </subsection> + + <subsection name="The FML format2"> + + <p> + The following is a sample FML document: + </p> + <source><![CDATA[<?xml version="1.0" encoding="UTF-8"?> + +<faqs title="Frequently Asked Questions" toplink="false"> + + <part id="general"> + <title>General</title> + + <faq id="whats-foo"> + <question> + What is Foo? + </question> + <answer> + <p>some markup goes here</p> + + <source>some source code</source> + + <p>some markup goes here</p> + </answer> + </faq> + + <faq id="whats-bar"> + <question> + What is Bar? + </question> + <answer> + <p>some markup goes here</p> + </answer> + </faq> + </part> + + <part id="install"> + + <title>Installation</title> + + <faq id="how-install"> + <question> + How do I install Foo? + </question> + <answer> + <p>some markup goes here</p> + </answer> + </faq> + + </part> + +</faqs> +]]></source> + + </subsection> + + </section> + + </body> + +</document> Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/xdoc/references/fml-format.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/xdoc/references/fml-format.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/xdoc/references/xdoc-format.xml URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/xdoc/references/xdoc-format.xml?rev=571643&view=auto ============================================================================== --- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/xdoc/references/xdoc-format.xml (added) +++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/xdoc/references/xdoc-format.xml Fri Aug 31 16:05:58 2007 @@ -0,0 +1,278 @@ +<?xml version="1.0"?> +<!-- +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + --> +<document> + + <properties> + <title>The Xdoc format</title> + <author email="ltheussl_AT_apache_DOT_org">Lukas Theussl</author> + </properties> + + <body> + + <section name="The XDoc format"> + + <subsection name="Overview"> + + <p> + An 'xdoc' is an XML document conforming to a small and simple set of tags. + Xdoc was the primary documentation format in <a href="http://maven.apache.org/maven-1.x/">Maven 1</a>, + Maven 2 largely replaced this by <a href="apt-format.html">Apt</a>, but xdoc is still supported. + </p> + + <p> + Historically, the xdoc format can be traced back to the + <a href="http://jakarta.apache.org/site/jakarta-site2.html">Anakia</a> format, as once used by the + <a href="http://jakarta.apache.org/">Apache Jakarta</a> project. + </p> + + <p> + The Maven 1 Xdoc plugin introduced a few additions to the Anakia format, they are highlighted in the + <a href="http://maven.apache.org/maven-1.x/plugins/xdoc/reference/xdocs.html">plugin</a> documentation. + </p> + + </subsection> + + <subsection name="The XDoc format2"> + + <p> + The following is a sample XDoc document: + </p> + <source><![CDATA[ +<document> + + <properties> + <title>Page Title</title> + <author email="[EMAIL PROTECTED]">John Doe</author> + </properties> + + <!-- Optional HEAD element, which is copied as is into the XHTML <head> element --> + <head> + <meta ... /> + </head> + + <body> + + <!-- The body of the document contains a number of sections --> + <section name="section 1"> + + <!-- Within sections, any XHTML can be used --> + <p>Hi!</p> + + <!-- in addition to XHTML, any number of subsections can be within a section --> + <subsection name="subsection 1"> + <p>Subsection!</p> + </subsection> + + </section> + + <section name="other section"> + + <!-- You can also include preformatted source blocks in the document --> + <source> +code line 1 +code line 2 + </source> + + </section> + + </body> + +</document>]]></source> + + </subsection> + + <subsection name="Additional sectioning"> + + <p> + Doxia will produce <code><h2></code> and + <code><h3></code> headings for <code><section></code> + and <code><subsection></code> elements, respectively. + It is therefore perfectly valid to put some sub-headings + (<code><h4></code>, <code><h5></code>, + <code><h6></code>) inside a subsection. For instance, + </p> + + <source><![CDATA[<h4>A subsubsection</h4>]]></source> + + <p> + will produce: + </p> + + </subsection> + + <subsection name="Referencing sections and subsections"> + + <p> + The core doxia modules do <b>not</b> construct anchors from + section/subsection names. If you want to reference a section, + you have to provide an explicit anchor: + </p> + + <source><![CDATA[<a name="Section1"/> +<section name="Section"> + + <a name="SubSection1"/> + <subsection name="SubSection"> + </subsection> + +</section>]]></source> + + <p> + <b>Note</b> that this differs from previous behavior, where anchors + were constructed from section/subsection names, replacing special + characters by underscores. This behavior presents two shortcomings: + </p> + + <ul> + + <li> + If two sections or subsections have identical names + (within one source document), you will get an ambiguity when + referencing them. Also the resulting html document will not be + valid XHTML. For other output formats (eg pdf), it might even be impossible + to generate the target document. + </li> + + <li> + For long section titles, this leads to rather cumbersome anchor names. + </li> + + </ul> + + <p> + If automatic anchor generation is desired for a particular output format, + it should be implemented / overridden by the corresponding low-level Sink. + </p> + + </subsection> + + </section> + + <section name="Validation"> + + <p> + Doxia is currently not able to validate your xdoc files as no schema or DTD + exists yet (however this is planned before the 1.0 release). + It is therefore necessary to check manually whether your source files are valid xdocs, + this should ensure that the generated html files are valid + <a href="http://www.w3.org/TR/xhtml1/">XHTML1-transitional</a>. + </p> + + <p> + Here is a list of common mistakes to be aware of: + </p> + + <subsection name="Don't nest block level elements"> + + <p>Wrong:</p> + + <source><![CDATA[<p> + Here's a list: + <ul> + <li>item 1</li> + <li>item 2</li> + </ul> + of things to do. +</p>]]></source> + + <p>Correct:</p> + + <source><![CDATA[<p> + Here's a list: +</p> +<ul> + <li>item 1</li> + <li>item 2</li> +</ul> +<p> + of things to do. +</p>]]></source> + + <p> + Typical block level elements are list elements, + <code><table></code>, <code><source></code>, + <code><div></code>, <code><p></code> and + <code><pre></code>. + </p> + + </subsection> + + <subsection name="Put inline elements inside block level elements"> + + <p>Wrong:</p> + + <source><![CDATA[<section name="Downloads"> + <a href="downloads.html">Downloads</a> +</section>]]></source> + + <p>Correct:</p> + + <source><![CDATA[<section name="Downloads"> + <p> + <a href="downloads.html">Downloads</a> + </p> +</section>]]></source> + + <p> + Typical inline elements are + <code><a></code>, <code><strong></code>, + <code><code></code>, <code><font></code>, + <code><br></code> and <code><img></code>. + </p> + + </subsection> + + <subsection name="Right order of elements in <properties>"> + + <p> + The <code><title></code> element has to come before + <code><author></code>. + </p> + + </subsection> + + <subsection name="Dont put <source> inside paragraphs"> + + <p>Wrong:</p> + + <source><![CDATA[<p> + The following command executes the program: + <source>java -jar CoolApp.jar</source> +</p>]]></source> + + <p>Correct:</p> + + <source><![CDATA[<p> + The following command executes the program: +</p> +<source>java -jar CoolApp.jar</source>]]></source> + + <p> + However, you may put <code><source></code> elements inside + list items or table rows. + </p> + + </subsection> + + </section> + + </body> + +</document> Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/xdoc/references/xdoc-format.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/test/resources/site/xdoc/references/xdoc-format.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision"