After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 738070 - xmlTextReaderPreservePattern pattern error
xmlTextReaderPreservePattern pattern error
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: general
2.7.7
Other Linux
: Normal enhancement
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-07 09:35 UTC by gnigro
Modified: 2021-07-05 13:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bookstore xml file (848 bytes, text/xml)
2014-10-07 09:35 UTC, gnigro
Details

Description gnigro 2014-10-07 09:35:16 UTC
Created attachment 287937 [details]
bookstore xml file

xmlTextReaderPreservePattern does not compile simple xpath expressions  and return with code -1.

Reproduce steps:

1) compile reader3.c (http://xmlsoft.org/examples/index.html#reader3.c)
2) run with xpath expressions:

   reader3 bookstore.xml /bookstore/*                      (WORK)
   reader3 bookstore.xml /bookstore/book[1]                (NOT WORK) 
   reader3 bookstore.xml /bookstore/book[1]/title          (NOT WORK)
Comment 1 Daniel Veillard 2014-10-07 10:04:25 UTC
* @pattern:  an XPath subset pattern

This is a libxml2 pattern, the patterns are subset of XPath and defined
in XMLSchemas 1

http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#coss-identity-constraint

[1]   	Selector	   ::=   	Path ( '|' Path )*	
[2]   	Path	   ::=   	('.//')? Step ( '/' Step )*	
[3]   	Step	   ::=   	'.' | NameTest	
[4]   	NameTest	   ::=   	QName | '*' | NCName ':' '*'	

this allows streaming but doesn't allow selection based on index.
Maybe the patterns could be expanded for that purpose but noone
is working on an enhancement there.

Certainly not 'critical' from a severity POV

Daniel
Comment 2 gnigro 2014-10-07 10:25:57 UTC
Perhaps libxml2 documentations could be more clear about, because the W3C recommendations do not speak of "subset pattern" (too much generic).
Hope in an enhancement.
Comment 3 GNOME Infrastructure Team 2021-07-05 13:25:29 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/libxml2/-/issues/

Thank you for your understanding and your help.