- From: Piez, Wendell A. (Fed) <wendell.piez@nist.gov>
- Date: Fri, 14 Jun 2024 21:09:09 +0000
- To: "Piez, Wendell A. (Fed)" <wendell.piez@nist.gov>, XProc Dev <xproc-dev@w3.org>
- Message-ID: <SA9PR09MB5824C2FA7371EFFD521D052BFFC22@SA9PR09MB5824.namprd09.prod.outlook.com>
Hello - An update to my update - I am now patching the XSLT before executing it: <p:add-attribute name="adjusted-runtime" match="/*/xsl:template[@name='Q{{http://www.jenitennison.com/xslt/xspec}}main']/xsl:result-document" attribute-name="href" attribute-value="report" xmlns:xsl=http://www.w3.org/1999/XSL/Transform /> The modified XSLT delivers its result to the 'secondary' port and we can proceed as planned. Thanks for reading, comments welcome. Cheers, Wendell From: Piez, Wendell A. (Fed) <wendell.piez@nist.gov> Sent: Friday, June 14, 2024 11:37 AM To: XProc Dev <xproc-dev@w3.org> Subject: RE: Seeing nothing on the secondary port on an xslt step 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<mailto:wendell.piez@nist.gov>> Sent: Friday, June 14, 2024 10:33 AM To: XProc Dev <xproc-dev@w3.org<mailto: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 21:09:23 UTC