docbook-apps

xinclude and olinking with entities

  • 1.  xinclude and olinking with entities

    Posted 03-16-2011 14:54
    Hello,
    I do have a problem when assembling new documents with xincludes, turning
    external olinks to internal links by using entity-references, as it is
    described here:

    http://www.sagehill.net/docbookxsl/modular-olinks.html


    I put a reference to an external entity-declaration in a master document,
    i.e. one with includes, like that:






    %entity;

    ]>


    and have within that entities.ent - file all entities resolved to the master
    document, say *master.xml*:












    If the olinks in a included document are set like that:

    <olink targetptr="targetindoc" targetdoc="&thisgoal;" />
    >
    > then everything works fine since &thisgoal; is resolved to *master*.


    But when I now include a part of that document into another one in *a
    different folder*, say master_2.xml and make for that another entities.ent
    file in *that same different folder*:












    then the entities in the included file are still resolved according to the
    entities.ent where they are originally declared, which I find strange.

    I thought the entities would then be resolved according to the declaration
    of the including file, so that the olinks are correctly transformed to
    internal links.

    So it seems that the entities are being resolved before the include takes
    place?


    Any help is appreciated.

    cheers
    Benno