OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] Olink logic between different trunk/branchesfolders of documentation (several projects)


Bob, thanks for details of your idea!

Unfortunately this is not completely suitable for my needs. The problems arise here:

> olink database file for each _scenario_ that defines a combination of content based on versions

As I understand, the sitemaps in your way are based on scenarios. And scenarios are based on some predefined logic, that logic is defined either by the document author, or by other person (not a machine!). Unfortunately, I can't predict any scenario that can happens. We have about 10 authors, each of them has some document to write to. While writing any author can make an olink to other documents. This is the only thing I (as a co-author and, additionally, person responsible for out docbook setup) can ask him. Neither make any other extra documents with files he/she used nor any other things that is not authoring itself. From the other side I can't manually looked up for all documents/scenarios that can take place - in that case the whole automation process take no sense. So your idea is suitable only for situation that allows manual human hand tuning with just a few documents. My goal is to get fully automatic processing (no matter how processing passes it will have).

--
Best regards,
 Eduard Tibet


-----Original Message-----
From: Bob Stayton [mailto:bobs@sagehill.net]
Sent: Friday, October 08, 2010 9:04 PM
To: Eduard Tibet; docbook-apps@lists.oasis-open.org
Subject: Re: [docbook-apps] Olink logic between different trunk/branches folders of documentation (several projects)

Hi Eduard,
I meant that you could create an olink database file for each scenario that defines a
combination of content based on versions.  If you place these above the source
directories, the paths in each file would indicate which version of each book is used
in each such combination.

For example, in a scenario that uses only trunk versions, create this database file:

doc/olink-trunk.xml:

<!DOCTYPE targetset [
<!ENTITY pluto_adminguide SYSTEM "pluto/trunk/pluto_adminguide.target.db">
<!ENTITY pluto_userguide SYSTEM "pluto/trunk/pluto_userguide.target.db">
<!ENTITY mars_adminguide SYSTEM "mars/trunk/mars_adminguide.target.db">
<!ENTITY mars_userguide SYSTEM "mars/trunk/mars_userguide.target.db">
]>
<targetset>
  <sitemap>
    <dir name="doc">
      <dir name="pluto">
        <dir name="trunk">
          <document baseuri="pluto_adminguide.html" targetdoc="pluto_adminguide">
            &pluto_adminguide;
          </document>
          <document baseuri="pluto_userguide.html" targetdoc="pluto_userguide">
            &pluto_userguide;
          </document>
        </dir>
      </dir>

      <dir name="mars">
        <dir name="trunk">
          <document baseuri="mars_adminguide.html" targetdoc="mars_adminguide">
            &mars_adminguide;
          </document>
          <document baseuri="mars_userguide.html" targetdoc="mars_userguide">
            &mars_userguide;
          </document>
        </dir>
      </dir>
    </dir>
  </sitemap>
</targetset>

The entities define which target.db files to use, and the sitemap specifies the output
locations.  Now when you process any of the documents in trunk, specify
target.database.document="doc/olink-trunk.xml" (with suitable adjustments for path
relative to the processing directory).


And when you roll pluto to 0.95 and mars to 2.0, create olink-pluto95-mars2.xml for
that combination, changing the entity declarations to load new data files, and
changing the sitemap to match your output structure:

<!DOCTYPE targetset [
<!ENTITY pluto_adminguide SYSTEM "pluto/branches/0.95/pluto_adminguide.target.db">
<!ENTITY pluto_userguide SYSTEM "pluto/branches/0.95/pluto_userguide.target.db">
<!ENTITY mars_adminguide SYSTEM "mars/branches/2.0/mars_adminguide.target.db">
<!ENTITY mars_userguide SYSTEM "mars/branches/2.0/mars_userguide.target.db">
]>
<targetset>
  <sitemap>
    <dir name="doc">
      <dir name="pluto">
        <dir name="branches">
          <dir name="0.95">
            <document baseuri="pluto_adminguide.html" targetdoc="pluto_adminguide">
              &pluto_adminguide;
            </document>
            <document baseuri="pluto_userguide.html" targetdoc="pluto_userguide">
              &pluto_userguide;
            </document>
          </dir>
        </dir>
      </dir>

      <dir name="mars">
        <dir name="branches">
          <dir name="2.0">
            <document baseuri="mars_adminguide.html" targetdoc="mars_adminguide">
              &mars_adminguide;
            </document>
            <document baseuri="mars_userguide.html" targetdoc="mars_userguide">
              &mars_userguide;
            </document>
          </dir>
        </dir>
      </dir>
    </dir>
  </sitemap>
