[jbosstools-issues] [JBoss JIRA] (TOOLSDOC-313) Copyrights and versions stated in documents do not align with the release version of the doc & the JBT release version

Nick Boldt (JIRA) jira-events at lists.jboss.org
Sat Apr 20 10:20:53 EDT 2013


    [ https://issues.jboss.org/browse/TOOLSDOC-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768958#comment-12768958 ] 

Nick Boldt commented on TOOLSDOC-313:
-------------------------------------

Regarding embedding dynamic versions, I tried yesterday to make the docbook master.xml file pull the value from its accompanying pom.xml file, so that we could simply have the version inherited from the project's version, but my xslt/maven fu is weak.

If I change this:

{code:title=jboss-tools-docs/index/pom.xml}
-       <version>1.0</version>
+       <version>4.1.0.Beta1</version>
{code}

and add this:

{code:title=jboss-tools-docs/pom.xml}
+        <releaseinfo>Version: <xi:include href="../pom.xml" xpointer="xmlns(p=http://maven.apache.org/POM/4.0.0)xpointer(/p:project/p:version/text())"       xmlns:xi="http://www.w3.org/2001/XInclude">
+            <xi:fallback>Latest</xi:fallback>
+          </xi:include></releaseinfo>
{code}

Then xmllint will produce this:

{code}
$➔ xmllint --xinclude index/en-US/master.xml | grep Version
        <releaseinfo>Version: 4.1.0.Beta1</releaseinfo>
{code}

Which says it's valid XML & the include works.

However when I run it with maven, I get this:

{code}
9 [main] INFO org.jboss.jdocbook.render.RendererImpl - Starting rendering en-US/pdf
redirecting output to file [/home/nboldt/eclipse/workspace-jboss/jbosstools-github-master/jbosstools-documentation/jboss-tools-docs/index/target/docbook/work/log/console-en-US-pdf.log]
Recoverable error
org.xml.sax.SAXParseException: SchemeUnsupported: The XPointer scheme 'xmlns' is not supported.
Recoverable error
org.xml.sax.SAXParseException: SchemeUnsupported: The XPointer scheme 'xpointer' is not supported.
Recoverable error
org.xml.sax.SAXParseException: Include operation failed, reverting to fallback. Resource error reading file as XML (href='../pom.xml'). Reason: XPointer resolution unsuccessful.
{code}

Because:

{quote}
*Does the XInclude processor support XPointer?*

Yes. The XInclude processor supports the XPointer Framework and the XPointer element() Scheme. _The XPointer xpointer() Scheme is currently not supported._
{quote}
 -- http://xerces.apache.org/xerces2-j/faq-xinclude.html

So... any idea how I can force maven to use a newer/better parser that properly supports XInclude with an xpointer() ?

Alternatively, I guess we could have a step that produces a text file called version.txt which only contains:

{code}4.1.0.Beta1{code}

Then we could do a trivial text-mode XInclude like this:

{code:title=jboss-tools-docs/pom.xml}
+        <releaseinfo>Version: <xi:include href="../target/version.txt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+            <xi:fallback>Latest</xi:fallback>
+          </xi:include></releaseinfo>
{code}

In fact generating a text file might be a better approach because the value of maven's $\{project.version} may in fact be defined in a parent pom, not in the doc's pom, so that it need only be set in ONE place instead of two (or more). 

For example... the JSF userguide could inherit its version from here:

{code:title=https://github.com/jbosstools/jbosstools-javaee/blob/master/jsf/pom.xml#L12}<version>3.5.0-SNAPSHOT</version>{code}

rather than having it hardcoded to 1.0 here:

{code:title=https://github.com/jbosstools/jbosstools-javaee/blob/master/jsf/docs/userguide/pom.xml#L7}	<version>1.0</version>{code}

And having it hardcoded in the master.xml here:

{code:title=https://github.com/jbosstools/jbosstools-javaee/blob/master/jsf/docs/userguide/en-US/master.xml#L45}
        <releaseinfo>
            Version: 3.3.0.M5
           </releaseinfo>{code}
                
> Copyrights and versions stated in documents do not align with the release version of the doc & the JBT release version
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: TOOLSDOC-313
>                 URL: https://issues.jboss.org/browse/TOOLSDOC-313
>             Project: Documentation for JBoss Tools and Developer Studio
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: General documentation issues
>    Affects Versions: 4.0.1, 4.1.0
>            Reporter: Nick Boldt
>            Assignee: Michelle Murray
>
> Some places where docs' copyright dates and stated versions do not align with the version of the doc:
> {code:title=http://docs.jboss.org/tools/4.0.1.Final/en/GettingStartedGuide/html/index.html}
> Version: 4.0.0
> Copyright © 2012 JBoss by Red Hat
> {code}
> {code:title=http://docs.jboss.org/tools/4.0.1.Final/en/beginners_guide/html/index.html}
> Version: 3.3.0.M5
> Copyright © 2011 JBoss by Red Hat
> {code}
> {code:title=http://docs.jboss.org/tools/4.0.1.Final/en/as/html/index.html}
> Version: 3.3.0.M5
> Copyright © 2007, 2008, 2009, 2010 JBoss by Red Hat
> {code}
> {code:title=http://docs.jboss.org/tools/4.0.1.Final/en/jmx_ref_guide/html/index.html}
> Copyright © 2007, 2008, 2009, 2010, 2011 JBoss by Red Hat
> {code}
> And yes, this is still a problem in trunk:
> {code:title=http://docs.jboss.org/tools/nightly/trunk/en/beginners_guide/html/index.html}
> Version: 3.3.0.M5
> Copyright © 2011 JBoss by Red Hat
> {code}
> {code:title=http://docs.jboss.org/tools/nightly/trunk/en/forge_reference/html/index.html}
> Version: 3.3.1
> Copyright © 2012 JBoss by Red Hat
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the jbosstools-issues mailing list