Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.7.10 Syntax: add an AVT @value attribute to options, parameters, and variables #43

Closed
ndw opened this issue Aug 22, 2014 · 5 comments
Closed

Comments

@ndw
Copy link
Collaborator

ndw commented Aug 22, 2014

XProc 1.0 offers relatively few default behaviors, requiring instead that pipelines specify every construct fully. User experience has demonstrated that this leads to very verbose pipelines and has been a constant source of complaint. XProc 2.0 will introduce a variety of syntactic simplifications as an aid to readability and usability, including but not limited to:

Add an AVT value attribute to options, parameters, and variables (to be used instead of select)

@xproc xproc added the must label Aug 22, 2014
@ndw ndw added this to the XProc 2.0 LC milestone Aug 25, 2014
@ndw
Copy link
Collaborator Author

ndw commented Oct 3, 2014

On further reflection, I'm not sure this is a good idea. There's no parallel in XSLT, for example, and I've never heard anyone complaining about it. Seems to me that it could be quite confusing.

@rdeltour
Copy link

rdeltour commented Oct 3, 2014

If I may bring my user point of view: a place where I think AVTs would be really handy is in options syntactic shortcut attributes, in order to reduce the verbosity of p:with-option children.

For instance:

<p:add-attribute attribute-name="href" match="*">
    <p:input port="source">
      <p:inline>
        <c:request method="get"/>
      </p:inline>
    </p:input>
    <p:with-option name="attribute-value"
      select="concat('http://en.wiktionary.org/w/api.php?action=query&amp;titles=',
             encode-for-uri(.),
             '&amp;format=xml&amp;prop=extracts')" />
</p:add-attribute>

becomes

<p:add-attribute attribute-name="href" match="*" attribute-value="http://en.wiktionary.org/w/api.php?action=query&amp;titles={encode-for-uri(.)}&amp;format=xml&amp;prop=extracts">
  <p:input port="source">
    <c:request method="get"/>
  </p:input>
</p:add-attribute>

(ok, I cheat by using the inline syntax shortcut already ;)

Of course, the real issue there is that you lose backward compatibility with XProc 1.0...

Otherwise, for p:variable or p:with-option, I agree that an AVT attribute wouldn't bring a lot to the existing select attributes (especially thx to the new XPath 3.0 concat operator) and would be more confusing than useful. As for parameters it basically depends on how they're handled in 2.0.

@ndw
Copy link
Collaborator Author

ndw commented Oct 3, 2014

There's no question of doing AVTs in shortcut options (and possibly other places). There's a separate issue for that, #33. That's absolutely required. This issue is really just about a value attribute parallel to select and I find I don't have much enthusiasm for it.

@rdeltour
Copy link

rdeltour commented Oct 3, 2014

There's no question of doing AVTs in shortcut options (and possibly other places). There's a separate issue for that, #33.

Oh, sorry I missed that one.

This issue is really just about a value attribute parallel to select and I find I don't have much enthusiasm for it.

👍 Meh too

@ndw
Copy link
Collaborator Author

ndw commented Mar 26, 2015

At the 25 March telcon, we decided to close this issue without action. http://www.w3.org/XML/XProc/2015/03/25-minutes.html

@ndw ndw closed this as completed Mar 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants