- From: Piez, Wendell A. (Fed) <wendell.piez@nist.gov>
- Date: Fri, 10 Jan 2025 16:16:28 +0000
- To: XProc Dev <xproc-dev@w3.org>
- Message-ID: <SA9PR09MB58241D70AFD120879C29F72AFF1C2@SA9PR09MB5824.namprd09.prod.outlook.com>
Hello, One answer at least to what I just asked is Yes: <p:declare-step name="report-status" type="ox:report-status"> <p:input port="source"/> <p:output port="result"/> <p:identity message="[STATUS REPORT] SEEING '{ p:document-property(.,'content-type') }' AT { p:document-property(.,'base-uri') }"/> </p:declare-step> This is arguably more XProc-like although I'm still curious about the variable scoping issue (and variance between processors). Thanks, Wendell From: Piez, Wendell A. (Fed) <wendell.piez@nist.gov> Sent: Friday, January 10, 2025 11:02 AM To: XProc Dev <xproc-dev@w3.org> Subject: Functions binding to XProc variables Hello, In a diagnostic pipeline I have this at the head of the subpipeline: <p:variable name="ox:document-info" as="function(*)" select="function($d as item()) as xs:string { p:document-property($d,'content-type') || ' at ' || p:document-property($d,'base-uri') }"/> When I use it like this <p:identity message="[CONTENT-TYPE-worksheet] Seeing { $ox:document-info(.) }"/> I get an error back from XML Calabash (3.0.0-alpha14) Fatal err:XD0030: Step failed: "A function created under one Configuration cannot be called under a different Configuration". at file:/mnt/c/Users/wap1/Documents/usnistgov/oscal-xproc3/tutorial/worksheets/CONTENT-TYPE_worksheet.xpl:5:5 But Morgana XProc IIIse v1.4 evaluates the function returning the value I expect (and indeed different values as they trace the pipeline's changes to the properties). Which one is correct? Should I be thinking of another way of accomplishing my goal? In line with what I just said in the other thread, should I just cook up a custom identity step? (I will try that next.) Thanks for any insights, Wendell
Received on Friday, 10 January 2025 16:16:34 UTC