</targetset>

Then set target.database.document="doc/olink-pluto95-mars2.xml" when process those
versions.

Would this setup satisfy your requirements?

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message -----
From: "Eduard Tibet" <eduard.tibet@i-free.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Friday, October 08, 2010 5:55 AM
Subject: RE: [docbook-apps] Olink logic between different trunk/branches folders of
documentation (several projects)


Hello!

Peter, Bob, thanks for the answers. Here is some my ideas... This message is as long
as my first one, sorry. I do my best to explain all things in details :)

Peter,

> Are you delivering the output files in the same directories that you use for
> versioning the source files?

Exactly.

> Do you have a reason for keeping the Subversion directory structure in your links?

The main reason is to get more simple documents generation in Apache Cocoon. Due to
generation logic based on tokens and wildcards (for details look at sections
"Tokenization" and "Wildcard and regular expressions" here:
http://cocoon.apache.org/2.0/userdocs/matchers/matchers.html , doc itself is old but
described rules haven't changed from that time) it is a convenient way to do it. The
main idea is to separate systems and versions to different trees in final URL. For
example look here: http://xmlgraphics.apache.org/fop/ (the idea is the same, but it
has more flat structure with only one system - FOP):
http://xmlgraphics.apache.org/fop/0.95/knownissues_overview.html
http://xmlgraphics.apache.org/fop/1.0/knownissues_overview.html



Bob,

> 1.  Generating separate target data files (target.db) in each of your trunk and
> branch directories, for each product and guide.

This step was already done and exactly as you suggested - each source doc
{1}_userguide.xml has its own {1}_userguide.target.db. All targetdb files have already
been generated at pre-cocoon level by xsltproc.

But following steps are not clear for me...

> 2.  Creating multiple olink database files, each of which identifies which versions
> of
trunk or branches are to be combined based on pathnames to the target data files.

What do you mean under "identifies which versions of trunk or branches are to be
combined based on pathnames to the target data files"? Do you mean make the "local"
project/version sitemaps (imagine, target.sitemap.xml) with only "local" target files
inside it (i.e. target.sitemap.xml includes only links to trunk
mars_userguide.target.db, mars_adminguide.target.db) and then put in each directory
(project/system)"? Like this:

doc
 - mars
  -- trunk (mars_userguide.xml, mars_adminguide.xml, target.sitemap.xml)
  -- branches
  --- 1.0 (mars_userguide.xml, mars_adminguide.xml, target.sitemap.xml)
  --- 2.0 (mars_userguide.xml, mars_adminguide.xml, target.sitemap.xml)

 - pluto
  -- trunk (pluto_userguide.xml, pluto_adminguide.xml, target.sitemap.xml)
  -- branches
  --- 0.4 (pluto_userguide.xml, pluto_adminguide.xml, target.sitemap.xml)
  --- 0.8 (pluto_userguide.xml, pluto_adminguide.xml, target.sitemap.xml)

> 3.  Select the right olink database file at build time using the
> target.database.document parameter.

