From: SourceForge.net <no...@so...> - 2006-05-22 02:20:35
|
Feature Requests item #1072510, was opened at 11/24/04 07:12 Message generated for change (Settings changed) made by sf-robot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373750&aid=1072510&group_id=21935 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: XSL Group: output: HTML >Status: Closed Resolution: Fixed Priority: 5 Submitted By: Mikhail Zislis (mzislis) Assigned to: Robert Stayton (bobstayton) Summary: Integrating custom HTML fragments into DocBook HTML output Initial Comment: I have used HTML/CSS and third-party JavaScripts to create an expandable tree that reflects the hierarchy and files of a sample [programming] project. Besides the expandable nodes, this tree has capabilities for showing persistent tooltips for various elements. Right now the main DocBook document references this external HTML document through the ulink tag, which opens the sample tree in a separate window. This isn't the most elegant solution, since the reader has to switch attention from one window to another to associate the text of the manual with the sample tree. Ideally, we would like to integrate the sample tree into the main document, as if it were linked in using HTML tag iframe. However, DocBook does not let us mix in HTML tags, so iframe is out of the question. We also don't like the idea of creating additional compatibility layers for this task, be that a DocBook "driver" DTD or an XSL add-on, because the compatibility layer has to be distributed along with the source document, which we intend to make available for download. I'm uploading a fully functional HTML sample of what we would like to have in the output. Is it possible to implement support for integrating external HTML fragments into DocBook HTML ouput on the XSL level? Thanks for your time. ---------------------------------------------------------------------- >Comment By: SourceForge Robot (sf-robot) Date: 05/21/06 19:20 Message: Logged In: YES user_id=1312539 This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: Robert Stayton (bobstayton) Date: 05/06/06 19:25 Message: Logged In: YES user_id=193218 I finally got around to doing this. Sorry it took so long. I think people will find it useful. The processing instruction name is dbhtml-include. It will be processed wherever the stylesheets do a general <xsl:apply-templates/>. There are some locations in the doc where elements are selected for processing, and a pi in such a location would not be processed without customization. For example, between two listitems. ---------------------------------------------------------------------- Comment By: Robert Stayton (bobstayton) Date: 05/06/06 19:25 Message: Logged In: YES user_id=193218 A change for this issue has been added to the current codebase. Please test the change with the latest snapshot from: http://docbook.sourceforge.net/snapshots/ ---------------------------------------------------------------------- Comment By: Mikhail Zislis (mzislis) Date: 12/14/04 01:38 Message: Logged In: YES user_id=1045088 Yes, this is exactly what I had in mind. Sounds great. ---------------------------------------------------------------------- Comment By: Robert Stayton (bobstayton) Date: 12/09/04 23:24 Message: Logged In: YES user_id=193218 How about a processing instruction like this: <?dbhtml include="myfile.html"?>. You would insert this in your DocBook XML file at the point where you want the code to be inserted. When the stylesheet encounters such a PI, it opens the HTML and copies it into the output. The only requirement is that the file be a well-formed XML file. That's because the only feature in XSLT 1.0 for opening another file is document (), which can only open XML files that are well-formed. But well-formed means a single root element in the external file. Perhaps a better system would be to require the external file to have an <html> ... </html> wrapper around its content. Then the stylesheet could strip the <html> tags and use whatever is inside, which can be any collection of content. If this isn't what you had in mind, perhaps you could describe how you thought you would specify an external file to be included by the stylesheet. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373750&aid=1072510&group_id=21935 |