blob: 890445971bf3fcfe287a1a955150a8b51794edf8 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/FML/1.0"
xsi:schemaLocation="http://maven.apache.org/FML/1.0 http://maven.apache.org/xsd/fml-1.0.xsd"
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 does not support style. If you need more control you should use
<a href="references/xdoc-format.html">xdoc</a> instead.
</p>
</answer>
</faq>
<faq id="How_to_export_in_PDF">
<question>How to export in PDF?</question>
<answer>
<p>
There are two modules available that can be used to generate pdf output: an
<a href="/doxia/doxia/doxia-modules/doxia-module-itext/">iText module</a>
that uses the
<a href="http://www.lowagie.com/iText/">iText</a> framework, and a
<a href="/doxia/doxia/doxia-modules/doxia-module-fo/">FO</a> module,
that can be used e.g. in conjunction with
<a href="http://xmlgraphics.apache.org/fop/">Apache FOP</a> to generate a pdf.
Unfortunately, the iText team has discontinued the XML to PDF functionalities, so probably
only the fo module is going to be supported in the future.
</p>
<p>
For Maven there is a <a href="/plugins/maven-pdf-plugin/">pdf plugin</a> available.
</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.
The <a href="https://svn.apache.org/repos/asf/maven/doxia/doxia-tools/trunk/doxia-book-renderer/">Doxia Book code</a>
is still limited but fully functional.
</p>
<p>
See <a href="./book/index.html">Writing Books in Doxia</a> for more information.
</p>
</answer>
</faq>
<faq id="Why_XML_based_sinks_don_t_generate_nicely_formatted_documents">
<question>Why XML based sinks don't generate nicely formatted documents?</question>
<answer>
<p>
We decided to keep pretty printing out of the core modules. So, XML based sinks like Xdoc or XHTML are
intentionally unformatted. You could always do this after the document generation or directly
by creating a specialized end-user sink (see <a href="https://issues.apache.org/jira/browse/DOXIA-255">DOXIA-255</a>).
</p>
</answer>
</faq>
<faq id="doxia-xsd">
<question>Where are the Maven Doxia XSD schemas files?</question>
<answer>
<p>
The Doxia XSD files are located here:
</p>
<dl>
<dt>Xdoc XSD 2.0</dt>
<dd><a href="/xsd/xdoc-2.0.xsd">https://maven.apache.org/xsd/xdoc-2.0.xsd</a></dd>
<dt>FML XSD 1.0.1</dt>
<dd><a href="/xsd/fml-1.0.1.xsd">https://maven.apache.org/xsd/fml-1.0.1.xsd</a></dd>
<dt>Book XSD 1.0</dt>
<dd><a href="/xsd/book-1.0.0.xsd">https://maven.apache.org/xsd/book-1.0.0.xsd</a></dd>
<dt>Document XSD 1.0.1</dt>
<dd><a href="/xsd/document-1.0.1.xsd">https://maven.apache.org/xsd/document-1.0.1.xsd</a></dd>
<dt>Decoration XSD 1.0</dt>
<dd><a href="/xsd/decoration-1.0.0.xsd">https://maven.apache.org/xsd/decoration-1.0.0.xsd</a></dd>
</dl>
<p>
Your favorite IDE probably supports XSD schema's for Xdoc and FML files. You need to
specify the following:
<source>
&lt;document xmlns="http://maven.apache.org/XDOC/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd"&gt;
...
&lt;/document&gt;</source>
<source>
&lt;faqs xmlns="http://maven.apache.org/FML/1.0.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/FML/1.0.1 http://maven.apache.org/xsd/fml-1.0.1.xsd"&gt;
...
&lt;/faqs&gt;</source>
<source>
&lt;book xmlns="http://maven.apache.org/BOOK/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/BOOK/1.0.0 http://maven.apache.org/xsd/book-1.0.0.xsd">
...
&lt;/book&gt;</source>
<source>
&lt;document xmlns="http://maven.apache.org/DOCUMENT/1.0.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DOCUMENT/1.0.1 http://maven.apache.org/xsd/document-1.0.1.xsd"
outputName="..."&gt;
...
&lt;/document&gt;</source>
<source>
&lt;project xmlns="http://maven.apache.org/DECORATION/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd"&gt;
...
&lt;/project&gt;</source>
</p>
<p>
<b>Note</b>: for performance reasons, all XSDs/DTDs use a cache in ${java.io.tmpdir}.
</p>
</answer>
</faq>
<faq id="doxia-character-entities">
<question>How to define character entities in Doxia XML files with XSD?</question>
<answer>
<p>
Since it is not possible to define character entity references (like &#x26;copy;) in XSDs (unlike DTDs), each
XML file should have a &lt;!DOCTYPE&gt; to define the character entity set.
</p>
<p>
For instance, you could add the following in your Xdoc XML files to be similar to XHTML 1.0 Transitional dtd:
<source>
&lt;!DOCTYPE document [
&lt;!-- These are the entity sets for ISO Latin 1 characters for the XHTML --&gt;
&lt;!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent"&gt;
%HTMLlat1;
&lt;!-- These are the entity sets for special characters for the XHTML --&gt;
&lt;!ENTITY % HTMLsymbol PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent"&gt;
%HTMLsymbol;
&lt;!-- These are the entity sets for symbol characters for the XHTML --&gt;
&lt;!ENTITY % HTMLspecial PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent"&gt;
%HTMLspecial;
]&gt;
&lt;document xmlns="http://maven.apache.org/XDOC/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd"&gt;
...
&lt;/document&gt;</source>
</p>
<p>
<b>Note</b>: if CDATA is used to specify entity, Doxia will replace &amp; by &amp;amp; (i.e
&quot;&lt;![CDATA[&amp;iexcl;]]&gt;&quot; becomes &quot;&amp;amp;iexcl;&quot;).
</p>
</answer>
</faq>
</part>
</faqs>