Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DITA-OT 2.0.1 fails in preprocess #1869

Closed
ToshihikoMakita opened this issue Mar 12, 2015 · 8 comments
Closed

DITA-OT 2.0.1 fails in preprocess #1869

ToshihikoMakita opened this issue Mar 12, 2015 · 8 comments
Assignees
Labels
bug obsolete Issue no longer exists in latest release preprocess priority/medium Medium (or unknown) priority issue

Comments

@ToshihikoMakita
Copy link
Contributor

Hi,

DITA-OT 2.0.1 fails with following log:

init:

dita2pdf2.init:

check-arg:
    [mkdir] Created dir: D:\DITA-OT\DITA-OT2.0.1\temp\temp20150313024005723

log-arg:
     [echo] *****************************************************************
     [echo] * basedir = D:\DITA-OT\DITA-OT2.0.1
     [echo] * dita.dir = D:\DITA-OT\DITA-OT2.0.1
     [echo] * transtype = pdf2
     [echo] * tempdir = D:\DITA-OT\DITA-OT2.0.1\temp\temp20150313024005723
     [echo] * outputdir = D:\DITA-OT\DITA-OT2.0.1\out
     [echo] * clean.temp = true
     [echo] * DITA-OT version = 2.0.1
     [echo] * XML parser = Xerces
     [echo] * XSLT processor = Saxon
     [echo] * collator = ICU
     [echo] *****************************************************************
     [echo] #Ant properties
     [echo] #Fri Mar 13 02:40:06 JST 2015
     [echo] args.grammar.cache=yes
     [echo] args.input=samples/index-data/sample_en/sample_en.ditamap
     [echo] args.logdir=D\:\\DITA-OT\\DITA-OT2.0.1\\out
     [echo] args.rellinks=nofamily
     [echo] args.xml.systemid.set=yes
     [echo] dita.dir=D\:\\DITA-OT\\DITA-OT2.0.1
     [echo] dita.plugin.com.antennahouse.dita12.dtd.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\com.antennahouse.dita12.dtd
     [echo] dita.plugin.com.antennahouse.pdf5.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\com.antennahouse.pdf5
     [echo] dita.plugin.com.sophos.tocjs.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\com.sophos.tocjs
     [echo] dita.plugin.org.dita.base.dir=D\:\\DITA-OT\\DITA-OT2.0.1
     [echo] dita.plugin.org.dita.docbook.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\org.dita.docbook
     [echo] dita.plugin.org.dita.eclipsecontent.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\org.dita.eclipsecontent
     [echo] dita.plugin.org.dita.eclipsehelp.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\org.dita.eclipsehelp
     [echo] dita.plugin.org.dita.htmlhelp.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\org.dita.htmlhelp
     [echo] dita.plugin.org.dita.javahelp.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\org.dita.javahelp
     [echo] dita.plugin.org.dita.odt.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\org.dita.odt
     [echo] dita.plugin.org.dita.pdf2.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\org.dita.pdf2
     [echo] dita.plugin.org.dita.specialization.dita11.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\org.dita.specialization.dita11
     [echo] dita.plugin.org.dita.specialization.dita132.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\org.dita.specialization.dita132
     [echo] dita.plugin.org.dita.specialization.eclipsemap.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\org.dita.specialization.eclipsemap
     [echo] dita.plugin.org.dita.troff.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\org.dita.troff
     [echo] dita.plugin.org.dita.wordrtf.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\org.dita.wordrtf
     [echo] dita.plugin.org.dita.xhtml.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\org.dita.xhtml
     [echo] dita.plugin.org.oasis-open.dita.v1_2.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\plugins\\org.oasis-open.dita.v1_2
     [echo] dita.temp.dir=D\:\\DITA-OT\\DITA-OT2.0.1\\temp\\temp20150313024005723
     [echo] preprocess.copy-image.skip=true
     [echo] *****************************************************************

build-init:

preprocess.init:
     [echo] *****************************************************************
     [echo] * input = samples/index-data/sample_en/sample_en.ditamap
     [echo] *****************************************************************

