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

consider making the match attribute default to '/*' for p:add-attribute etc. #160

Open
gimsieke opened this issue May 26, 2015 · 1 comment
Milestone

Comments

@gimsieke
Copy link

In 1.0, only p:insert has a default of '/' for the match attribute, and p:label-elements defaults to . For most other steps with a match option, this option is required and does not have a default value. I find myself using match="/" most of the time, at least with p:add-attribute. Will it harm to make match default to '/' for p:add-attribute and several other steps listed below? The reason is: it reduces verbosity (a bit) without introducing too much arcane magic.

step currently has default? proposed default
p:add-attribute no '/*'
p:delete no pobably none
p:hash no '/*' (unless p:hash gets a select option that allows hashing string values calculated from the select expression)
p:insert yes '/*'
p:label-elements yes '*'
p:make-absolute-uris no probably none
p:rename no '/*' (not sure about this)
p:replace no probably none
p:set-attributes no '/*'
p:string-replace no '/*'
p:unwrap no '/*'
p:uuid no '/*'
p:wrap no / (not sure about this)
p:www-form-urlencode no probably none

Proposed changes are boldface.

@josteinaj
Copy link

Would be great to have more defaults. Definitely /* for p:add-attribute, p:rename and p:unwrap (as you suggest).

For p:string-replace though /* will basically always result in a XD0001 error. Something like /*/text() would be more useful for the simple cases.

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

3 participants