<?xml version="1.0" encoding="UTF-8" ?>

<chapter id="advanced-quanta-3-2">
<chapterinfo>
<title>Advanced Features</title>
<authorgroup>
<author>
<firstname>Christopher</firstname>
<surname>Hornbaker</surname>
<affiliation>
<address><email>chrishornbaker@earthlink.net</email></address>
</affiliation>

</author>

<!-- TRANS:ROLES_OF_TRANSLATORS -->

</authorgroup>
</chapterinfo>

<title>Advanced Features</title>

<para>
This chapter outlines the advanced features of &quantaplus; and how to use
them.
</para>

<sect1 id="xml-tools-3-2">
<title>&XML; Tools</title>

<para>
The 3.2 release of &quantaplus; brings with it many new &XML; tools and
features. The tools are unique in their integration within &quantaplus;.
All of these tools use <application>Kommander</application> as a front-end and
<application>libxml2</application> and <application>libxslt</application>
as a back-end. The combination of these makes for fast, efficient,
productive, and complete tools.
</para>

<sect2 id="kde-db-3-2">
<title>&kde; Documentation Tools</title>

<para>
&quantaplus; supports &kde;'s two main documentation tools:
<command>meinproc</command> and <command>checkXML</command>.
</para>

<sect3 id="meinproc-3-2">
<title><command>meinproc</command></title>

<para>
Anyone who has worked with &kde; documentation knows
<command>meinproc</command> and how superb it is. Well, take it up a notch
with a great graphical interface! No longer resort to a shell; just click
the icon that resembles a processor and you are done!
</para>

<variablelist>
<varlistentry>
<term><guilabel>Current Working Folder</guilabel></term>
<listitem>
<para>
This application expects an <filename>index.docbook</filename>
file to be present in a folder. If <filename>index.docbook</filename>
is in the current working folder, then simply leave <guilabel>Current Working
Folder</guilabel> checked. If it is not, then uncheck <guilabel>Current Working Folder</guilabel>
and enter the folder you wish to process in the <guilabel>Other Folder</guilabel> field.
</para>
</listitem>
</varlistentry>
</variablelist>

<note>
<para>
Outputted files are placed in the same folder as the sources files.
All &HTML; files are removed each time
<command>meinproc</command> is ran.
</para>
</note>

</sect3>

<sect3 id="checkxml-3-2">
<title><command>checkXML</command></title>

<para>
Again, anyone who has worked with &kde; documentation knows this
helpful application. Again, &quantaplus; provides a great little graphical
front-end to this one.
</para>

<variablelist>
<varlistentry>
<term><guilabel>Current Working Folder</guilabel></term>
<listitem>
<para>
If the currently opened  file is the <filename>index.docbook</filename>
file, then simply leave <guilabel>Current Working Folder</guilabel> checked.
If it is not, then uncheck <guilabel>Current Working Folder</guilabel> and
enter the folder of where <filename>index.docbook</filename> can be found.
</para>
</listitem>
</varlistentry>
</variablelist>

<note>
<title>Output</title>
<para>
If there is output, then your file is invalid. Please correct the reported
errors and try again.
</para>
</note>
</sect3>
</sect2>

<sect2 id="xmlval-3-2">
<title>&XML; Validation</title>

<para>
&quantaplus; has a great &XML; validation tool, which uses a
<command>xmllint</command> back-end.
</para>

<variablelist>
<varlistentry>
<term><guilabel>Current File</guilabel></term>
<listitem>
<para>
If the file to be validated is currently focused on in &quantaplus;, then
simply leave <guilabel>Current File</guilabel> checked. If it is not, then
uncheck <guilabel>Current File</guilabel> and select the file to be
validated from the Other File file selector.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Well-formed Checking</guilabel></term>
<listitem>
<para>
If you only wish to know only if the file is well-formed, click the
<guilabel>Well-formed Checking Only</guilabel> check box.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Definition &URI;</guilabel></term>
<listitem>
<para>
If you are using a &DTD; and it is specified within the &XML; file, then
select &DTD; (Internal) (default), else select &DTD; (External) and locate
the &DTD; with the Definition &URI; file selector. Both &W3C; &XML;
Schema and RelaxNG validation are required to be
externally defined via the <guilabel>Definition &URI;</guilabel> file selector.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>

<sect2 id="xsltproc-3-2">
<title>&XSL; Processing</title>

<para>
Yep, &quantaplus; has a &XSL; processing tool, too! This uses the
<command>xsltproc</command> tool provided with
<application>libxml2</application>.
</para>

<variablelist>
<varlistentry>
<term><guilabel>Current File</guilabel></term>
<listitem>
<para>
If the file to be processed is currently focused on in &quantaplus;, then
simply leave <guilabel>Current File</guilabel> checked. If it is not,
then uncheck <guilabel>Current File</guilabel> and select the file to be
processed from the <guilabel>Other File</guilabel> selector.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>Stylesheet</term>
<listitem>
<para>
Select the &XSL; file that you wish to be used.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Output file name</guilabel></term>
<listitem>
<para>
Enter the name of the file that you want the resulting file to be called.
File is outputed to your home folder by default.
</para>
</listitem>
</varlistentry>
</variablelist>

<note>
<para>
This application lacks flexibility. Sorry, we will do better next time.
</para>
</note>
</sect2>

</sect1>

<!-- <sect1 id="kfilereplace-3-2">
<title>KFileReplace</title>

