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] any problems with DocBook XSL 1.79.0? (XPointers)


Hi Dean,
I'm a little confused about what is going on here. The internal processing steps are:

1.  The XML document is parsed.

2.  Any <xi:include> elements are replaced with the content.

3.  The XSL stylesheet processes the result into fo.

4.  FOP processes the fo to pdf.

So at steps 3 and 4, the xi:include and its attributes not longer exist, having been replaced by the content pointed to. So neither docbook-xsl nor FOP even see the xpointer attribute.

The changes to fox:destination came from a bug report that indicated that many elements were not generating fox:destination, so links into the document were not working. When I looked, the stylesheet was outputing fox:destination for a select group of elements, the hierarchy elements like book, chapter, section. That left out figure, table, and a lot of other potential targets for cross-document links.

So I changed the template in mode="fop1.foxdest" to recurse through the resolved document and generate a <fox:destination> for every xml:id in the document. That certainly didn't leave any out, but now I realize there are some elements whose template may not copy their id to the FO output, possibly because the element is not actually output (such as an info element). So you get a fox:destination pointing to a non-existent id. These are harmless, but do generate the warning noise.

It would be hard for the template with mode="fop1.foxdest" to distinguish between these two kinds of elements, because in its context it would not know if a given source element was generating output.

I've never been clear why FOP needs fox:destination for every id. Other FO processors don't seem to need such help identifying ids in the PDF.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net

On 10/30/2015 12:13 PM, DeanNelson@aol.com wrote:
Thanks for the input Bob.
I do want to emphasize that these are only FOP warnings and not errors.
In looking at the FO output, 1.79.0 puts out a list of
"fox:destination"s that have the IDs of each link (this is not in 1.78.1
output). Some of these are resolved but others issue a warning:
[WARN] FOUserAgent - Destination: Unresolved ID reference "doc.bookinfo"
found.
[WARN] FOUserAgent - Destination: Unresolved ID reference "met-company"
found.
[WARN] FOUserAgent - Destination: Unresolved ID reference "met-author"
found.
[WARN] FOUserAgent - Destination: Unresolved ID reference "met-address"
found.
[WARN] FOUserAgent - Destination: Unresolved ID reference
"met-copyright" found.
These are IDs of XIncluded files with XPointers
If I change these xincluded/xpointers files to simple Xincludes then the
IDs are resolved. The ones that are NOT resolved in my test files are:
bookinfo
corpauthor
author
address
copyright
I see that there are significant changes in fop1.xsl and many of them
deal with fox:destinations. I wonder if my stylesheets assume way too
much about what elements are able to be included in XPointers?
Do the stylesheets preserve the ID of XPointers in its output?
Regards,
Dean
In a message dated 10/30/2015 11:03:15 A.M. Pacific Daylight Time,
bobs@sagehill.net writes:

    Hi Dean,
    I would suggest breaking down the process into steps and examining the
    output of each step.

    So I would run xmllint --xinclude on the file to generate a document
    with XIncludes resolved, in which you can look for the id in question.
    Then generating a temporary .fo file using your stylesheet, and
    checking
    for the id.  And then passing that to FOP to make the PDF.  That will
    show which stage is producing the error.

    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net

    On 10/29/2015 9:43 AM, DeanNelson@aol.com wrote:
     > Bob
     > Last night I ran the 1.79.0 load with my system (xsltproc, DB
    4.5, fop 1.1)
     > For the most part, everything works as expected. However, I am now
     > getting a FOP warning when I use an XPointer. It looks like it
    adds it
     > to the list of FOP destinations, but does not use it. Hence :
     >   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude";
     > href="../metriguard/loc-corpinfo.xml" xpointer="met-company"/>
     > and
     >    <corpauthor id="met-company">&CORP_TITLE;</corpauthor>
     > produces this warning:
     > [WARN] FOUserAgent - Destination: Unresolved ID reference
    "met-company"
     > found.
     > The FOP process produces a correct document, it just complains.
    Here is
     > the rub and why I am concerned: it works just fine with the stock
     > stylesheets, no warnings and also with the 1.78.1 sytylesheets
    WITH my
     > customizations. So this has me a little stumped. I also noticed
    in the
     > release notes that there was some work in this area. Somehow, the new
     > stylesheet allow FOP destinations that should not be there?
     > Since it works with the stock stylesheets, I am wondering how I can
     > troubleshoot this in my own stylesheets and am asking for some input.
     > Any clues or ideas?
     > Thanks
     > Dean Nelson
     > In a message dated 10/21/2015 3:35:40 P.M. Pacific Daylight Time,
     > bobs@sagehill.net writes:
     >
     >    It has been about a week since candidate DocBook XSL 1.79.0 was
     >     released, and it has been downloaded about 150 times.  Has
    anyone who
     >     has tried it run into any problems yet?  If so, please let me
    know so
     >    they can be fixed for the 1.79.1 release.
     >
     >    --
     >     Bob Stayton
     >    Sagehill Enterprises
     > bobs@sagehill.net
     >
     > ---------------------------------------------------------------------
     >    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]