wrong uri resolution with fn:resolve-uri()

Bug #1015468 reported by Dennis Knochenwefel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Medium
Luis Rodriguez Gonzalez

Bug Description

the following query:

  resolve-uri("#id","file:///test.xml")

returns:

  file:///?#id

1. the question mark doesn't look right
2. I might be wrong, but I think the correct result should be "file:///test.xml#id"

Related branches

Changed in zorba:
milestone: none → 2.8
Chris Hillery (ceejatec)
Changed in zorba:
milestone: 2.8 → 2.9
Revision history for this message
Dana Florescu (dflorescu) wrote :

Chris, when you solve this, please scan the LP bush for wrong uri resolution bugs. There are 4 or 5.

Chris Hillery (ceejatec)
Changed in zorba:
assignee: Chris Hillery (ceejatec) → Luis Rodriguez Gonzalez (kuraru)
Revision history for this message
Chris Hillery (ceejatec) wrote :

Luis, you've been working in the URI class lately, so maybe you can track this down. The problem will be somewhere in URI::resolve(). That function gets called a number of times during Zorba's setup, but if you set a breakpoint after the initial if (is_absolute()) check, you'll get straight to the call that doesn't work right.

Changed in zorba:
status: New → In Progress
Revision history for this message
Luis Rodriguez Gonzalez (kuraru) wrote :

There is a comment in the code that is not working fine that says that Xerces is not removing the last segment of the path (before the last "/") src/zorbatypes/URI.cpp line 1316, but actually it seems that the patch for this situation is the one causing the error. I'm not sure if the right solution is to remove such patch.

Revision history for this message
Luis Rodriguez Gonzalez (kuraru) wrote :

After chatting with Chris by email, we got to the conclusion that file:///test.xml#id is the correct expected output, so I added some code to manage the case when the remaining from the last "/" is empty.

Changed in zorba:
status: In Progress → Fix Committed
Chris Hillery (ceejatec)
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.