This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[docbook] Re: A complex case of profiling


On Wed, Apr 27, 2005 at 06:51:11PM +0200,
 Jirka Kosek <jirka@kosek.cz> wrote 
 a message of 102 lines which said:

> Can you be more specific about what is the problem?

OK, here is the complete use case. I thought that people would prefer
a "digest" version but here is the full one.

I write the documentation for a software used by different domain
names registries (like ".fr" or ".cz", although our users are
typically african registries). Since every registry has a different
registration policy, an important part of the documentation has to be
specific to some options. The options are boolean (yes/no).

Practical examples: some registries sell directly to the end user,
some force to go through registrars. So, in the first case, the
documentation will say:

<para>We have three main entities in the database: Domains, Hosts and
Contacts.</para>

while in the second:

<para>We have four main entities in the database: Domains, Hosts,
Registrars and Contacts.</para>

Also, some registries allow IDN (domain names in Unicode) and some do
not. So, in the first case, we will have:

<para>Legal domain names are those authorized by <rfc num="3490"/>,
practically all the Unicode character repertoire.</para>

while the second will be:

<para>Legal domain names are composed of US-ASCII letters, digits and the
hyphen character. Domains names starting with "xn--" are not
allowed.</para>

Now, how to implement it? Writing several documentations would be
inconvenient, both because an important part is common to all options
and also because of the combinatorial explosion (most combinations of
options are valid).

I thought to use the "condition" common attribute, something like:

<para>Domain names have syntactic restrictions. For instance, spaces
are never authorized.
<phrase condition="idn">Legal domain names are those authorized by
<rfc num="3490"/>, practically all the Unicode character
repertoire.</phrase>
<phrase condition="no_idn">Legal domain names are composed of US-ASCII
letters, digits and the hyphen character because of <rfc
num="1123"/>. Domains names starting with "xn--" are not allowed.
</phrase>
</para>

But the profiling system, as documented in 
http://www.sagehill.net/docbookxsl/Profiling.html does not work
because:

1) it does not allow negated options like no_idn above.

2) it does not allow to combine options (say a sentence mus appear
only if "registrars" and "idn") although I may simply use nested
<phrases> with conditions.

So, I planned to write a DOM program which will process the elements
with "condition" to my liking but I wonder if there is a better way.

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-help@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]