gen-list:
 [gen-list] Using Xerces grammar pool for DTD and schema caching.
 [gen-list] Processing file:/D:/DITA-OT/DITA-OT2.0.1/samples/index-data/sample_en/sample_en.ditamap
 [gen-list] Processing file:/D:/DITA-OT/DITA-OT2.0.1/samples/index-data/sample_en/topics-en/dita_sample.xml
 [gen-list] Processing file:/D:/DITA-OT/DITA-OT2.0.1/samples/index-data/sample_en/topics-en/c_preface.xml
 [gen-list] Processing file:/D:/DITA-OT/DITA-OT2.0.1/samples/index-data/sample_en/topics-en/p_weirdtitle1.xml
 [gen-list] Processing file:/D:/DITA-OT/DITA-OT2.0.1/samples/index-data/sample_en/topics-en/p_weirdtitle2.xml
 [gen-list] Processing file:/D:/DITA-OT/DITA-OT2.0.1/samples/index-data/sample_en/topics-en/c_test_introduction.xml
 [gen-list] Processing file:/D:/DITA-OT/DITA-OT2.0.1/samples/index-data/sample_en/topics-en/p_abstract.xml
 [gen-list] Processing file:/D:/DITA-OT/DITA-OT2.0.1/samples/index-data/sample_en/topics-en/p_xref.xml
 [gen-list] Processing file:/D:/DITA-OT/DITA-OT2.0.1/samples/index-data/sample_en/topics-en/p_note.xml
 [gen-list] Processing file:/D:/DITA-OT/DITA-OT2.0.1/samples/index-data/sample_en/topics-en/p_bodyelements.xml
 [gen-list] Processing file:/D:/DITA-OT/DITA-OT2.0.1/samples/index-data/sample_en/topics-en/p_miscellaneouselements.xml

BUILD FAILED
D:\DITA-OT\DITA-OT2.0.1\build.xml:41: The following error occurred while executing this line:
D:\DITA-OT\DITA-OT2.0.1\plugins\org.dita.base\build_preprocess.xml:78: Failed to run pipeline: null

Total time: 1 second

The sample data can be downloaded from following URL:

AntennaHouse/pdf5
https://github.com/AntennaHouse/pdf5

The batch file is follows:

ant -l out\sample_en.log -Dargs.input=samples/index-data/sample_en/sample_en.ditamap -Dtranstype=pdf2

batch

Regards,

@jelovirt
Copy link
Member

Do you have all the dependencies in CLASSPATH?

@ToshihikoMakita
Copy link
Contributor Author

Yes, as far as I see the CLASSPATH environment variable is effective.

set

@jelovirt
Copy link
Member

Was able to reproduce this, a NullPointerException.

@jelovirt jelovirt added bug priority/medium Medium (or unknown) priority issue preprocess labels Mar 12, 2015
@jelovirt jelovirt self-assigned this Mar 12, 2015
@jelovirt
Copy link
Member

The NullPointerException comes from processing

<data-about href="urn:isbn:0156983508">

as the URI doesn't have a path part.

@jelovirt
Copy link
Member

Since the data-about does not specify scope="external", it tried to use the URN as a local DITA target. DITA-OT doesn't not support this.

Not that the example in the DITA 1.2 spec is

<data-about href="urn:isbn:0156983508" scope="external">

@jelovirt
Copy link
Member

The NPE should be fixed, by adding some level of input URI validation that rejects the example input.

@ToshihikoMakita
Copy link
Contributor Author

Probably it's came from DITA 1.1 example:

data-about
http://docs.oasis-open.org/dita/v1.1/CS01/langspec/langref/data-about.html

<topic id="questions">
    <title>Questions and answers</title>
    <prolog>
        <data-about name="book" href="urn:isbn:0156983508">
            <data name="title">The World Doesn't End</data>
            <data name="author">
                <data name="firstname">Charles</data>
                <data name="lastname">Simic</data>
            </data>
            <data name="published" datatype="year">1989</data>
            ...
        </data-about>
        ...
    </prolog>
    <body>
        ...
       <lq href="urn:isbn:0156983508">In a forest of question marks ...
       </lq>
       ...
    </body>
</topic>

@robander
Copy link
Member

Marking this as obsolete. I tried the sample above using DITA-OT 3.1 and got much better results, and errors to help identify the problem:

 [gen-list] file:/C:/DITA-OT/TESTGITHUB/1869/1869.dita:19:32: [DOTJ036W][W
ARN] The file "urn:isbn:0156983508" is outside the scope of the input dita/map d
irectory.
 [gen-list] [DOTJ013E][ERROR] Failed to parse the referenced file 'urn:isbn:0156
983508'.: unknown protocol: urn
   [filter] file:/C:/DITA-OT/TESTGITHUB/1869/1869.dita:19:32: [DOTJ075W][W
ARN] Absolute link 'urn:isbn:0156983508' without correct 'scope' attribute. Usin
g 'scope' attribute value 'external'.

(My sample wasn't quite the one used above -- the one above from the DITA 1.1 spec shows @name on <data-about>, but that's invalid, and has been fixed in the 1.3 spec (http://docs.oasis-open.org/dita/dita/v1.3/errata02/os/complete/part1-base/langRef/base/data-about.html)

@robander robander added the obsolete Issue no longer exists in latest release label Jul 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug obsolete Issue no longer exists in latest release preprocess priority/medium Medium (or unknown) priority issue
Projects
None yet
Development

No branches or pull requests

3 participants