Testing locally with DocBook XSL 1.77.0?

34 views
Skip to first unread message

Mark Craig

unread,
May 28, 2012, 4:07:51 AM5/28/12
to docbkx-to...@googlegroups.com
Hello,

What is the best way to test locally with the latest stylesheet release?

I'm guessing a local copy of stylesheet artifacts is required, https://docbook.svn.sourceforge.net/svnroot/docbook/trunk/maven

The download fails through Maven, though works in a browser. (It also works with curl if I use -L to follow redirects, but fails if not.)

[INFO] Downloading: http://prdownloads.sourceforge.net/docbook/docbook-xsl-1.77.0.zip?download/docbook-xsl-1.77.0.zip to /Users/mark/Documents/workspace/docbook-maven/docbook-xsl/target/lib/docbook-xsl-1.77.0.zip

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 1.159s

[INFO] Finished at: Mon May 28 09:49:29 CEST 2012

[INFO] Final Memory: 4M/81M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:download-single (download-xsl) on project docbook-xsl: Error handling resource: Unable to locate resource in repository -> [Help 1]

Thanks for your advice. Regards,

Mark

Mimil Mimil

unread,
Jun 1, 2012, 10:43:28 AM6/1/12
to docbkx-to...@googlegroups.com
Hi Mark and sorry for the delay,

I just changed the pom version and the properties named docbook.xsl.release and docbook.xslns.release and all is downloading as expected.
I tested today, could you give it a try if not already done?

Regards,
Cedric,

--
You received this message because you are subscribed to the Google Groups "Docbkx Tools Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/docbkx-tools-users/-/5-U0zC9yMX8J.
To post to this group, send email to docbkx-to...@googlegroups.com.
To unsubscribe from this group, send email to docbkx-tools-us...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/docbkx-tools-users?hl=en.

Mark Craig

unread,
Jun 2, 2012, 3:13:31 AM6/2/12
to docbkx-to...@googlegroups.com
Thanks Cedric,

Hmm, you're right! This works for me at home today.
All I have changed is the network connection.

Thanks for your time and your help.

Regards,
Mark

PS For the record, this is all what I changed in the source:

$ svn diff
Index: docbook-xsl/pom.xml
===================================================================
--- docbook-xsl/pom.xml (revision 9386)
+++ docbook-xsl/pom.xml (working copy)
@@ -5,7 +5,7 @@
   <artifactId>docbook-xsl</artifactId>
   <name>DocBook XSL Stylesheets</name>
   <packaging>pom</packaging>
-  <version>1.76.1</version>
+  <version>1.77.0</version>
   <description>These are XSL stylesheets for transforming DocBook XML document instances into various output formats.
   </description>
@@ -18,8 +18,8 @@
 
 
   <properties>
-    <docbook.xsl.release>docbook-xsl-1.76.1</docbook.xsl.release>
-    <docbook.xslns.release>docbook-xsl-ns-1.76.1</docbook.xslns.release>
+    <docbook.xsl.release>docbook-xsl-1.77.0</docbook.xsl.release>
+    <docbook.xslns.release>docbook-xsl-ns-1.77.0</docbook.xslns.release>
   </properties>
 
   <build>

Mark Craig

unread,
Aug 31, 2014, 2:49:26 AM8/31/14
to docbkx-to...@googlegroups.com
Hi,

What is the right way to test with a trunk snapshot of the DocBook XSL stylesheets?

I would like to confirm a fix that is not yet in an official release.

Regards,
Mark

Mimil Owns

unread,
Sep 2, 2014, 9:06:45 AM9/2/14
to docbkx-to...@googlegroups.com
Hello,

