Page 1 of 1

Variables from a file

Posted: Thu Apr 06, 2017 12:36 pm
by nanotec
Dear all,
I'm using a file where I manage my variables for my map. I used there the tag option as well as ph.

In the map is use this:
My map has the Name "Example.ditamap"

Code: Select all

<keydef keys="variables" href="Example.dita"/>

In custom.xls I define the following:

Code: Select all

<!-- this gives you the ditamap name with the extention '.ditamap' -->
<xsl:variable name="ditaMapWithExtention" select="tokenize(/map/@xtrf, '/' [last()])"/>

<!-- this gives you the file with the variables, it removes the filsuffix '.ditamap' and adds '.dita' to it -->

<xsl:variable name="length" select="string-length($ditaMapWithExtention)"/>
<xsl:variable name="variablesFile" select="substring($ditaMapWithExtention,($length - 3))"/>

<!-- with the filname, we can now pick the variables with the following selector (replace ID with your id)
document($variablesFile, /)//option[@id = 'ID']/text()
-->

<!-- here are some examples -->
<xsl:variable name="firmwareVersion" select="document($variablesFile, /)//option[@id = 'FWversion']/text()" />
I receive the following message in Transformation Problems:

Code: Select all

Exception thrown by URIResolver Cause: java.lang.reflect.InvocationTargetException
Can anyone help me with that issue.

Thanks to all and with reagrds

Re: Variables from a file

Posted: Thu Apr 06, 2017 4:50 pm
by Radu
Hi,

After the build fails, besides the "Transformation Problems" view there is also a DITA OT console view containing all the output received from the DITA OT ANT Process.
Maybe if you copy that output and paste it in a code block in a reply it would give us more details about what's going on.

Regards,
Radu

Re: Variables from a file

Posted: Thu Apr 06, 2017 6:22 pm
by nanotec
Dear Radu,
do you want all of it? These about 4000 lines
with regards

Re: Variables from a file

Posted: Fri Apr 07, 2017 8:08 am
by Radu
Hi,

Maybe at least paste in a code block the top 50 lines and the bottom 50 lines.

Regards,
Radu

Re: Variables from a file

Posted: Fri Apr 07, 2017 9:55 am
by nanotec
Dear Radu,
thanks for your reply.
I hope that helps.

with regards

Top lines:

Code: Select all

Executing:
"c:\program files\oxygen xml editor 18\jre/bin/java" -Xmx2G "-Doxygen.org.apache.xerces.xni.parser.XMLParserConfiguration=org.ditang.relaxng.defaults.RelaxDefaultsParserConfiguration" -classpath "C:\Program Files\Oxygen XML Editor 18\tools\ant/lib/ant-launcher.jar" "-Dant.home=C:\Program Files\Oxygen XML Editor 18\tools\ant" org.apache.tools.ant.launch.Launcher -lib "C:\Daten\dita-OT\lib\saxon-9.1.0.8-dom.jar" -lib "C:\Daten\dita-OT\lib\saxon-9.1.0.8.jar" -lib "C:\Daten\dita-OT\lib\commons-io-2.5.jar" -lib "C:\Program Files\Oxygen XML Editor 18\classes" -lib "C:\Program Files\Oxygen XML Editor 18\lib\oxygen-annotations.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\oxygen-content-completion-api.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\oxygen-css-flute-parser.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\oxygen-css-pretty-printer.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\oxygen-css-validator.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\oxygen-emf.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\oxygen-jfx-components.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\oxygen-text-search.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\oxygen-token-markers.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\oxygen-validation-api.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\oxygen-xquery-pretty-printer.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\oxygen.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\resolver.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\oxygen-token-markers.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\org.eclipse.wst.xml.xpath2.processor_1.2.0.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\xml-apis.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\xercesImpl.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\commons-io-1.3.1.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\commons-logging-1.2.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\log4j.jar" -lib "C:\Daten\dita-OT\lib\commons-codec-1.10.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\jing.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\saxon9ee.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\saxon.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\xmlgraphics-commons-2.1.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\fop.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\fontbox-1.8.5.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\batik-all-1.8.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\js.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\poi-3.10-FINAL-20140208.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\nekohtml.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\xml-apis-ext.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\avalon-framework-api-4.3.1.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\avalon-framework-impl-4.3.1.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\jeuclid-core.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\jeuclid-fop.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\jai_tiff.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\jh.jar" -lib "C:\Daten\dita-OT\lib\jsearch.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\lucene-analyzers-common-4.7.2.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\lucene-analyzers-kuromoji-4.7.2.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\lucene-core-4.7.2.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\lucene-misc-4.7.2.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\lucene-queries-4.7.2.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\lucene-queryparser-4.7.2.jar" -lib "C:\Program Files\Oxygen XML Editor 18\lib\lucene-suggest-4.7.2.jar" -lib "C:\Daten\dita-OT" -lib "C:\Daten\dita-OT\lib\dost-patches.jar" -lib "C:\Daten\dita-OT\lib" -lib "C:\Daten\dita-OT\lib\ant-apache-resolver-1.9.7.jar" -lib "C:\Daten\dita-OT\lib\ant-launcher.jar" -lib "C:\Daten\dita-OT\lib\ant.jar" -lib "C:\Daten\dita-OT\lib\commons-codec-1.10.jar" -lib "C:\Daten\dita-OT\lib\commons-io-2.5.jar" -lib "C:\Daten\dita-OT\lib\dost-configuration.jar" -lib "C:\Daten\dita-OT\lib\dost.jar" -lib "C:\Daten\dita-OT\lib\guava-19.0.jar" -lib "C:\Daten\dita-OT\lib\icu4j-57.1.jar" -lib "C:\Daten\dita-OT\lib\saxon-9.1.0.8-dom.jar" -lib "C:\Daten\dita-OT\lib\saxon-9.1.0.8.jar" -lib "C:\Daten\dita-OT\lib\xercesImpl-2.11.0.jar" -lib "C:\Daten\dita-OT\lib\xml-apis-1.4.01.jar" -lib "C:\Daten\dita-OT\lib\xml-resolver-1.2.jar" -f "C:\Daten\dita-OT/build.xml" -v -d "-Dtranstype=pdf2" "-Dbasedir=C:\Daten\Out\" "-Doutput.dir=C:\Daten\Out\pdf" "-Ddita.temp.dir=C:\Daten\Temp\DITA_OT_TEMP" "-Dpdf.formatter=fop" "-Dargs.filter=C:\Users\michael.mayer\Documents\DITA Tests\SP_Temp\VAT_std_spi_DE.ditaval" "-Ddita.input.valfile=C:\Users\michael.mayer\Documents\DITA Tests\SP_Temp\VAT_std_spi_DE.ditaval" "-Dargs.input=C:\Users\michael.mayer\Documents\DITA Tests\SP_Temp\VAT_std_spi_DE.ditamap" "-Dclean.temp=yes" "-Ddita.dir=C:\Daten\dita-OT" "-Dcustomization.dir=C:\Daten\additions\branding" "-DbaseJVMArgLine=-Xmx2G"

Apache Ant(TM) version 1.9.7 compiled on April 9 2016
Buildfile: C:\Daten\dita-OT\build.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.8 in: c:\program files\oxygen xml editor 18\jre
Detected OS: Windows 7
Adding reference: ant.ComponentHelper
Setting ro project property: output.dir -> C:\Daten\Out\pdf
Setting ro project property: dita.temp.dir -> C:\Daten\Temp\DITA_OT_TEMP
Setting ro project property: transtype -> pdf2
Setting ro project property: customization.dir -> C:\Daten\additions\branding
Setting ro project property: pdf.formatter -> fop
Setting ro project property: baseJVMArgLine -> -Xmx2G
Setting ro project property: basedir -> C:\Daten\Out\
Setting ro project property: dita.dir -> C:\Daten\dita-OT
Setting ro project property: dita.input.valfile -> C:\Users\michael.mayer\Documents\DITA Tests\SP_Temp\VAT_std_spi_DE.ditaval
Setting ro project property: args.input -> C:\Users\michael.mayer\Documents\DITA Tests\SP_Temp\VAT_std_spi_DE.ditamap
Setting ro project property: clean.temp -> yes
Setting ro project property: args.filter -> C:\Users\michael.mayer\Documents\DITA Tests\SP_Temp\VAT_std_spi_DE.ditaval
Setting ro project property: ant.file -> C:\Daten\dita-OT\build.xml
Setting ro project property: ant.file.type -> file
Setting ro project property: ant.project.invoked-targets ->
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile C:\Daten\dita-OT\build.xml with URI = file:/C:/Daten/dita-OT/build.xml
Setting ro project property: ant.project.name -> DOST
Adding reference: DOST
Setting ro project property: ant.project.default-target -> init
Setting ro project property: ant.file.DOST -> C:\Daten\dita-OT\build.xml
Setting ro project property: ant.file.type.DOST -> file
Project base dir set to: C:\Daten\Out
+Target:
+Target: init
+Target: dita2tocjs
+Target: tocjsInit
+Target: topic2tocjs
+Target: map2tocjs
+Target: dita.map.tocjs
+Target: tocjsDefaultOutput
+Target: tocjsDefaultXhtmlOutput
+Target: tocjsDefaultFrameset
+Target: help
Adding reference: ant.LocalProperties
parsing buildfile jar:file:/C:/Daten/dita-OT/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/C:/Daten/dita-OT/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
parsing buildfile jar:file:/C:/Program%20Files/Oxygen%20XML%20Editor%2018/tools/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/Oxygen%20XML%20Editor%2018/tools/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
[property] Loading C:\Daten\Out\local.properties
[property] Unable to find property file: C:\Daten\Out\local.properties
Setting project property: ant.file.DOST.dir -> C:\Daten\dita-OT
Class org.apache.tools.ant.types.resources.selectors.Not loaded from parent loader (parentFirst)
Class org.apache.tools.ant.taskdefs.condition.IsSet loaded from parent loader (parentFirst)
Condition false; not setting dita.dir
Condition false; not setting dita.dir
Adding reference: dost.class.path