Certainly, I can assign
target.database.document=/<some_path>/<project_name>/<version_number>/
target.sitemap.xml , give to the stylesheet right <project_name>/<version_number>.
Thus (if the previous step #2 realization is what you meant) completely solve the use
case 1 (see below my original message). BUT it doesn't solve the case 2 -
multiproject(trunk/version).

May be I didn't clear define this in my original message, but here the trouble "how
the author should define the right document to link to" arise. I.e. in case:
pluto/trunk/pluto_adminguide.xml --> mars/branches/2.0/mars_adminguide.xml , the link
would be:

<para>About installation see <olink targetdoc="mars_usr_adminguide"
targetptr="installation"></olink></para>.

And it equals any target (the same for doc mars/branches/1.0/mars_adminguide.xml,
mars/trunk/mars_adminguide.xml, etc.), because inside any mars_adminguide.xml
targetdoc/targetptr don't changed while document branched trunk > 1.0, trunk > 2.0,
etc.

--
Best regards,
 Eduard Tibet

-----Original Message-----
From: Bob Stayton [mailto:bobs@sagehill.net]
Sent: Wednesday, October 06, 2010 10:28 PM
To: Eduard Tibet; docbook-apps@lists.oasis-open.org
Subject: Re: [docbook-apps] Olink logic between different trunk/branches folders of
documentation (several projects)

Hi,
If I understand correctly, I think you can handle this situation by:

1.  Generating separate target data files (target.db) in each of your trunk and branch
directories, for each product and guide.

2.  Creating multiple olink database files, each of which identifies which versions of
trunk or branches are to be combined based on pathnames to the target data files.

3.  Select the right olink database file at build time using the
target.database.document parameter.

The targetdoc and targetid values and olink references remain stable and don't require
changing.  The only thing that changes is which data sets they are resolving to.  The
branch number would appear only in the olink database file as part of the pathname to
a target.db file.

Would that work for you?

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message -----
From: "Eduard Tibet" <eduard.tibet@i-free.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, October 06, 2010 4:34 AM
Subject: [docbook-apps] Olink logic between different trunk/branches folders of
documentation (several projects)


Hello!

I have a general question regarding olinks logic in (and between) multiple projects
with trunk/branches folders. In "DocBook XSL: The Complete Guide" samples
(http://www.sagehill.net/docbookxsl/Olinking.html#LinkBetweenDocs) are very useful for
understanding the principles, but they concern only limited numbers of simple
situations (1 project, no branch/trunk). I have more complex task with several
projects, trunk, branches, etc. I'll explain the current situation in details...

Imagine, we have 2 projects (systems) - mars and pluto (i've simplified the sample a
little bit for better understanding, but the general idea is kept untouched). All
documentation (xml source) for these projects stores in (number of "-" equals to
folder depth):

doc
 - mars
  -- trunk (mars_userguide.xml, mars_adminguide.xml)
  -- branches
  --- 1.0 (mars_userguide.xml, mars_adminguide.xml)
  --- 2.0 (mars_userguide.xml, mars_adminguide.xml)

 - pluto
  -- trunk (pluto_userguide.xml, pluto_adminguide.xml)
  -- branches
  --- 0.4 (pluto_userguide.xml, pluto_adminguide.xml)
  --- 0.8 (pluto_userguide.xml, pluto_adminguide.xml)

The output structure (html files) is the same (with one page html files - non
chunked). All sources are stored in Subversion (http://subversion.apache.org/), all
final documentation are generated from sources by Apache Cocoon
(http://cocoon.apache.org/), so any actions (fixes) that generally can be done by hand
are not possible. Only one of the projects can be branched at the some specific time
(I mean there is impossible, that both projects branched from the trunk
simultaneously).

There are 2 typical use cases (olinks shown as -->):

1. {1}.xml  --> {2}.xml (both files within trunk, or within branch/version after
branching). For example, pluto/trunk/pluto_userguide.xml -->
pluto/trunk/pluto_adminguide.xml; after branching
pluto/branches/0.95/pluto_userguide.xml --> pluto/branches/0.95/pluto_adminguide.xml.

2. {1}.xml (from any trunk folder) --> {2}.xml (within exact branch of exact project).
For example pluto/trunk/pluto_adminguide.xml -->
mars/branches/2.0/mars_adminguide.xml). After branching {1}.xml have to --> the same
branch folder (i.e., after branching pluto/trunk/pluto_adminguide.xml into
pluto/branches/0.95/pluto_adminguide.xml it still have to -->
mars/branches/2.0/mars_adminguide.xml).

I've found some problems, while planning customization layer for these use cases.

Olink sitemap should have unique document targetdoc. For simple documents I usually
use current.docid=/*/@id, and document_root_id (/*/@id)= document_filename for
simplification. But in this situation it doesn't work:

In case #1 after branching pluto/branches/0.95/pluto_userguide.xml should link to
branched pluto/branches/0.95/pluto_adminguide.xml - not to
pluto/trunk/pluto_userguide.xml that becomes new version for developers.

In case #2 targetdoc of mars_adminguide.xml should be distinguished from others
mars_adminguide.xml (in trunk/other branches) at the time of creating olink (i.e.
targetdoc should contains the version number (trunk/<number>)). But, at the time of
initial creation mars_adminguide.xml it was trunk - all documents are trunk and there
is no possible to predict in what exact version number it will be branched next time.
Moreover files (and filenames) itself are not changed after making branches.

How to distinguish different versions of document in this situation? If you know or
hear about best practices in that specific field, please, let me know or post the
links where I can read more detailed information about it (unfortunately searching for
it in Google gave no enough information).

--
Best regards,
 Eduard Tibet


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




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





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]