well the sourceforge site changes often so most of the time I have to rebuild a configuration when I make a release of xsl stylesheets. I do not have much time these months and neither in the next coming months :(

I neither created a "release" from subversion, I always wait for a zip file available in sourceforge because I do not have the xsl build environment. If you can have access to such snapshot precompiled distribution you will be able to change the maven configuration to build your artifact (not so much complicated, it is just unzip and rezip)

Regards,
Cedric



--
You received this message because you are subscribed to the Google Groups "Docbkx Tools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to docbkx-tools-us...@googlegroups.com.

To post to this group, send email to docbkx-to...@googlegroups.com.

Mark Craig

unread,
Sep 4, 2014, 3:22:22 AM9/4/14
to docbkx-to...@googlegroups.com
Thanks Cedric,

I'm trying to set it up locally instead.

When building the plugin, I'm running into the following error.

[ERROR] Failed to execute goal com.agilejava.docbkx:docbkx-builder-maven-plugin:2.0.16-SNAPSHOT:build (generate-template) on project docbkx-maven-plugin: Failed to apply Transformer for retrieving parameter names. org.xml.sax.SAXParseException; systemId: jar:file:/Users/mark/.m2/repository/net/sf/docbook/docbook-xsl/1.79-SNAPSHOT/docbook-xsl-1.79-SNAPSHOT-ns-resources.zip!/docbook/template/titlepage.xsl; lineNumber: 9; columnNumber: 35; duplicate attribute (found "xmlns:d")


Is that just bug in th e snapshot stylesheets?

Regards,
Mark

PS Here's what I was doing:

# Get the snapshot build, ~/Downloads/docbook-xsl-ns-snapshot.zip
# Unzip
# Rename base directory to docbook
# Zip as ~/Downloads/docbook-xsl-ns-resources.zip


# Install the snapshot build
cd ~/Downloads

mvn install:install-file \
 -Dfile=docbook-xsl-ns-resources.zip \
 -DgroupId=net.sf.docbook \
 -DartifactId=docbook-xsl \
 -Dversion=1.79-SNAPSHOT \
 -Dpackaging=zip \
 -Dclassifier=ns-resources


# Build with the local artifact
 
cd docbkx-tools
 
vi docbkx-maven-plugin/pom.xml
 
svn diff
Index: docbkx-maven-plugin/pom.xml
===================================================================
--- docbkx-maven-plugin/pom.xml (revision 308)
+++ docbkx-maven-plugin/pom.xml (working copy)
@@ -61,7 +61,7 @@
     <dependency>
       <groupId>net.sf.docbook</groupId>
       <artifactId>docbook-xsl</artifactId>
-      <version>1.78.1</version>
+      <version>1.79-SNAPSHOT</version>
       <type>zip</type>
       <classifier>ns-resources</classifier>
     </dependency>

# Javadoc 8 fails on Maven annotations.
alias setJdk7
alias setJdk7='export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)'
setJdk7

mvn --offline -Dgpg.skip install

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.861s
[INFO] Finished at: Thu Sep 04 09:04:48 CEST 2014
[INFO] Final Memory: 44M/479M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.agilejava.docbkx:docbkx-builder-maven-plugin:2.0.16-SNAPSHOT:build (generate-template) on project docbkx-maven-plugin: Failed to apply Transformer for retrieving parameter names. org.xml.sax.SAXParseException; systemId: jar:file:/Users/mark/.m2/repository/net/sf/docbook/docbook-xsl/1.79-SNAPSHOT/docbook-xsl-1.79-SNAPSHOT-ns-resources.zip!/docbook/template/titlepage.xsl; lineNumber: 9; columnNumber: 35; duplicate attribute (found "xmlns:d") -> [Help 1]
To unsubscribe from this group and stop receiving emails from it, send an email to docbkx-tools-users+unsub...@googlegroups.com.

Mimil Owns

unread,
Sep 5, 2014, 3:57:12 AM9/5/14
to docbkx-to...@googlegroups.com
Hi Mark,

can you post a bit more of the stack trace (in order to know on which step the plugin fails)?

Regards,
Cedric


To unsubscribe from this group and stop receiving emails from it, send an email to docbkx-tools-us...@googlegroups.com.

Mark Craig

unread,
Sep 5, 2014, 6:14:47 AM9/5/14
to docbkx-to...@googlegroups.com
Oops yes... it turns out that I should've just looked in that file...

[ERROR] Failed to execute goal com.agilejava.docbkx:docbkx-builder-maven-plugin:2.0.16-SNAPSHOT:build (generate-template) on project docbkx-maven-plugin: Failed to apply Transformer for retrieving parameter names. org.xml.sax.SAXParseException; systemId: jar:file:/Users/mark/.m2/repository/net/sf/docbook/docbook-xsl/1.79-SNAPSHOT/docbook-xsl-1.79-SNAPSHOT-ns-resources.zip!/docbook/template/titlepage.xsl; lineNumber: 9; columnNumber: 35; duplicate attribute (found "xmlns:d") -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.agilejava.docbkx:docbkx-builder-maven-plugin:2.0.16-SNAPSHOT:build (generate-template) on project docbkx-maven-plugin: Failed to apply Transformer for retrieving parameter names.

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)

