0

For DITA Open Tookit 2.1.0.

IF I create a new output as follows, THEN the command runs to completion:

dita -v -f html5 -i samples/sequence.ditamap -o OUTPUT/HTML5

DITA-OT 2.10 creates an initial OUTPUT/[outputType] sub-folder structure, builds the output, and runs to completion without error.

IF I create a new output as follows, THEN the command fails to run and returns an error:

dita -v -l OUTPUT/HTML5/HTML5.log -f html5 -i samples/sequence.ditamap -o OUTPUT/HTML5

Error: Cannot write on the specified log file.

This problem exists for all DITA-OT 2.1 output types. This example just happens to be HTML5.

The circumvention is to create the output type's folder hierarchy before running the command. Among other things, I can simply run the first command followed by the second command — no problem the second time 'round. The point being that IF the folder hierarchy is in place, even if a given output type's folder is empty, THEN DITA-OT 2.1 can create the new output AND a log file. But if the destination folder does NOT exist, DITA-OT 2.1 is unable to instantiate the log file and just gives up on the build.

I've tried moving the -l OUTPUT/HTML5/HTML5.log to the end of the command line it didn't help.

I realize I can create a script file (batch file in Windows) that creates the folder hierarchy before running the second command, but I'd rather understand why DITA-OT 2.1 CAN create a new output folder hierarchy and output but CANNOT do that AND create a log file at the same time.

I'm still new enough to the DITA-OT's build system (Ant + XML) that I don't have a clear idea how to isolate the problem. So I'm hoping someone will know exactly where to look. Or better yet, explain how one might debug the DITA-OT 2.1 build system's "plumbing" so that one can observe this and similar failures in action and remedy them.

RBV
  • 1,367
  • 1
  • 14
  • 33

1 Answers1

1

It works perfectly for me when I run the Command Prompt as an Administrator (Win 7). It doesn't work if you run it as a non-admin user.

This is an issue related to administrator rights in Windows.

When you run the command as a non-admin user, the DITA-OT does not create the log folder specified with the -l parameter even though the folder structure exists.

Running the DITA OT as an Administrator user resolves this issue. I've tried both approaches and found that -l parameter creates the folders only when the OT is run as an Admin user.

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
Jax
  • 111
  • 3