Bottom lines:

Code: Select all

dita2pdf2:

clean-temp:
fileset: Setup scanner in dir C:\Daten\Temp\DITA_OT_TEMP with patternSet{ includes: [] excludes: [] }
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\.job.xml
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\Configuration\OpenTopic\cfg\common\artwork\Information_icon.svg
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\Configuration\OpenTopic\cfg\common\artwork\hand.gif
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\Configuration\OpenTopic\cfg\common\artwork\hand_rtl.gif
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\Configuration\OpenTopic\cfg\common\artwork\warning.gif
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\Configuration\OpenTopic\cfg\common\artwork\warning_sign.svg
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\VAT_std_spi_DE.dita
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\VAT_std_spi_DE.ditamap
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\VAT_std_spi_DE_MERGED.xml
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\canditopics.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\conref.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\conreftargets.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\copytosource.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\flagimage.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\fullditamap.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\fullditamapandtopic.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\fullditatopic.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\hrefditatopic.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\hreftargets.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\html.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\image.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\introduction_manual_NP5_de.dita
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\outditafiles.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\relflagimage.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\resourceonly.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\schemekeydef.xml
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\stage1.xml
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\stage2.fo
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\subject_scheme.dictionary
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\subjectscheme.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\subrelation.xml
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\subtargets.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\topic.fo
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\user.input.file.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\usr.input.file.list
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\Customization\OpenTopic\common\artwork
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\Customization\OpenTopic\common
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\Customization\OpenTopic
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\Customization
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\Configuration\OpenTopic\cfg\common\artwork
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\Configuration\OpenTopic\cfg\common
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\Configuration\OpenTopic\cfg
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\Configuration\OpenTopic
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP\Configuration
[delete] Deleting C:\Daten\Temp\DITA_OT_TEMP
[antcall] Exiting C:\Daten\dita-OT\build.xml.

BUILD SUCCESSFUL
Total time: 7 seconds

The process finished with exit code: 0

Re: Variables from a file

Posted: Fri Apr 07, 2017 4:28 pm
by Radu
Hi,

Unfortunately I do not see the "Exception thrown by URIResolver Cause: java.lang.reflect.InvocationTargetException" error in the console messages, probably you can look for the error yourself in the log messages and post some console output from that section.
Also you define various xsl:variables in the XSLT customization, in the xsl template where you are using them you could try to add some xsl:messages with each variable's value, the messages will be visible in the console output and might help you debug the problem yourself.

Regards,
Radu

Re: Variables from a file

Posted: Wed Apr 19, 2017 11:10 am
by nanotec
Dear Radu, do you think it would help if I give you the original files?

with regards

Re: Variables from a file

Posted: Wed Apr 19, 2017 11:15 am
by Radu
Hi,

If you can send an email with a small sample DITA project and a PDF customization plugin or folder, I could try to find some time to look into this.

Regards,
Radu

Re: Variables from a file

Posted: Wed Apr 19, 2017 11:49 am
by nanotec
Dear Radu, where should I send the mail?
Via contact Support Team: https://www.oxygenxml.com/techSupport.html
I cannot send you a private message in this Forum.
with regards

Re: Variables from a file

Posted: Wed Apr 19, 2017 12:04 pm
by Radu
Hi,

Yes, so either use our tech support form or use our support@oxygenxml.com email address.
For large attachments I would recommend the tech support form.

Regards,
Radu