at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)

at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)

at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)

at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)

at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)

at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)

at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)

at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to apply Transformer for retrieving parameter names.

at com.agilejava.maven.docbkx.GeneratorMojo.getParameterNames(GeneratorMojo.java:565)

at com.agilejava.maven.docbkx.GeneratorMojo.extractParameters(GeneratorMojo.java:402)

at com.agilejava.maven.docbkx.GeneratorMojo.createSpecification(GeneratorMojo.java:385)

at com.agilejava.maven.docbkx.GeneratorMojo.generateSourceCode(GeneratorMojo.java:351)

at com.agilejava.maven.docbkx.GeneratorMojo.execute(GeneratorMojo.java:267)

at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)

... 19 more

Caused by: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException; systemId: jar:file:/Users/mark/.m2/repository/net/sf/docbook/docbook-xsl/1.79-SNAPSHOT/docbook-xsl-1.79-SNAPSHOT-ns-resources.zip!/docbook/template/titlepage.xsl; lineNumber: 9; columnNumber: 35; duplicate attribute (found "xmlns:d")

at com.icl.saxon.om.Builder.build(Builder.java:273)

at com.icl.saxon.Controller.transform(Controller.java:936)

at com.agilejava.maven.docbkx.GeneratorMojo.getParameterNames(GeneratorMojo.java:549)

... 25 more

Caused by: org.xml.sax.SAXParseException; systemId: jar:file:/Users/mark/.m2/repository/net/sf/docbook/docbook-xsl/1.79-SNAPSHOT/docbook-xsl-1.79-SNAPSHOT-ns-resources.zip!/docbook/template/titlepage.xsl; lineNumber: 9; columnNumber: 35; duplicate attribute (found "xmlns:d")

at com.icl.saxon.aelfred.SAXDriver.error(SAXDriver.java:857)

at com.icl.saxon.aelfred.XmlParser.error(XmlParser.java:463)

at com.icl.saxon.aelfred.XmlParser.parseAttribute(XmlParser.java:1086)

at com.icl.saxon.aelfred.XmlParser.parseElement(XmlParser.java:1005)

at com.icl.saxon.aelfred.XmlParser.parseDocument(XmlParser.java:510)

at com.icl.saxon.aelfred.XmlParser.doParse(XmlParser.java:163)

at com.icl.saxon.aelfred.SAXDriver.parse(SAXDriver.java:320)

at com.icl.saxon.om.Builder.build(Builder.java:265)

... 27 more


It does look like titlepage.xsl has the namespace defined a couple of times...

$ grep "xmlns:d" docbook/template/titlepage.xsl

xmlns:d="http://docbook.org/ns/docbook"

                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"

xmlns:d="http://docbook.org/ns/docbook"


So looking at the file, I guess that answers my question: the problem is in template/titlepage.xsl.

When I fix the local artifact and rebuild docbkx-tools, everything runs to successful completion.

Sorry for the noise.
Regards,
Mark

Mark Craig

unread,
Sep 5, 2014, 6:31:39 AM9/5/14
to docbkx-to...@googlegroups.com
Regarding the duplicate namespace declaration, I have opened https://sourceforge.net/p/docbook/bugs/1343/

Mark
Reply all
Reply to author
Forward
0 new messages