diff --git a/pom.xml b/pom.xml
index 56474753..d66f0547 100644
--- a/pom.xml
+++ b/pom.xml
@@ -81,6 +81,7 @@
truetemplates/**
+ data/**
@@ -88,6 +89,7 @@
falsetemplates/**
+ data/**
diff --git a/src/main/xar-resources/data/author-reference/author-reference.xml b/src/main/xar-resources/data/author-reference/author-reference.xml
index d4aef598..afd55327 100644
--- a/src/main/xar-resources/data/author-reference/author-reference.xml
+++ b/src/main/xar-resources/data/author-reference/author-reference.xml
@@ -7,14 +7,16 @@
January 2018authoring
+ exist
- This article describes the conventions for writing articles for the eXist-db documentation set. The eXist-db documentation set is (since
- beginning 2018) based on a subset of the Docbook 5 content model. If you want to contribute an article (please do) it must conform to the
- standards described here.
+ This article describes the conventions for writing articles for the eXist-db documentation
+ set. The eXist-db documentation set is (since beginning 2018) based on a subset of the Docbook 5
+ content model. If you want to contribute an article (please do) it must conform to the standards
+ described here.
@@ -24,23 +26,123 @@
Here are some general writing (and tagging) guidelines:
- Please start of with a short introduction of your article in one or a few paragraphs before diving in. These paragraphs must be placed
- before the first sect1.
- Describe what the article is about and for whom. What is the subject? Is it for total novices, beginners, advanced programming gurus in
- Java hyperspace? Prevent readers from diving in and find out that it's not for them.
+ Please start of with a short introduction of your article in one or a few paragraphs
+ before diving in. These paragraphs must be placed before the first
+ sect1.
+ Describe what the article is about and for whom. What is the subject? Is it for total
+ novices, beginners, advanced programming gurus in Java hyperspace? Prevent readers from
+ diving in and find out that it's not for them.
- Presenting longer listings can best be done by storing these in separate documents and linking them (see ).
- This makes maintenance easier (ever edited a large CDATA section with XML inside?).
- An additional reason is that somewhere in the future we intend to enable running code-examples directly from the documentation app. For
- this these examples must be in separate documents. So make sure that at least runnable examples are separated from your text.
+ Presenting longer listings can best be done by storing these in separate documents and
+ linking them (see ). This makes maintenance easier (ever edited
+ a large CDATA section with XML inside?).
+ An additional reason is that somewhere in the future we intend to enable running
+ code-examples directly from the documentation app. For this these examples must be in
+ separate documents. So make sure that at least runnable examples are separated from your
+ text.
- Of course all the normal technical writing guidelines apply: Keep your target group in mind (what do they know and, more importantly,
- what not), write correct English, use plenty of examples, split the article in sections and sub-sections that make sense, etc.
+ Of course all the normal technical writing guidelines apply: Keep your target group in
+ mind (what do they know and, more importantly, what not), write correct English, use
+ plenty of examples, split the article in sections and sub-sections that make sense,
+ etc.
+
+ Patterns to avoid
+
+ The following patterns tend to occur again and again in writing documentation. Please
+ try to avoid them…
+ The examples are probably a bit exaggerated, but that's for illustration purposes, not
+ to offend anyone.
+
+
+ Avoid the difficult and explain the easy
+
+ It is very tempting to skip quickly over some hard parts of the documentation and
+ instead describe some of the easy parts in length. For instance:
+
+
+ To configure the xyz extension you have to create an XML
+ configuration file. Here is an example:
+ (some skimpy example of a complicated configuration file that is supposed to speak for itself
+but does not because its too simple)
+ To work with the user interface open this, click here, enter the password twice,
+ click ok, bla bla bla, going on for multiple paragraphs…
+
+
+ Well, your reader isn't stupid and hasn't seen a GUI for the first time. So telling
+ him/her that a password needs to be entered twice and that ok must be clicked is
+ completely superfluous. Just point your reader to the GUI and maybe to the right menu but
+ that's all. Believe me, they know how to fill in a dialog box.
+ But they do not know what all these elements and attributes in the configuration file
+ mean. Even if the names speak for themselves, some explanation will be necessary. Best to
+ describe them all, mention defaults, examples, etc.
+ And yes, that's hard work, both in thinking and writing. But if you want your xyz
+ extension to be used and useful (that's what you wrote it for, right?) its part of the
+ job.
+
+
+
+ Being overly polite
+
+ Sometimes writers try to be very polite to both the reader and, strangely enough, the system. Since
+ the reader wants it clear and you can't offend a system, don't.
+
+
+ Table title
+
+
+
+
+
+ Polite version
+ Straight version
+
+
+
+
+
+ The logfile should appear.
+
+
+ The logfile appears.
+
+
+
+
+ You may enter ...
+
+
+ Enter ...
+
+
+
+
+ If you wish you can also...
+
+
+ It is also possible to ...
+ Also: ...
+
+
+
+
+ Please navigate to...
+
+
+ Navigate to ...
+
+
+
+
+
+
+
+
+
@@ -49,8 +151,7 @@
Technical guidelines
- More information about Docbook itself can be found on the official Docbook
- site.
+ More information about Docbook itself can be found on the official Docbook site.
@@ -58,30 +159,38 @@
Collection (directory) structure
- A single article must be stored in a collection on its own, the article-collection. Any related assets or other
- files will be stored in sub-collections of this. This setup ensures that everything belonging to a single article stays together.
+ A single article must be stored in a collection on its own, the
+ article-collection. Any related assets or other files will be
+ stored in sub-collections of this. This setup ensures that everything belonging to a
+ single article stays together.
- In the eXist documentation app, the article-collection will become a sub-collection of the data collection. So an
- article-collection called new-cool-feature will become /db/apps/doc/data/new-cool-feature.
+ In the eXist documentation app, the article-collection will become a sub-collection
+ of the data collection. So an article-collection called
+ new-cool-feature will become
+ /db/apps/doc/data/new-cool-feature.
- The name of the article-collection should be the same as the document-name of the article itself. So if your article is called
- new-cool-feature.xml, store it as new-cool-feature/new-cool-feature.xml.
+ The name of the article-collection should be the same as the document-name of the
+ article itself. So if your article is called new-cool-feature.xml, store it
+ as new-cool-feature/new-cool-feature.xml.
- Any binary assets (images, etc.) referenced by your article must be stored in a sub-collection assets. So in our example
- in new-cool-feature/assets.
+ Any binary assets (images, etc.) referenced by your article must be stored in a
+ sub-collection assets. So in our example in
+ new-cool-feature/assets.
- Any non-binary assets (usually included program/text listings) referenced by your article must be stored in a sub-collection
- listings. So in our example in new-cool-feature/listings.
+ Any non-binary assets (usually included program/text listings) referenced by your
+ article must be stored in a sub-collection listings. So in our example in
+ new-cool-feature/listings.
- All rules regarding collection names are not there for technical reasons but to promote consistency. If you deviate and make sure all
- references are correct it will still work. However, to keep things maintainable it is strongly recommended to follow the rules stated above
- (or, if you really think they're stupid, apply for a rule change).
+ All rules regarding collection names are not there for technical reasons but to
+ promote consistency. If you deviate and make sure all references are correct it will still
+ work. However, to keep things maintainable it is strongly recommended to follow the rules
+ stated above (or, if you really think they're stupid, apply for a rule change).
@@ -91,8 +200,8 @@
Overall XML structureHere is an example how an article for this documentation set looks like:
- Both the processing instructions at the top are optional. They're present to guide tools like oXygen in validating the document and
- provide authoring hints.
+ Both the processing instructions at the top are optional. They're present to guide tools
+ like oXygen in validating the document and provide authoring hints.
@@ -104,19 +213,23 @@
The following rules and guidelines apply:
- There must be a title present in a title element. This is the main title of the document. It will be displayed at the top
- of the page.
+ There must be a title present in a title element. This is the main title
+ of the document. It will be displayed at the top of the page.
- Optional but strongly recommended is a date in the date element. This will be displayed below the title and provide the
- reader with some clue on how old this information is. We all know that sometimes articles get outdated but are not removed... You don't
- have to provide an exact date. Just month and year will do, or some indication like 1Q18.
+ Optional but strongly recommended is a date in the date element. This
+ will be displayed below the title and provide the reader with some clue on how old this
+ information is. We all know that sometimes articles get outdated but are not removed...
+ You don't have to provide an exact date. Just month and year will do, or some indication
+ like 1Q18.
- We use keywords to mark an article for certain subject areas, OS-s, programming languages, etc. See .
+ We use keywords to mark an article for certain subject areas, OS-s, programming
+ languages, etc. See .
- You can add more information in info to your heart's desire but the renderer won't use nor display it.
+ You can add more information in info to your heart's desire but the
+ renderer won't use nor display it.
@@ -132,8 +245,9 @@
Supported block elements
- The following Docbook 5 block level elements are supported for the eXist-db documentation set. Unsupported elements will be flagged when
- the content is rendered (you'll see a bold red error message in the middle of your story).
+ The following Docbook 5 block level elements are supported for the eXist-db
+ documentation set. Unsupported elements will be flagged when the content is rendered (you'll
+ see a bold red error message in the middle of your story).
@@ -147,24 +261,28 @@
Section levels
- You can use sect1 up to sect3 as section levels. Only sect1 and sect2 will appear in the
- table of contents. Markup in titles is ignored.
+ You can use sect1 up to sect3 as section levels. Only
+ sect1 and sect2 will appear in the table of contents. Markup
+ in titles is ignored.Lists
- You can use either itemizedlist (with bullets) or orderedlist (with numbers).
+ You can use either itemizedlist (with bullets) or
+ orderedlist (with numbers).Variable list
- A variablelist is a bit of a misnomer. It creates lists like this one (the list of block elements you're looking at now),
- so it's useful for much more than variables.
- If you want a narrow left column (like this one), add spacing="compact".
+ A variablelist is a bit of a misnomer. It creates lists like this one
+ (the list of block elements you're looking at now), so it's useful for much more than
+ variables.
+ If you want a narrow left column (like this one), add
+ spacing="compact".
@@ -173,7 +291,8 @@
About notes
- The note element creates a noticeable layout like this. The title is optional.
+ The note element creates a noticeable layout like this. The title is
+ optional.
@@ -182,8 +301,9 @@
Warnings
- Both the warning and important element produce a layout like this. The only difference is the text of the
- header. You can optionally add a title.
+ Both the warning and important element produce a layout
+ like this. The only difference is the text of the header. You can optionally add a
+ title.
@@ -193,8 +313,8 @@
An example of an example
- The example element produces an example in a layout like this. It must have a title element, which is
- displayed at the bottom:
+ The example element produces an example in a layout like this. It
+ must have a title element, which is displayed at the bottom:
@@ -202,30 +322,39 @@
Listings
- Anything you want to present as a program listing or other fixed text (e.g. a sequence of commands) must be enclosed in a
- programlisting element. There are two ways to provide the actual contents of the listing:
+ Anything you want to present as a program listing or other fixed text (e.g. a
+ sequence of commands) must be enclosed in a programlisting element. There
+ are two ways to provide the actual contents of the listing:
- Simply enclose the text in the programlisting element. Use CDATA if necessary. Any markup will be ignored.
+ Simply enclose the text in the programlisting element. Use CDATA if
+ necessary. Any markup will be ignored.
- Add an xlink:href attribute (xmlns:xlink="http://www.w3.org/1999/xlink") with a reference to a file
- containing the text. This must be a relative reference (e.g. xlink:href="listings/mylisting.txt").
- The contents of the element will be ignored.
- Using the xlink:href attribute is definitely not the proper way to do this. It should be done
- by using an xi:include element inside programlisting. However, current XInclude limitations in eXist prevent
- this from working properly (it can only include XML, not text). So therefore this workaround.
+ Add an xlink:href attribute
+ (xmlns:xlink="http://www.w3.org/1999/xlink") with a reference to a
+ file containing the text. This must be a relative reference
+ (e.g. xlink:href="listings/mylisting.txt"). The contents of the
+ element will be ignored.
+ Using the xlink:href attribute is definitely
+ not the proper way to do this. It should be done by using
+ an xi:include element inside programlisting. However,
+ current XInclude limitations in eXist prevent this from working properly (it can
+ only include XML, not text). So therefore this workaround.Listings have two display modes:
- If it's a listing in some language (like XML), add a language attribute with the name of the language. The render
- will try to add some color coding (if it recognizes it). Here is a listing with language="xml":
+ If it's a listing in some language (like XML), add a language
+ attribute with the name of the language. The render will try to add some color
+ coding (if it recognizes it). Here is a listing with
+ language="xml":
- For a straight listing, don't add a language attribute. Here is the same listing as above without:
+ For a straight listing, don't add a language attribute. Here is
+ the same listing as above without:
@@ -235,8 +364,9 @@
Figures
- Use figure or informalfigure to add an asset. The effect of both elements is almost the same, the only
- difference is that an informal figure has no title. Docbook prescribes an elaborate XML construction, here is an example:
+ Use figure or informalfigure to add an asset. The effect of
+ both elements is almost the same, the only difference is that an informal figure has
+ no title. Docbook prescribes an elaborate XML construction, here is an example:This produces:
@@ -247,16 +377,19 @@
- The width attribute is the only size-related attribute used. It sets the width relative to the available horizontal
- space. If you don't specify a width a default of 75% is used.
+ The width attribute is the only size-related attribute used. It sets
+ the width relative to the available horizontal space. If you don't specify a width a
+ default of 75% is used.Tables
- Use table or informaltable to add a table. The effect of both elements is almost the same, the only difference
- is that an informal table has no title. Table layout is kept simple and straight. Here is how a simple table looks like:
+ Use table or informaltable to add a table. The effect of
+ both elements is almost the same, the only difference is that an informal table has no
+ title. Table layout is kept simple and straight. Here is how a simple table looks
+ like:And this is the result:
@@ -303,7 +436,8 @@
Supported inline elementsThe following inline elements are supported:
- Inline elements in title elements are not supported. Any markup in titles is ignored.
+ Inline elements in title elements are not supported.
+ Any markup in titles is ignored.
@@ -315,14 +449,17 @@
Although discouraged, you can request a specific emphasis type:
- Use role="bold" for bold emphasis.
+ Use role="bold" for bold
+ emphasis.
- Use role="underline" for underlined emphasis.
+ Use role="underline" for underlined
+ emphasis.
- Use role="italic" for italic emphasis. This looks the same as no
- role attribute but produces an i instead of an em.
+ Use role="italic" for italic
+ emphasis. This looks the same as no role attribute but
+ produces an i instead of an em.
@@ -331,34 +468,37 @@
GUI Items
- Use guimenuitem around anything referring to choices in a GUI, for instance menu choices. The
- effect is now simple italic but that might be changed later.
+ Use guimenuitem around anything referring to choices in a GUI, for
+ instance menu choices. The effect is now simple italic but
+ that might be changed later.Code
- Use code or literal for literals, pieces of code, commands, etc. The result will be
- mono-spaced.
- The general guideline is to use this for everything that lists pieces of code, attributes, variable names, etc. For elements use
- tag.
+ Use code or literal for literals, pieces of code, commands,
+ etc. The result will be mono-spaced.
+ The general guideline is to use this for everything that lists pieces of code,
+ attributes, variable names, etc. For elements use tag.Tags
- A tag element surrounds its content with < and > and formats it like code. Meant to make life easier:
- xxx]]> is the shorter version of <xxx>]]>.
+ A tag element surrounds its content with < and > and formats it
+ like code. Meant to make life easier: xxx]]> is the
+ shorter version of <xxx>]]>.Figures
- Use the inlinemediaobject to add an asset inline in the text. Docbook prescribes an elaborate XML construction, here is
- an example of a paragraph with an inline figure:
+ Use the inlinemediaobject to add an asset inline in the text. Docbook
+ prescribes an elaborate XML construction, here is an example of a paragraph with an
+ inline figure:This produces:There is an asset
@@ -366,26 +506,31 @@
here.
- The width attribute is the only size-related attribute recognized and used.
+ The width attribute is the only size-related attribute recognized and
+ used.Internal links
- You can create a link to any block level element with the xref element. To do so, give the target an identifier by using
- xml:id="..." and mention this identifier in the linkend attribute of the xref.
- You can generate a specific link text by adding an xreflabel attribute to the target element, like
- here: . If this attribute is not present on the target its title is used, like this: . If there is no title, the name of the element is presented.
+ You can create a link to any block level element with the xref element.
+ To do so, give the target an identifier by using xml:id="..." and mention
+ this identifier in the linkend attribute of the xref.
+ You can generate a specific link text by adding an xreflabel
+ attribute to the target element, like here: . If this attribute is not present on the target its
+ title is used, like this: . If there is no title,
+ the name of the element is presented.External links
- Links to external sources are done with the link element. Place the target's full URI in the xlink:href
- attribute. For instance, ]]> links to the
- eXist home page.
+ Links to external sources are done with the link element. Place the
+ target's full URI in the xlink:href attribute. For instance,
+ ]]>
+ links to the eXist home page.To open the link on a new page, add condition="_blank".
@@ -393,10 +538,10 @@
Article links
- To create a link to another article in this documentation set, also use the link element. However, use the target's
- document name (without the .xml extension) as the link address. For instance,
- ]]> links to the documentation home
- page.
+ To create a link to another article in this documentation set, also use the
+ link element. However, use the target's document name (without the
+ .xml extension) as the link address. For instance,
+ ]]> links to the documentation home page.
@@ -409,27 +554,29 @@
Generating indexes
- Indexes can be automagicly generated. For examples have a look at the documentation home page.
- There are three variations:
+ Indexes can be automagicly generated. For examples have a look at the documentation home page. There are three
+ variations:Alphabetical index on title
- Add a role="indexontitle" attribute to a para element. An index on title will be generated after it.
+ Add a role="indexontitle" attribute to a para element. An
+ index on title will be generated after it.Index on keyword, all
- Add a role="indexonkeyword" attribute to a para element. An index on keywords (as specified in the
- info element, see ) will be generated after it.
+ Add a role="indexonkeyword" attribute to a para element.
+ An index on keywords (as specified in the info element, see ) will be generated after it.Index on keyword, single
- Add a role="indexonkeyword:somekeyword" attribute to a para element to generate a list of articles with this
- specific keyword (as specified in the info element, see ).
+ Add a role="indexonkeyword:somekeyword" attribute to a
+ para element to generate a list of articles with this specific keyword
+ (as specified in the info element, see ).
diff --git a/src/main/xar-resources/data/beginners-guide-to-xrx-v4/beginners-guide-to-xrx-v4.xml b/src/main/xar-resources/data/beginners-guide-to-xrx-v4/beginners-guide-to-xrx-v4.xml
index 166771bc..9ac3357f 100644
--- a/src/main/xar-resources/data/beginners-guide-to-xrx-v4/beginners-guide-to-xrx-v4.xml
+++ b/src/main/xar-resources/data/beginners-guide-to-xrx-v4/beginners-guide-to-xrx-v4.xml
@@ -67,9 +67,7 @@
have eXist
running on your local system. By default eXist runs on
port 8080 so that when you set your web
- browser to http://localhost:8080/exist/ you should see
+ browser to http://localhost:8080/exist/ you should see
the eXist homepage come up.
You can also run this tutorial on a remote eXist server. If you
are doing this, you must replace the server name
@@ -120,9 +118,7 @@
XRX is the name of the web
application architecture that we are introducing in this guide.
The term XRX comes from the combination of XForms, REST, and
- XQuery. The term was coined by Dan McCreary. XForms are used in the
+ XQuery. The term was coined by Dan McCreary. XForms are used in the
client (web browser), REST is the interface between the client
and the server, and XQuery is the server language. Two of the
most significant advantages of XRX over other architectures are:
@@ -174,9 +170,7 @@
SOAP interface testing tools are required. All you need to test
your web services is a web browser. For example, the home page
of the test application under the default configuration will be
- http://localhost:8080/exist/apps/term/index.html.
+ http://localhost:8080/exist/apps/term/index.html.
Several additional terms and concepts are helpful in understanding the XRX approach:WebDAV is a protocol for transferring files, and we use eXist's WebDAV interface to move files to and from
@@ -210,8 +204,7 @@
Apps: XRX applications
- should be stored within the /db/apps parent collection.
+ should be stored within the /db/apps parent collection.
@@ -277,9 +270,7 @@
has created a specification for application metadata, called
EXPath Packaging System. eXist supports and extends this
module. This tutorial will not cover this file's structure,
- but you can learn more about this by reading .
+ but you can learn more about this by reading .
You are always free to change the names of the collection or the
@@ -446,9 +437,7 @@
publish-status-code. (By using the repo.xml Deployment
Descriptor's "prepare" field, you can automate the installation
of this collection.xconf file into the target location; see
- .)
+ .)
@@ -648,9 +637,7 @@
The last control is the xf:select1 control that
allows the user to select one value from a list of values. (For
a complete discussion of the XForms controls we suggest you use
- the XForms Wikibook at http://en.wikibooks.org/wiki/XForms. The Input Form
+ the XForms Wikibook at http://en.wikibooks.org/wiki/XForms. The Input Form
Controls section goes through each of the controls in the XForms
specification. In addition to the standard controls there are
other controls that can also be integrated directly into XForms,
@@ -778,9 +765,7 @@
reduce duplication and then reference these functions in
each of your queries. For example, you could put the HTML
boilerplate into a style module. You could also explore
- eXist's HTML templating module; see .
+ eXist's HTML templating module; see .
Change the list-items.xq to use HTML tables to view each item.
@@ -832,9 +817,7 @@
Modify the collection configuration file for the
/db/apps/terms/data collection to enable
- versioning when items are updated. See .
+ versioning when items are updated. See .
diff --git a/src/main/xar-resources/data/beginners-guide-to-xrx-v4/listings/listing-13.xml b/src/main/xar-resources/data/beginners-guide-to-xrx-v4/listings/listing-13.xml
index 83ff4aa5..00b290d1 100644
--- a/src/main/xar-resources/data/beginners-guide-to-xrx-v4/listings/listing-13.xml
+++ b/src/main/xar-resources/data/beginners-guide-to-xrx-v4/listings/listing-13.xml
@@ -1,6 +1,6 @@
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/src/main/xar-resources/data/beginners-guide-to-xrx-v4/listings/listing-9.xml b/src/main/xar-resources/data/beginners-guide-to-xrx-v4/listings/listing-9.xml
index 8f4489ad..05b96a59 100644
--- a/src/main/xar-resources/data/beginners-guide-to-xrx-v4/listings/listing-9.xml
+++ b/src/main/xar-resources/data/beginners-guide-to-xrx-v4/listings/listing-9.xml
@@ -6,8 +6,8 @@