Skip to content

Should [p:]message be an option? #672

@ndw

Description

@ndw

I was asked earlier today about how to make debugging messages appear only when a static $debug flag is true.

This works:

<p:identity use-when="$debug" message="Hi mom"/>
<ex:my-actual-step/>

But it's a bit clumsy and if ex:my-actual-step doesn't actually read the output of p:identity, there's the possibility that the message could be output after the step runs.

This would be nicer, in many ways:

<ex:my-actual-step>
  <p:with-option name="message" use-when="$debug" select="'Hi mom'"/>
</ex:my-actual-step>

It happens that I treat message attributes as a special kind of magic option (because that was the easiest way to implement the fact that they're AVTs) so XML Calabash allows this.

I don't think this is conformant with the spec, but should it be?

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