FOTS: fn:unparsed-text-lines bug

Bug #1073091 reported by Sorin Marian Nasoi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Critical
Juan Zacarias

Bug Description

the query:
fn:unparsed-text-lines("http://www.example.org/#fragment")
should return err:FOUT1170 instead it returns a result.

The error conditions for fn:unparsed-text-lines are the same as for fn:unparsed-text, see:
http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text
Error Conditions
    An error is raised [err:FOUT1170] if $href contains a fragment identifier, or if it cannot be used to retrieve a resource containing text.

Assigning to Juan because according to bzr blame he implemented the function.

Tags: fots

Related branches

Changed in zorba:
importance: Undecided → Critical
milestone: none → 2.8
Revision history for this message
Juan Zacarias (juan457) wrote :

The query:
fn:unparsed-text("http://www.example.org/#fragment") also returns something.
Is is this also a bug?

Revision history for this message
Juan Zacarias (juan457) wrote :

Is unparsed-text and unparsed-text-lines are supposed to return an error if it is not a well formed xml? Is that what the error means?

Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) wrote :

The bug message mentions that there are errors in the implementation of the fn:unparsed-text-lines (and fn:unparsed-text for that matter as you point out).

When a URI with a fragment identifier 'http://www.example.org/#fragment' is passed as an argument to fn:unparsed-text-lines/ fn:unparsed-text there is no error [err:FOUT1170] returned as the latest F&O spec mentions.

Please take a look in the implementation of these 2 functions and see if they are implemented according to the spec:
http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text
http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-lines
http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-available

Also please take into account that fn:unparsed-text is also used in the FOTS driver so any error in the implementation of this function may also reflect in the driver behaviour.

One quick thing you could to is to run all FOTS tests for fn:unparsed-text/fn:unparsed-text-lines/fn:unparsed-text-available and make sure the ones that fail are not caused by Zorba:

/zorba
-f -q ../../test/fots_driver/cli.xq
-e fotsPath:=PATH_TO/2011/QT3-test-suite/catalog.xml
-e mode:=run-test-sets
-e testSetPrefixes:=fn-unparsed-text
-e verbose:=false
-o result.xml
--indent

Changed in zorba:
milestone: 2.8 → 2.9
Chris Hillery (ceejatec)
Changed in zorba:
status: New → Fix Committed
Chris Hillery (ceejatec)
tags: removed: core-runtime
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.