From: <ai...@us...> - 2013-08-20 17:16:32
|
Revision: 12491 http://sourceforge.net/p/plplot/code/12491 Author: airwin Date: 2013-08-20 17:16:26 +0000 (Tue, 20 Aug 2013) Log Message: ----------- Initial XSL customization of docbook html backend output following ideas in http://www.sagehill.net/docbookxsl. The meaningful (rather than numerical) HTML chunk filenames are now (quietly) formed from the DocBook id using the chunk.quietly and use.id.as.filename parameters. Modified Paths: -------------- trunk/doc/docbook/src/CMakeLists.txt Added Paths: ----------- trunk/doc/docbook/src/plplotdoc-html.xsl.in Modified: trunk/doc/docbook/src/CMakeLists.txt =================================================================== --- trunk/doc/docbook/src/CMakeLists.txt 2013-08-20 02:41:28 UTC (rev 12490) +++ trunk/doc/docbook/src/CMakeLists.txt 2013-08-20 17:16:26 UTC (rev 12491) @@ -297,11 +297,19 @@ if(DOCBOOK_XML_BACKEND) if(BUILD_HTML) + # Custom commands for building html version of documentation + set(STYLESHEET_HTML ${PLPLOTDOC}-html.xsl) + set(STYLESHEET_HTML_IN ${STYLESHEET_HTML}.in) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/${STYLESHEET_HTML_IN} + ${CMAKE_CURRENT_BINARY_DIR}/${STYLESHEET_HTML} + @ONLY + ) set(HTML_TMPDIR ${CMAKE_CURRENT_BINARY_DIR}/html) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${HTML_MANIFEST} COMMAND ${CMAKE_COMMAND} -E remove_directory ${HTML_TMPDIR} - COMMAND ${XMLTO} -vv -o ${HTML_TMPDIR} html ${CMAKE_CURRENT_BINARY_DIR}/${PLPLOTDOC}-html.xml + COMMAND ${XMLTO} -vv -x ${CMAKE_CURRENT_BINARY_DIR}/${STYLESHEET_HTML} -o ${HTML_TMPDIR} html ${CMAKE_CURRENT_BINARY_DIR}/${PLPLOTDOC}-html.xml COMMAND ${CMAKE_COMMAND} -E chdir ${HTML_TMPDIR} ls |cat > ${CMAKE_CURRENT_BINARY_DIR}/${HTML_MANIFEST} COMMAND mv ${HTML_TMPDIR}/* ${CMAKE_CURRENT_BINARY_DIR} @@ -310,6 +318,7 @@ ${SOURCE_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${PLPLOTDOC}-html.xml ${CMAKE_CURRENT_SOURCE_DIR}/inline-html.ent + ${CMAKE_CURRENT_BINARY_DIR}/${STYLESHEET_HTML} ) add_custom_target( html ALL @@ -395,7 +404,6 @@ else(DOCBOOK_XML_BACKEND) if(BUILD_HTML) # Custom commands for building html version of documentation - set(STYLESHEET_HTML ${PLPLOTDOC}-html.dsl) set(STYLESHEET_HTML_IN ${STYLESHEET_HTML}.in) configure_file( Added: trunk/doc/docbook/src/plplotdoc-html.xsl.in =================================================================== --- trunk/doc/docbook/src/plplotdoc-html.xsl.in (rev 0) +++ trunk/doc/docbook/src/plplotdoc-html.xsl.in 2013-08-20 17:16:26 UTC (rev 12491) @@ -0,0 +1,49 @@ +<?xml version='1.0'?> +<!-- + plplotdoc-html.xsl.in: XSL customization for the HTML PLplot docs + + Copyright (C) 2013 Alan W. Irwin + + Redistribution and use in source (XML DocBook) and "compiled" forms + (HTML, PDF, PostScript, DVI, TeXinfo and so forth) with or without + modification, are permitted provided that the following conditions are + met: + + 1. Redistributions of source code (XML DocBook) must retain the + above copyright notice, this list of conditions and the following + disclaimer as the first lines of this file unmodified. + + 2. Redistributions in compiled form (transformed to other DTDs, + converted to HTML, PDF, PostScript, and other formats) must + reproduce the above copyright notice, this list of conditions and + the following disclaimer in the documentation and/or other + materials provided with the distribution. + + Important: THIS DOCUMENTATION IS PROVIDED BY THE PLPLOT PROJECT "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PLPLOT PROJECT BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<!-- +These ideas for customizing the PLplot html documentation are adapted +from +http://www.sagehill.net/docbookxsl/CustomMethods.html#CustomizationLayer +http://www.sagehill.net/docbookxsl/Chunking.html#ChunkFilenames +.... +--> +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + +<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/> + +<xsl:param name="chunk.quietly" select="1"/> +<xsl:param name="use.id.as.filename" select="1"/> + +</xsl:stylesheet> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |