[daisy] A Couple Questions about Includes

Bruno Dumon bruno at outerthought.org
Mon May 7 05:07:14 CDT 2007


Hi,

On Sat, 2007-05-05 at 12:04 -0700, Vance Giboney wrote:
> 1. In previous versions, when we generated a book that had pages with
> includes, the titles of the included files came in with titles (by
> default) tagged as h1's, but we could adjust this in the XSLT using
> the "isIncluded" parameter. In 2.0.1, the titles of the includes seem
> to be coming in as plain body text, and they don't seem to respond to
> any tagging in the XSLT file.
> 
> Did something change? Is this a problem with our installation, XSLT,
> etc.? Any suggestions would be appreciated.

Includes in books were not working properly indeed. I've fixed the bug
(SVN rev 4027).

I have not tried this (would need to rollback my change), but you might
be able to work around it by producing a dummy element in the document
styling XSLT, as first child of the body element, for example:

    <html>
      <body>
        <span/>
        <h0 id="dsy{@id}" daisyDocument="{@id}" daisyBranch="{@branchId}" daisyLanguage="{@languageId}"><xsl:value-of select="@name"/></h0>
        <xsl:apply-templates select="d:parts/d:part"/>
      </body>
    </html>

were the <span/> is the added dummy element.

> 2. The documentation suggests that we can construct a query that will
> find documents that include a specified document. (This would be very
> useful for seeing where a document fragment is used before making any
> changes.)
> 
> I'm probably misunderstanding, but the documentation seems to suggest
> that a query with something like LinksTo(documentId, 1, 1, 'include')
> will do this, but it doesn't seem to be working that way.
> 
> Is there a way to query for a list of documents that include a specified file?

Again you found a bug: if the include instruction contains a comment
(i.e. a link follow by a space by some more text -- by default we add
the document name this way), the include-link was not properly
extracted. I've fixed the bug (SVN rev 4028). A possible work-around is
to remove the include comments.

Thanks for reporting these issues.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org                          bruno at apache.org



More information about the daisy mailing list