~ubuntu-branches/ubuntu/maverick/conglomerate/maverick

« back to all changes in this revision

Viewing changes to doc/C/faq.xml.qna

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2005-11-08 05:07:06 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051108050706-bcg60nwqf1z3w0d6
Tags: 0.9.1-1ubuntu1
* Resynchronise with Debian (Closes: #4397).
  - Thanks, Jordan Mantha.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
 
3
    "http://www.docbook.org/xml/4.1.2/docbookx.dtd">
 
4
 
 
5
<article>
 
6
        <title>Conglomerate FAQ</title>
 
7
        <para>This is a list of frequently asked questions for the Conglomerate XML editor.</para>
 
8
        <qandaset>
 
9
                <qandadiv id="generalfaq">
 
10
                        <title>General questions</title>
 
11
                        <qandaentry>
 
12
                                <question>
 
13
                                        <para>Why not just use XXX xml editor?</para>
 
14
                                </question>
 
15
                                <answer>
 
16
                                        <para>Conglomerate is usable for editing all XML documents but it is not always the ideal editor. Conglomerate really comes into its own when dealing with documents which are content based rather than attribute based. Therefore it is much better for editing documents types traditionally handled in word processors rather than configuration files which require a more traditional tree structure. </para>
 
17
                                </answer>
 
18
                        </qandaentry>
 
19
                </qandadiv>
 
20
                <qandadiv id="docfaq">
 
21
                        <title>Document questions</title>
 
22
                        <qandaentry>
 
23
                                <question>
 
24
                                        <para>Can Conglomerate edit an XML document of type XXX?</para>
 
25
                                </question>
 
26
                                <answer>
 
27
                                        <para>Yes, conglomerate will allow you to edit any &quot;well-formed&quot; XML document. Although having a &quot;Display Specification&quot; for the document will make it better. </para>
 
28
                                </answer>
 
29
                        </qandaentry>
 
30
                        <qandaentry>
 
31
                                <question>
 
32
                                        <para>What specific XML document types does Conglomerate support?</para>
 
33
                                </question>
 
34
                                <answer>
 
35
                                        <para>In theory, Conglomerate can load and save any well-formed XML document, but it is much happier if it can find a Display Specification for the document type. The following document types are currently supported:</para>
 
36
                                        <itemizedlist>
 
37
                                                <listitem>
 
38
                                                        <para>DocBook 4.1.2</para>
 
39
                                                </listitem>
 
40
                                                <listitem>
 
41
                                                        <para>XHTML (strict)</para>
 
42
                                                </listitem>
 
43
                                                <listitem>
 
44
                                                        <para>&quot;Kernel Traffic&quot; newsetter format</para>
 
45
                                                </listitem>
 
46
                                        </itemizedlist>
 
47
                                        <para>The following document types are partially supported:</para>
 
48
                                        <itemizedlist>
 
49
                                                <listitem>
 
50
                                                        <para>RELAX NG schema files</para>
 
51
                                                </listitem>
 
52
                                                <listitem>
 
53
                                                        <para>XSL-FO files</para>
 
54
                                                </listitem>
 
55
                                        </itemizedlist>
 
56
                                        <para>The following document types are unsupported, though we hope to add support in the future (patches welcome!):</para>
 
57
                                        <itemizedlist>
 
58
                                                <listitem>
 
59
                                                        <para>CSS</para>
 
60
                                                </listitem>
 
61
                                                <listitem>
 
62
                                                        <para>OpenOffice.org file format</para>
 
63
                                                </listitem>
 
64
                                                <listitem>
 
65
                                                        <para>Open eBook format</para>
 
66
                                                </listitem>
 
67
                                                <listitem>
 
68
                                                        <para>TEI format</para>
 
69
                                                </listitem>
 
70
                                        </itemizedlist>
 
71
                                </answer>
 
72
                        </qandaentry>
 
73
                        <qandaentry>
 
74
                                <question>
 
75
                                        <para>Can Conglomerate edit non-XML documents?</para>
 
76
                                </question>
 
77
                                <answer>
 
78
                                        <para>Yes and no. You can edit non XML documents but only if the appropriate document plugin is present. The internals of conglomerate are designed to work with XML documents so to allow a non XML document to be handled it requires a plugin to convert the document to XML and back again. </para>
 
79
                                </answer>
 
80
                        </qandaentry>
 
81
                        <qandaentry>
 
82
                                <question>
 
83
                                        <para>What is a &quot;Display Specification&quot;?</para>
 
84
                                </question>
 
85
                                <answer>
 
86
                                        <para>A display specification is an XML document used by Conglomerate to hold information about how Conglomerate should display a document and how elements are to be edited. </para>
 
87
                                        <para>It is designed to work alongside DTDs or XSchema files to provide information which is more specific to Conglomerate. For example, it can suggest icons that should be used for a particular XML tag. </para>
 
88
                                        <para>The Conglomerate website has a <ulink url="http://www.conglomerate.org/xds/index.html">list of display specifications</ulink>. This list is generated from a recent version of the data in CVS.</para>
 
89
                                </answer>
 
90
                        </qandaentry>
 
91
                        <qandaentry>
 
92
                                <question>
 
93
                                        <para>How do I add support for a new type of document to Conglomerate?</para>
 
94
                                </question>
 
95
                                <answer>
 
96
                                        <para>You will need to create a display specification to tell how to display the various elements of that type. </para>
 
97
                                        <para>The easiest way to do this is to let Conglomerate create the display specification itself. Load an example document of the type you wish to support, ideally one with a Document Type Declaration referencing a PUBLIC ID with a SYSTEM ID referencing the document type definition via http .</para>
 
98
                                        <para>Conglomerate will complain that it doesn't recognise the document type, and ask if you wish to load it anyway. Click on the <guibutton>Force</guibutton> button, and Conglomerate will generate a display specification as it loads the file. You can then go to the <guimenu>Tools</guimenu> menu and select <guimenuitem>Dump Display Spec</guimenuitem>. You should save the file into the <filename>examples</filename> subdirectory, giving it a &quot;.xds&quot; extension. You should then edit <filename>examples/Makefile.am</filename> and add the filename of the new display specification to <symbol>dispspec_DATA</symbol>. You should then re-run <userinput>make</userinput>, then (possibly as root) <userinput>make install</userinput>, and restart <application>conglomerate</application>. Try loading your document; Conglomerate should now handle it without complaining. Please email the conglomerate-devel mailing list with a patch that adds the document type, so that we can add it to CVS, and into the next release.</para>
 
99
                                        <para>Once you have a working xds file for a document type, you can fine-tune it in some of these ways:</para>
 
100
                                        <itemizedlist>
 
101
                                                <listitem>
 
102
                                                        <para>Change whether elements are &quot;structural&quot; or &quot;span&quot; elements. The display specification generation routine tries to guess this based upon the example document and on the DTD, but it sometimes makes mistakes.</para>
 
103
                                                </listitem>
 
104
                                                <listitem>
 
105
                                                        <para>Set up human-readable names for elements, together with descriptions of what they do. Currently this is in English only, though we plan to allow localisable versions of these strings (patches welcome!)</para>
 
106
                                                </listitem>
 
107
                                                <listitem>
 
108
                                                        <para>Set up icons for elements, for use in the menus and in the main widget.</para>
 
109
                                                </listitem>
 
110
                                                <listitem>
 
111
                                                        <para>Write custom XPath rules for generating the title string to be used for an element.</para>
 
112
                                                </listitem>
 
113
                                                <listitem>
 
114
                                                        <para>Use plugins to better represent an element. For example, there are already plugins aimed at rendering paragraphs, and items within lists. You can even create custom property dialogs for an element type, those this requires writing some code.</para>
 
115
                                                </listitem>
 
116
                                        </itemizedlist>
 
117
                                        <para>The best thing to do is to look through the <filename>examples/docbook.xds</filename> file, which has examples of how to do these things, and to ask on the conglomerate-devel mailing list.</para>
 
118
                                </answer>
 
119
                        </qandaentry>
 
120
                        <qandaentry>
 
121
                                <question>
 
122
                                        <para>What custom element renderers already exist?</para>
 
123
                                </question>
 
124
                                <answer>
 
125
                                        <itemizedlist>
 
126
                                                <listitem>
 
127
                                                        <formalpara>
 
128
                                                                <title><literal>paragraph</literal></title>
 
129
                                                                <para>This is used by the DocBook <sgmltag>para</sgmltag> element and should be used by any other document type to represent a typical paragraph-level element. Currently it renders itself as a dashed rectangle surrounding the element's content. We might add a &quot;pilcrow&quot; symbol (a little q) as an extra refinement at some point.</para>
 
130
                                                        </formalpara>
 
131
                                                </listitem>
 
132
                                                <listitem>
 
133
                                                        <formalpara>
 
134
                                                                <title><literal>admonition</literal></title>
 
135
                                                                <para>This is used by DocBook's admonition elements: <sgmltag>note</sgmltag>, <sgmltag>tip</sgmltag>, <sgmltag>caution</sgmltag> etc. It renders itself as an icon on the left, with the element's content presented in an indented form to the right. It could be used by any other element that would be well-presented as a icon labelling the content. The key-value pair &quot;icon&quot; should be used to specify which icon to use for each particular element.</para>
 
136
                                                        </formalpara>
 
137
                                                </listitem>
 
138
                                                <listitem>
 
139
                                                        <formalpara>
 
140
                                                                <title><literal>listitem</literal></title>
 
141
                                                                <para>This is used by DocBook's <sgmltag>listitem</sgmltag> element. It renders itself as a textual label, with the content indented on the right-hand side. Currently the code has hardcoded logic that generates the label according to DocBook's semantics; it looks to see if its inside an <sgmltag>orderedlist</sgmltag> or an <sgmltag>itemizedlist</sgmltag>, and what position it occupies in that list etc to generate either a bullet or a numbering. This could be generalised if people want to reuse the code for other DTDs.</para>
 
142
                                                        </formalpara>
 
143
                                                </listitem>
 
144
                                        </itemizedlist>
 
145
                                </answer>
 
146
                        </qandaentry>
 
147
                        <qandaentry>
 
148
                                <question>
 
149
                                        <para>How do I set up a custom element renderer inside an xds file?</para>
 
150
                                </question>
 
151
                                <answer>
 
152
                                        <para>The xds file should use the value &quot;<literal>plugin</literal>&quot; for the element's &quot;<literal>type</literal>&quot; attribute. The element will need to have an additional attribute &quot;<literal>service-id</literal>&quot;, which should have a value corresponding to the string ID that the service is registered with inside the plugin. </para>
 
153
                                        <para>This affects how elements of that type are rendered in the main editor widget. For other purposes (such as XML Source cleanup, handling the Overview sidebar, etc), such elements are, in general, treated like structural elements (as opposed to span ones).</para>
 
154
                                        <para>Some plugin element types need additional information in the xds file; this is done by having a <sgmltag>key-value-list</sgmltag> element below the <sgmltag>element</sgmltag> element; the <sgmltag>key-value-list</sgmltag> should contain <sgmltag>key-value-pair</sgmltag> elements. Each <sgmltag>key-value-pair</sgmltag> element should contain a &quot;<literal>key</literal>&quot; and &quot;<literal>value</literal>&quot; attribute. See DocBook's <sgmltag>caution</sgmltag> element for an example.</para>
 
155
                                </answer>
 
156
                        </qandaentry>
 
157
                        <qandaentry>
 
158
                                <question>
 
159
                                        <para>How do I customise the Property dialog for an element within my DTD?</para>
 
160
                                </question>
 
161
                                <answer>
 
162
                                        <para>You can improve support for a DTD by creating a plugin node property dialog. To do this, edit the xds file for the document type, and add a <sgmltag>property-dialog</sgmltag> element inside the main <sgmltag>element</sgmltag>, with a &quot;<literal>service-id</literal>&quot; attribute giving the registered ID of the code providing the GtkWidget for elements of that type.</para>
 
163
                                        <para>FIXME: write information on how to actually create the plugin</para>
 
164
                                        <para>For example for the DocBook <sgmltag>orderedlist</sgmltag> element; the xds file gives an ID of &quot;<literal>docbook-orderedlist-properties</literal>&quot;. This is hooked up in the source code in <filename>src/plugin-docbook.c</filename> to a routine (the C function &quot;<function>docbook_orderedlist_properties_factory_method</function>&quot;) which loads a GUI from a Glade file, and uses a set of utility functions that bind the widgets in the glade file to attributes of the XML element. For example, the radio buttons are linked to the various valid values of the &quot;<literal>numeration</literal>&quot; attribute.</para>
 
165
                                </answer>
 
166
                        </qandaentry>
 
167
                </qandadiv>
 
168
                <qandadiv id="gnomefaq">
 
169
                        <title>Gnome questions</title>
 
170
                        <qandaentry>
 
171
                                <question>
 
172
                                        <para>I use the KDE desktop. Do I have to install Gnome instead, to be able to run Conglomerate?</para>
 
173
                                </question>
 
174
                                <answer>
 
175
                                        <para>No. Conglomerate will run perfectly well under KDE, provided you have installed all Gnome 2 shared libraries neccessary for Conglomerate to run.</para>
 
176
                                </answer>
 
177
                        </qandaentry>
 
178
                </qandadiv>
 
179
                <qandadiv id="building">
 
180
                        <title>Building Conglomerate</title>
 
181
                        <qandaentry>
 
182
                                <question>
 
183
                                        <para>How do I build Conglomerate from CVS?</para>
 
184
                                </question>
 
185
                                <answer>
 
186
                                        <para>The latest version of Conglomerate is stored on GNOME's CVS server as module <filename>conglomerate</filename>. Detailed instructions for doing this can be found <ulink url="http://developer.gnome.org/tools/cvs.html">here</ulink>. </para>
 
187
                                        <para>You'll need Gnome 2.0 installed (or a more recent version) to build on top of. You will also need the <filename>gnome-common</filename>module from GNOME CVS. </para>
 
188
                                        <para>Bear in mind that you will be playing with the raw code that the developers use, and it might be temporarily broken. Also, there can be a delay of anything up to 24 hours between the time changes happen on the main CVS server and the time they appear on the anonymous CVS server.</para>
 
189
                                        <para>The CVS tree can be browsed <ulink url="http://cvs.gnome.org/bonsai/rview.cgi?dir=conglomerate&amp;amp;cvsroot=/cvs/gnome&amp;amp;module=default">here</ulink>.</para>
 
190
                                </answer>
 
191
                        </qandaentry>
 
192
                </qandadiv>
 
193
        </qandaset>
 
194
</article>