Skip to content

The description of p:message is ambiguous #694

@ndw

Description

@ndw

The descriptions says:

If exactly one document appears on the source port, it is the context item when the test and select expressions are evaluated. In all other cases, the context item is undefined.

That could be interpreted to mean that this is a correct pipeline:

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" 
    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    version="3.1">
    <p:output port="result" />
    
    <p:message test="true">
        <p:with-option name="select" select="/doc" />
        <p:with-input port="source"><doc >3</doc></p:with-input>
    </p:message>
        
</p:declare-step>

That would require making the select option a special case where the context is determined inside the step. I don't think we want to do that; the select option is a completely ordinary option. I think the spec is just carelessly worded, and, on reflection, for no good reason.

Just delete that paragraph, I think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions