- From: Piez, Wendell A. (Fed) <wendell.piez@nist.gov>
- Date: Fri, 14 Jun 2024 15:36:49 +0000
- To: XProc Dev <xproc-dev@w3.org>
- Message-ID: <SA9PR09MB58249205233251633FC11ABFFFC22@SA9PR09MB5824.namprd09.prod.outlook.com>
Hi again, Norm tells me (off list) that according to XSLT, a result-document without @href (or without a useful @href) should (a) be unaccompanied (it's an error for any other output to appear), and (b) appear as the primary (principal) result, not a secondary result - in my demo that would be pipe='result@an-xslt' for the 'result' output port on that step. That sounds good, but it also doesn't work in Morgana - Morgana brings me back an empty document when I connect to 'result'. Inside, the XSLT appears to be working fine (as evidenced by xsl:message) even when no output appears. Any further advice? FWIW, as a mitigation I am now wondering if I can add that d*rn attribute with XProc to the XSLT instruction, before executing it. (That can't be so hard, can it?) Ha! Cheers, Wendell From: Piez, Wendell A. (Fed) <wendell.piez@nist.gov> Sent: Friday, June 14, 2024 10:33 AM To: XProc Dev <xproc-dev@w3.org> Subject: Seeing nothing on the secondary port on an xslt step Hello XProc friends, At the bottom appears an XProc, or what seems to be an XProc, except it throws an error in Morgana. It fails because while the 'end' step captures the secondary port on the 'an-xslt' step, nothing appears on secondary, and it is not allowed to be empty (it is not declared as a sequence). Adding sequence='true' to p:output lets the pipeline finish without error - but no visible result either. If I add xsl:result-document/@href (any href at all), the document appears on the secondary port. I guess this is conformant behavior since the relevant specs are pretty open? In any case I am wondering if (a) I understand correctly, and (b) if there is a way I can mitigate this easily without altering the XSLT. This is because in the actual problem I am addressing, the XSLT is not inline, but instead is produced dynamically by the XSpec test compiler, here (see especially line 140): https://github.com/xspec/xspec/blob/65c701eb8e170949bf82d0f74aa970d40498ccee/src/compiler/xslt/main.xsl#L140 Thanks! Any advice is welcome. <p:declare-step xmlns:p=http://www.w3.org/ns/xproc xmlns:c=http://www.w3.org/ns/xproc-step version="3.0" xmlns:x=http://www.jenitennison.com/xslt/xspec name="test-xslt-secondary" xmlns:xsl=http://www.w3.org/1999/XSL/Transform> <p:output port="result" pipe="result@end"/> <p:xslt name="an-xslt"> <p:with-input port="source"><p:empty/></p:with-input> <p:with-input port="stylesheet"> <p:inline expand-text="false"> <xsl:stylesheet version="3.0" exclude-result-prefixes="#all"> <xsl:template name="go"> <xsl:result-document> <go>FISH!</go> </xsl:result-document> </xsl:template> </xsl:stylesheet> </p:inline> </p:with-input> <p:with-option name="template-name" select="'go'"/> </p:xslt> <p:identity name="end"> <p:with-input port="source" pipe="secondary@an-xslt"/> </p:identity> </p:declare-step>
Received on Friday, 14 June 2024 15:36:55 UTC