Pages: 1
Print
Author Topic: bat_lines on a per-deliverable basis?  (Read 3051 times)
larrygolding
Member

Posts: 15


« on: October 03, 2011, 04:36:42 PM »

Using XMetal Author Enterprise 6.0 SP1 (version 6.0.2.070) with SP Edition (version 2.0.0.061):

I have created a deliverable based on the Multiple XHTML Files output format. This custom deliverable specifies values for certain of the parameters defined by the output format, such as the name of the XSL stylesheet.

In addition to the parameter values, I want to specify some additional batch processing; in particular, I want to copy certain icons into the output directory. Can I add a <bat_content> element to the <config> element that defines my deliverable? Or does <bat_content> only apply to output formats?

In other words, if I want custom batch processing, must I clone the Multiple XHTML Files output format, and base my deliverable on the clone?

Of course the first thing I did was to try it. I added a single batch line to the <config> element that defines my deliverable:

Code:
<bat_content>
    <bat_line>echo Hello world</bat_line>
</bat_content>

It didn't work, as far as I could tell -- I didn't see "Hello world" in the log file anywhere. But maybe I didn't add the <bat_content> section to my deliverable in exactly the right way.
Logged
larrygolding
Member

Posts: 15


« Reply #1 on: October 03, 2011, 06:05:33 PM »

By the way, I got my scenario working by cloning the output format into a separate XML file, modifying the clone's batch processing, and basing my deliverable on the clone, as described in the XMetaL documentation. So there's no urgency to this question. I'm just curious if it can be done.

Thanks,
Larry
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #2 on: October 03, 2011, 07:17:54 PM »

Yes, the <bat_content> section only applies to output formats in general (ie: sort of a "master deliverable"). When you "duplicate" a "Deliverable" using our UI that adds a new entry to the following file and adds settings to it that reference the file that contains the actual batch commands:
%appdata%\SoftQuad\XMetaL\6.0\print_local.xml

We didn't anticipate this need so there is no means to do this using the UI in the Configure Output dialog. You can modify this file directly though, and add new <bat_line> entries:

C:\Program Files\XMetaL 6.0\Author\DITA\XACs\shared\renditions\print_dita142.xml

That might be good enough.

But if you need to be able to call different "deliverables" (the items in the list in our Generate Output dialog) with different batch commands for each then you need to go into the print_dita142.xml file and manually duplicate an entire <config> section, give the new one a new name (for your own sake) and fix up the @id value, then you need to sync that with your copy of the "print_local.xml" file in your %appdata% folder.

Let me know if you need this as the @id values are probably tricky. One of them matters and the others are probably red-herrings left over from an original design that changed (I think -- ie: most of them do nothing but others are significant).

One of the @id values in that file need to sync with a value in this file (essentially this lets our "Duplicate" button in the UI work via some redirection): %appdata%\SoftQuad\XMetaL\6.0\print_local.xml

However, in the latter file it may not be obvious how to code the location that points to the @id. Probably fastest if I check with dev to figure this out.
« Last Edit: October 03, 2011, 07:19:50 PM by Derek Read » Logged
larrygolding
Member

Posts: 15


« Reply #3 on: October 04, 2011, 10:01:07 AM »

Thanks Derek. I will follow up with you privately.

Larry
Logged
Pages: 1
Print
Jump to: