#438 docx/build-to.xml fails to handle profiledir parameter


== Summary ==

The teitodocx tool takes a --profiledir parameter, however the value of this parameter is not passed to ant correctly.

== Versions ==

Ubuntu 12.04.1

$ dpkg-query -W tei-p5-xsl2
tei-p5-xsl2 6.14

== How to Reproduce ==

1. Download the attached zip file.

2. Unzip.

3. Execute

$ make

== Expected Results ==

Make should run without error.

== Actual Results ==

$ make
teitodocx --profiledir=`pwd` --profile=test-profile test.xml
Convert test.xml to /home/ldd/src/teibugs/teibug17/test.xml.docx (tei to docx) using profile test-profile

/usr/share/xml/tei/stylesheet/docx/build-to.xml:92: src \'/usr/share/xml/tei/stylesheet/profiles/test-profile/docx/template.docx\' doesn\'t exist.

Total time: 0 seconds
make: *** [test.xml.docx] Error 1

== Observations ==

1. The bin subdirectory contains a fixed teitodocx. If you run make as follows, the build will complete because make will use the fixed tool:

$ PATH=./bin:$PATH make

2. It appears that teitodocx passes to ant a parameter named profiledir. However the file /usr/share/xml/tei/stylesheet/docx/build-to.xml expects profileDir (note how \"Dir\" is capitalized).

3. Grepping through /usr/bin/teito* for -Dprofiledir and -DprofileDir shows that all the various teitoX tools expect the parameter to be called profiledir, not profileDir.

4. Grepping through /usr/share/xml/tei/stylesheet/*/* shows that /usr/share/xml/tei/stylesheet/docx/build-to.xml expects profileDir but usr/share/xml/tei/stylesheet/html/build-to.xml expects profiledir. And the parameter does not seem to be defined anywhere else.

Hence, the file /usr/share/xml/tei/stylesheet/docx/build-to.xml is the only place where profileDir is expected. It should be changed to expect profiledir, for consistency with other files and tools.


  • Louis-Dominique Dubeau

    Oops. I talk about a "fixed teitodocx" in my bug report. That's a bad nomenclature. The teitodocx I included illustrates that the issue is a disconnect between what it passes and what build-to.xml expects but it is not the fix.

  • Sebastian Rahtz

    Sebastian Rahtz - 2012-09-06

    good catch! I don't understand how I managed to make that mess. I have changed profileDir to profiledir in docx/build-to.xml and that seems to solve the problem.

    note that teitoXXX are all symlinks to transformtei in the source, by the way, if you are looking at this again.

  • Sebastian Rahtz

    Sebastian Rahtz - 2012-09-06
    • status: open --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks