[issue32476] Add concat functionality to ElementTree xpath find

2020-04-12 Thread Stefan Behnel


Stefan Behnel  added the comment:

I think the use case of quote escaping is too niche for a feature like 
concat(), where I (at least) would expect to be able to dynamically concatenate 
text content, not just constant strings.

There seem to be at least a few alternatives to the usage of concat():

https://stackoverflow.com/questions/12403870/how-to-escape-single-quote-in-xslt-substring-function

https://sqa.stackexchange.com/questions/26341/how-to-write-xpath-if-i-have-apostrophe-in-my-xpath-element

I think we should either implement concat() completely, or provide a different 
way to solve the concrete problem at hand.

--
versions: +Python 3.9 -Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32476] Add concat functionality to ElementTree xpath find

2018-03-16 Thread Stefan Behnel

Stefan Behnel  added the comment:

I can't see why this should be restricted to attribute values and not text 
content in general. Therefore, I would suggest adding general support for 
functions, and making this only a special case. Otherwise, this would only 
solve a very niche problem, and would require pretty much a rewrite in order to 
extend it into the "obvious" direction.

--
components: +XML

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32476] Add concat functionality to ElementTree xpath find

2018-01-31 Thread Ned Deily

Ned Deily  added the comment:

Sorry, I think this qualifies as a new feature and thus needs to go in 3.8.  
Plus it should get a wider review from those with ET experience.  Perhaps 
@scoder would be willing go take a look.

--
nosy: +scoder
versions:  -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32476] Add concat functionality to ElementTree xpath find

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

I think (but not sure) that your feature will be included in 3.8 because 3.7 
has been frozen today :/

@ned do you think you could integrate this functionality in 3.7 or 3.8 ?

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32476] Add concat functionality to ElementTree xpath find

2018-01-30 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32476] Add concat functionality to ElementTree xpath find

2018-01-30 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32476] Add concat functionality to ElementTree xpath find

2018-01-30 Thread John Jolly

John Jolly  added the comment:

I understand that the feature is likely too late, but I do not want it to get 
lost. Is there any way to make certain this feature is accepted for the next 
release? Do I just select the 3.8 version for this issue?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32476] Add concat functionality to ElementTree xpath find

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

as explained on the PR, maybe you could add in the documentation.

..versionadded:: 3.7
Support of the XPath concat function

but maybe your PR is too late because 3.7 starts to be in the frozen period for 
the features.

--
nosy: +matrixise

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32476] Add concat functionality to ElementTree xpath find

2018-01-20 Thread John Jolly

Change by John Jolly :


--
pull_requests: +5098
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32476] Add concat functionality to ElementTree xpath find

2018-01-12 Thread John Jolly

Change by John Jolly :


--
nosy: +eli.bendersky

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32476] Add concat functionality to ElementTree xpath find

2018-01-01 Thread John Jolly

New submission from John Jolly :

The current implementation of the xpath specification in ElementTree does not 
allow for predicates that may contain both an apostrophe and a quote. Either 
one or the other is allowed, but escaping (either string escaping using the 
backslash or html escaping) is not supported.

A simple solution would be to implement the xpath concat function for 
predicates. This would allow the combination of quote types in the predicate. 
Attached is a proposed patch for this fix.

--
components: Library (Lib)
files: etree-concat.patch
keywords: patch
messages: 309344
nosy: jjolly
priority: normal
severity: normal
status: open
title: Add concat functionality to ElementTree xpath find
type: enhancement
versions: Python 3.7
Added file: https://bugs.python.org/file47360/etree-concat.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com