<para>
KFileReplace is a terrific new addition to &quantaplus;. It allows one to
quickly replace strings over multiple files in only a few clicks of the
mouse. Imagine you have converted all your GIF images to PNG images
(hasn't everyone done this already?), only the extension has changed, and
you have the &lt;img /> tag scattered throughout 50 XHTML files. Are you
going to do a Find &amp; Replace on every file? Surely not when you can do
them all at the same time! This is only one of the many situations where
you will find KFileReplace a seriously helpful tool. This section will show
you how to use this wonderful feature.
</para>

<sect2 id="using-kfr-3-2">
<title>Using KFileReplace</title>

<para>
With all these wonderful features KFileReplace has, surely you are
incredibly interested in how to use it! Well, make sure your swim suit
is on tight, because we are about to dive in!
</para>

<sect3 id="start-kfr-3-2">
<title>Starting KFileReplace</title>

<para>
You will find KFileReplace in two places: &quantaplus;' main toolbar and the
menubar (Plugins -> KFileReplace). It is represented by this icon:
<inlinemediaobject>
<imageobject>
<imagedata fileref="kfr-icon.png" format="PNG" />
</imageobject>
</inlinemediaobject>.
By executing it from either location, you will be presented with the New
Search &amp; Replace Project dialog.
</para>

<mediaobject>
<imageobject>
<imagedata fileref="kfr-new-dialog.png" format="PNG" />
</imageobject>
<caption><para>KFileReplace's New Search &amp; Replace Project dialog.</para></caption>
</mediaobject>

</sect3>

<sect3 id="replace-string-kfr-3-2">
<title>Replacing Strings in Files Over Multiple Folders</title>


<para>
Your boss just gave word that:

<orderedlist numeration="arabic">
<listitem>
<para>all image formats will be PNG from now on;</para>
</listitem>
<listitem>
<para>all current images must be converted to PNG;</para>
</listitem>
<listitem>
<para>and it all needs to be done in one hour.</para>
</listitem>
</orderedlist>

<quote>One hour!?!?</quote> you think to yourself. <quote>It'll take at
least 45 minutes to convert the images!</quote> Calm down. Convert
the images, load up your project, and fire up KFileReplace. Filter for
only the file types you want to change. Press the <inlinemediaobject>
<imageobject><imagedata format="PNG" fileref="" /></imageobject>
</inlinemediaobject> and for, say GIF images, .gif for the string to
replace and .png for the replacement string.
</para>

</sect3>
</sect2>
</sect1> -->

<sect1 id="kparts-3-2">
<sect1info>
<title>Using Plugins</title>
<authorgroup>
<author>
<firstname>Mathieu</firstname>
<surname>Kooiman</surname>
<affiliation>
<address><email>quanta@map-is.nl</email></address>
</affiliation>
</author>

<!-- TRANS:ROLES_OF_TRANSLATORS -->

</authorgroup>
</sect1info>

<title>Using Plugins</title>

<sect2 id="what-is-a-plugin-3-2">
<title>What is a Plugin?</title>

<para>
&quantaplus; is able to load plugins, which are KParts. The
KPart framework is another very powerfull framework of &kde;. A KPart is a
relativly small, reusable container of functionality. It allows &kde;
developers to easily build on the work of other programmers. One
example of this is &quantaplus; itself. The editor &quantaplus; uses is
the &kate; KPart. The &kate; KPart already had a bunch of functionality that
&quantaplus; needed, like syntax highlighting. Integrating it into
&quantaplus; allowed the &quantaplus; developers to focus on what
&quantaplus; should be able to do, rather than facing the many problems
that developing a new editor KPart/component from scratch would bring.
</para>

<para>
The plugins &quantaplus; loads might have nothing to do with &quantaplus;
itself. This makes it a very powerful plugin system. You can benefit from
extra functionality and need not to wait until someone integrates it into
&quantaplus;! The plugins can be loaded into a number of &GUI; elements.
More on this below.
</para>

</sect2>

<sect2 id="plugin-dialog-3-2">
<title>Understanding the Edit Plugin Dialog</title>

<para>To install a Plugin or KPart we will work from the
<menuchoice>
<guimenu>Plugins</guimenu>
<guimenuitem>Edit</guimenuitem>
</menuchoice> menu. This will bring up the following dialog:
</para>

<mediaobject>
<imageobject>
<imagedata format="PNG" fileref="plugin-edit.png" />
</imageobject>
<caption><para>The Edit Plugin dialog.</para></caption>
</mediaobject>

<para>
This dialog lets you manage all defined plugins and lets you add new ones.
We will describe each &GUI; element in here:

<variablelist>
<varlistentry>
<term><guilabel>Search paths</guilabel></term>
<listitem>
<para>
Here you can fill in a search path. When adding a plugin without a
<guilabel>Location</guilabel>, &quantaplus; will search these paths to
find the plugin.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Add</guilabel></term>
<listitem>
<para>
This will bring up a dialog which allows you to add a new plugin.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Configure</guilabel></term>
<listitem>
<para>
This will allow you to change the settings of a particular plugin.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Remove</guilabel></term>
<listitem>
<para>
Removes the currently selected plugin.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Refresh</guilabel></term>
<listitem>
<para>
Refreshes the dialog's contents.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</sect2>
</sect1>

<!--<sect1 id="cvs-3-2">
<title>Using CVS</title>

<para>
&quantaplus; uses Cervisia for CVS. Explain its usage within &quantaplus;.
</para>
</sect1> -->

&debugging-quanta;
</chapter>
