Skip Menu |

This queue is for tickets about the XML-XSLT CPAN distribution.

Report information
The Basics
Id: 47628
Status: resolved
Priority: 0/
Queue: XML-XSLT

People
Owner: Nobody in particular
Requestors: IKEGAMI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Doesn't allow spaces in "[]" expression.
Paths such as the following don't work because the XPath parser expects no spaces in "[]" expressions: /PLMXML/Form[@subType='Part Revision Master'] A suitable workaround, if not solution: - elsif ( $path =~ s/^\/(child\:\:|)(\*|[\w\.\:\-]+)\[(\S+?)\]// ) + elsif ( $path =~ s/^\/(child\:\:|)(\*|[\w\.\:\-]+)\[(.+?)\]// ) Ref: http://www.perlmonks.org/?node_id=777640
The above needs the /s modifier. And the same bug is present in at least one other location: elsif ( $path =~ -s/^\/descendant\-or\-self\:\:node\(\)\/(child\:\:|)(\*|[\w\.\:\-]+)\[(\S+?)\]// +s/^\/descendant\-or\-self\:\:node\(\)\/(child\:\:|)(\*|[\w\.\:\-]+)\[(.+?)\]//s )
On Mon Jul 06 16:56:46 2009, ikegami wrote: Show quoted text
> Paths such as the following don't work because the XPath parser expects > no spaces in "[]" expressions: > > /PLMXML/Form[@subType='Part Revision Master'] > > A suitable workaround, if not solution: > > - elsif ( $path =~ s/^\/(child\:\:|)(\*|[\w\.\:\-]+)\[(\S+?)\]// ) > + elsif ( $path =~ s/^\/(child\:\:|)(\*|[\w\.\:\-]+)\[(.+?)\]// ) > > > Ref: http://www.perlmonks.org/?node_id=777640
Hi, I've belatedly applied this as https://github.com/jonathanstowe/XML-XSLT/commit/d1542179a6f0c440137e20e2122fbbeead8bf61c It should make a developer release this week