greglarsen / docbkx-tools

Automatically exported from code.google.com/p/docbkx-tools
0 stars 1 forks source link

output filename of chunked HTML index #77

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create a chunked HTML output. I've created a htmlCustomization xsl with this 
content :

                <xsl:import href="urn:docbkx:stylesheet" />

<xsl:import href="urn:docbkx:stylesheet/profile-chunk.xsl" />

<xsl:import href="urn:docbkx:stylesheet/highlight.xsl" />
<!-- <xsl:import href="urn:docbkx:stylesheet/highlighting/common.xsl"/> -->
<!-- <xsl:import href="/usr/share/xml/docbook/stylesheet/html/highlight.xsl"/> 
-->

<!-- It is important to use indent="no" here, otherwise verbatim -->
<!-- environments get broken by indented tags...at least when the -->
<!-- callout extension is used...at least with some processors -->
<xsl:output method="xml" indent="no" />
<xsl:param name="base.dir">target/docbkx/</xsl:param>
<xsl:param name="use.id.as.filename">true</xsl:param>
<xsl:param name="root.filename"></xsl:param>

<xsl:param name="highlight.source" select="1" />

Including 'chunked' will create the chunked HTML output, leaving root.filename 
empty causes the ID attribute of the root element to be used. 

Create a docbook file that has a root element with ID attribute equal to the 
name of the XML file. e.g. <book id="Example"> ...  and store it in  
Example.xml.

2. use maven docbkxplugin 2.0.13 to generate the HTML. I'm not using 
<chunkedOutput>true</chunkedOutput> or anything, because that is in the 
customized xsl. Here's the configuration for building: 
<execution>
    <id>build-html-and-pdf</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>generate-pdf</goal>
                            <goal>generate-html</goal>

                        </goals>
                        <configuration>
                            <includes>${docbook.file}</includes>
                            <xincludeSupported>true</xincludeSupported>
                                 <base>${basedir}/src/dockbkx</base>
                            <targetDirectory>${project.build.directory}/docbkx/</targetDirectory>
                            <foCustomization>${basedir}/template/xsl/fo/myCustom-fo.xsl</foCustomization>
                            <htmlStylesheet>${basedir}/css/style.css</htmlStylesheet>
                            <htmlCustomization>${basedir}/template/xsl/html/myCustom-chunkedHtml.xsl</htmlCustomization>
</configuration>
</execution>

3.

What is the expected output? What do you see instead?
I expect the index file to be called "Example.html" and the heading to be a 
HTML heading. Instead, I see that the start of the file is overwritten with 
<?xml version="1.0" ... >
If I use a different ID, I get a filename called "Example.html" which only 
holds the <?xml version .... > line, and the file named after the ID as 
expected (i.e. with no alterations). 

What version of the product are you using? On what operating system?

2.0.13 (but 2.0.11 also appears to be affected by this).

Please provide any additional information below.

It would be nice to instruct the docbkx-tools not to touch/rename the output 
file based on the name of the input file. I'm using the same configuration to 
generate the PDF; and this one uses the input filename to create the output 
filename. This is desired..

Original issue reported on code.google.com by gerrit.v...@gmail.com on 28 Jun 2011 at 9:46

GoogleCodeExporter commented 8 years ago
I think you are overriding the plugin behavior with your customization layer.

If you want a chunked output you must set the property chunkedOutput because it 
is used on different places. You also do not have to override root.filename and 
base.dir, they are set by the plugin.

Concerning use.id.as.filename I never used it so I don't know what will be the 
behavior of the plugin.

Could you have a test with the previous informations before I go more deep in 
the issue?

Cedric,

Original comment by MimilO...@gmail.com on 29 Jun 2011 at 5:38

GoogleCodeExporter commented 8 years ago
Hi Cedric,

I've commented out the 'root.filename' and 'base.dir' entries and used  
<chunkedOutput>: it works better, but now I get the chunked HTML in a 
subdirectory named after the input file (example : Example.xml -->  
target/docbkx/Example/Example.html).. 

Original comment by gerrit.v...@gmail.com on 4 Jul 2011 at 12:39

GoogleCodeExporter commented 8 years ago
yes, this is the behavior since 2.0.12, it was needed when you have multiple 
input files within a single plugin execution.

Cedric,

Original comment by MimilO...@gmail.com on 4 Jul 2011 at 4:55

GoogleCodeExporter commented 8 years ago
I close this issue as it is the expected behavior

Original comment by MimilO...@gmail.com on 7 Jul 2011 at 6:44