hydralix / docbkx-tools

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

TransformerConfigurationException while building man pages #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When I built the man pages for an app I am working on with docbkx version
2.0.9 I received the following exception:

Error at xsl:strip-space on line 120 of
jar:file:/Users/thomas/.m2/repository/com/agilejava/docbkx/docbkx-maven-plugin/2
.0.9/docbkx-maven-plugin-2.0.9.jar!/META-INF/docbkx/manpages/other.xsl:
  Element name d:manvolnumdb:abstract is not a valid QName
Exception in thread "main"
com.agilejava.docbkx.maven.TransformerBuilder$TransformerBuilderException:
Failed to build Transformer from
jar:file:/Users/thomas/.m2/repository/com/agilejava/docbkx/docbkx-maven-plugin/2
.0.9/docbkx-maven-plugin-2.0.9.jar!/META-INF/docbkx/manpages/docbook.xsl
    at
com.agilejava.docbkx.maven.AbstractTransformerMojo$DefaultTransformerBuilder.cre
ateTransformer(AbstractTransformerMojo.java:634)
    at
com.agilejava.docbkx.maven.AbstractTransformerMojo$DefaultTransformerBuilder.bui
ld(AbstractTransformerMojo.java:579)
    at
com.agilejava.docbkx.maven.CachingTransformerBuilder.build(CachingTransformerBui
lder.java:34)
    at
com.agilejava.docbkx.maven.AbstractTransformerMojo.execute(AbstractTransformerMo
jo.java:220)
    at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.ja
va:579)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:498)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject
(DefaultLifecycleExecutor.java:265)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultL
ifecycleExecutor.java:180)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExec
utor.java:149)
    at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
    at
org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
    at
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:9
04)
    at
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder
.java:304)
    at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:52)
Caused by: javax.xml.transform.TransformerConfigurationException: Failed to
compile stylesheet. 1 error detected.
    at com.icl.saxon.PreparedStyleSheet.prepare(PreparedStyleSheet.java:136)
    at
com.icl.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:12
7)
    at
com.icl.saxon.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:
79)
    at
com.agilejava.docbkx.maven.AbstractTransformerMojo$DefaultTransformerBuilder.cre
ateTransformer(AbstractTransformerMojo.java:604)
    ... 17 more

After some digging we fixed the issue by changing the line:
d:manvolnumdb:abstract
to:
d:manvolnum
db:abstract

in /META-INF/docbkx/manpages/other.xsl.

Original issue reported on code.google.com by ThomasOB...@gmail.com on 26 Mar 2009 at 3:31

GoogleCodeExporter commented 8 years ago
Hello

it is a docbook stylesheet bug then. I think you should have a look if the 
problem
remains on the lastest docbook stylessheet and if yes create an issue in 
docbook project.
Our next release will use the latest release.

Regards,
Cédric,

Original comment by MimilO...@gmail.com on 27 Mar 2009 at 10:53

GoogleCodeExporter commented 8 years ago
This is similar to issue 24

Original comment by Heiko.Ru...@googlemail.com on 5 Nov 2009 at 3:23

GoogleCodeExporter commented 8 years ago
Issue 24 has been merged into this issue.

Original comment by MimilO...@gmail.com on 8 Nov 2009 at 9:50

GoogleCodeExporter commented 8 years ago
I tried it on 2.0.10-SNAPSHOT (docbook 1.75.2) and it doesn't make anymore an 
error
but it generates an empty file :(
It doesn't come from a stylesheet problem as I tried it with xsltproc and it 
works as
expected.
I haven't yet found where the bug is located.

Cedric,

Original comment by MimilO...@gmail.com on 8 Nov 2009 at 9:55

GoogleCodeExporter commented 8 years ago
Okay I found where it is located. 
The manpages stylesheet seems to generate the output filenames (not taking care 
of
what was expected). The only thing we can set is the output directory.

Cedric,

Original comment by MimilO...@gmail.com on 9 Nov 2009 at 6:47

GoogleCodeExporter commented 8 years ago
commited in r113

no more empty output file is generated and the generated files are now placed in
target directory. 
As far as I could see the man stylesheet creates the output file directly, this 
is a
different behaviour from other stylesheets where we can specify the output file.

Original comment by MimilO...@gmail.com on 16 Nov 2009 at 9:42