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

shortcut attribute to define document properties #146

Open
rdeltour opened this issue Feb 14, 2015 · 6 comments
Open

shortcut attribute to define document properties #146

rdeltour opened this issue Feb 14, 2015 · 6 comments

Comments

@rdeltour
Copy link

Can it be considered to add a properties attribute to document-loader elements and steps (p:inline, p:document, p:load) to set the document's properties as a shortcut of later invoking p:set-properties ?

@ndw
Copy link
Collaborator

ndw commented May 27, 2015

The committee has mixed feelings about doing this now. If it turns out to be very common, then probably. Can you provide some explicit use cases?

@rdeltour
Copy link
Author

I don't remember the specific use case I had in mind, but basically use cases would be exactly the same where you'd use p:set-properties, as it's only a shortcut proposal.
It seemed like a low-hanging fruit, but I understand you need to prioritize.

@ndw
Copy link
Collaborator

ndw commented May 27, 2015

I think the sticking point is that the properties are naturally key/value pairs and having a shortcut attribute to set them would require having to microparse the attribute value. The current standing certainly isn't "no, we're not doing that"; it's more a case of finding out how common the case is whether it's really worth the effort.

@rdeltour
Copy link
Author

Fair enough. But since properties are map(xs:string,xs:string), don't you have the same micro-parsing issue anyway with the shortcut syntax of the properties option on p:set-properties?

@ndw
Copy link
Collaborator

ndw commented May 27, 2015

Oh, indeed. Brain cramp on my part. It would just be a map and we have a constructor syntax for maps. #facepalm

@rdeltour
Copy link
Author

Haha. BTW, I'm not super familiar with XPath 3, but a quick glance shows maps are introduced in XPath 3.1, and neither 3.0 nor 3.1 are referenced from XProc 2.0. Should #30 be reopened?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants