Log content of xsl:message

Quick question...

 

I've added some error proofing into an XSL template that terminates processing.  I added debug into the <xsl:message terminate="yes"/> statement but the message does not appear to write to the shell output as I expected it to.

 

ERR ISHPublDITAOTUtil::StreamDITAOTLogFiles -> Build failed.
BUILD FAILED
C:\InfoShare\App\Utilities\DITA-OT\Edwards\build.xml:44: The following error occurred while executing this line:
C:\InfoShare\App\Utilities\DITA-OT\Edwards\build.xml:1054: ; SystemID: file:/C:/InfoShare/App/Utilities/DITA-OT/Edwards/plugins/com.edwards.label.skunkworks/xsl/transform/labelData_v2.xsl; Line#: 78; Column#: -1
net.sf.saxon.instruct.TerminationException: Processing terminated by xsl:message at line 79 in labelData_v2.xsl
	at net.sf.saxon.instruct.Message.processLeavingTail(Message.java:222)
	at net.sf.saxon.instruct.Choose.processLeavingTail(Choose.java:686)
	at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:556)
	at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:549)
	yadda yadda yadda java stuff

 

The outcome is desired.  I do want to terminate processing and cause a failure.  However, I need to capture why it failed.  I know what is happening at line 79 but my users don't.

For reference, the content of the xsl:message:

ERROR: Missing translation! Processing will now terminate. Failed processing the ID: {{GUID HERE}} Requested Languages: EN ES Topics to be translated: {{GUID HERE}}, {{GUID HERE}}, {{GUID HERE}}
Please verify the publication properties and ensure all TRANSLATE topics have the requested translations available in the CMS.

Is there a means or mechanism through which I can push the content of the xsl:message to the Publishing engine for logging purposes?    The specific stop in this case is expected content in map that is missing in a custom transform.

Thanks.

  • Hi David,

    The error will be available in the DITA-OT logfile as expected, but the script engine is most likely (OOTB) not showing the error as it only shows the last 20 lines of the DITA-OT logfile.

    You can change this by changing the number of the lines to be logged in the ISHParams.vbs file which is available in the <drive-letter>:\Infoshare\Data\PublishingService\Tools location.

    Within this file you can update the value of the property:
    gciNumberOfDITAOTLines

    When supplying the value '0' to this property, no lines will be logged.
    When supplying the value '-1' to this property, all lines of the DITA-OT logfile will be included in the 'shell command output' logging. So this log information could become really large.

    Kind Regards,

    Raf