docbook-apps

Re: [docbook-apps] xi:include file and add link to file

  • 1.  Re: [docbook-apps] xi:include file and add link to file

    Posted 03-13-2009 20:55
    The XSL stylesheet cannot perform the function of reading in the HTML file
    as escaped programlisting text. You can use the document() function to
    open another XML file (assuming it was XHTML), but it cannot parse it as
    "text".

    You might consider a preprocessing step that constructs what you want before
    the xi:includes are consumed by the parser that understands XIncludes.

    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net


    ----- Original Message -----
    From: "Boris Schaeling" <boris@highscore.de>
    To: <docbook-apps@lists.oasis-open.org>
    Sent: Friday, March 13, 2009 5:34 AM
    Subject: [docbook-apps] xi:include file and add link to file


    > I've been converting all my books on my website to DocBook XML but ran
    > into a few problems. There are many chapters where I include sample HTML
    > files like this:
    >
    > <programlisting><xi:include href="samle.html"
    > parse="text"/></programlisting>
    >
    > When I generate HTML files I do not only want the HTML code of sample.html
    > to be included (which works fine) but also want to provide a link to the
    > file (so the reader can open sample.html in the browser). Obviously I
    > can't process the <xi:include> tag and fetch the filename from the href
    > attribute in the DocBook XSL stylesheets as sample.html is included first.
    > Now I wonder what's the best solution?
    >
    > I've been thinking of using a processing instruction - something like
    > this:
    >
    > <programlisting><xi:include href="samle.html"
    > parse="text"/></programlisting>
    >
    >
    > As I need to set two attributes to the same value I wonder if it's
    > possible to use only the processing instruction and insert the
    > <programlisting> tag and the file content in the customization layer
    > somehow? But then again I want to include sample.html in PDF files, too -
    > using only doesn't sound like a good idea then?
    >
    > Boris
    >
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >
    >