Modify

Opened 9 years ago

Last modified 9 years ago

#11970 new defect

Possible problem when comparing key with a replace() value

Reported by: naoliv Owned by: team
Priority: normal Milestone:
Component: Core validator Version:
Keywords: mapcss Cc:

Description

Trying to validated the attached example file using this rule:

way[highway][ref][wikipedia][ref = replace(tag("wikipedia"), "pt:", "")] {
        throwError: tr("foo");
}

I don't see the expected error message.
Using println I can see that replace(tag("wikipedia"), "pt:", "") is giving the correct string (SP-225)

Am I missing something or there is some kind of problem here, please?

JOSM:

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2015-10-15 01:32:10
Last Changed Author: Don-vip
Revision: 8882
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Relative URL: ^/trunk
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2015-10-15 01:02:36 +0200 (Thu, 15 Oct 2015)
Last Changed Rev: 8882

Identification: JOSM/1.5 (8882 pt_BR) Linux Debian GNU/Linux testing (stretch)
Memory Usage: 707 MB / 9102 MB (443 MB allocated, but free)
Java version: 1.7.0_85, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-7-jre:amd64-7u85-2.6.1-3
VM arguments: [-Dawt.useSystemAAFontSettings=on]
Dataset consistency test: No problems found

Plugins:
- Create_grid_of_ways (31603)
- OpeningHoursEditor (31603)
- PicLayer (31603)
- RoadSigns (31603)
- SimplifyArea (31603)
- buildings_tools (31603)
- conflation (0.1.7)
- contourmerge (1013)
- download_along (31603)
- editgpx (31603)
- geotools (31603)
- imagery_offset_db (31603)
- importvec (31603)
- jts (31603)
- log4j (31603)
- measurement (31603)
- merge-overlap (31603)
- opendata (31241)
- pbf (31603)
- pdfimport (31603)
- poly (31603)
- reverter (31625)
- scripting (30710)
- todo (29154)
- turnrestrictions (31603)
- undelete (31603)
- utilsplugin2 (31603)

Attachments (1)

example.osm (522 bytes ) - added by naoliv 9 years ago.

Download all attachments as: .zip

Change History (3)

by naoliv, 9 years ago

Attachment: example.osm added

comment:1 by simon04, 9 years ago

This selector works:

way[highway][ref][wikipedia][tag("ref") = replace(tag("wikipedia"), "pt:", "")]

comment:2 by naoliv, 9 years ago

Hum... is it necessary to always use a tag() for cases like this?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to naoliv.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.