This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2515 - fn-lang-2 expects a context node
Summary: fn-lang-2 expects a context node
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.8.0
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Carmelo Montanez
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-12 17:37 UTC by Michael Kay
Modified: 2006-06-22 12:57 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2005-11-12 17:37:42 UTC
Test fn-lang-2 as written fails because the context item is not set.

I suggest changing the test from 

fn:count(fn:lang(()))

to

($input-context1//*)[1]/fn:lang(())

Note that the call on count() is unnecessary: fn:lang(()) will return false.
Comment 1 Andrew Eisenberg 2005-11-15 13:02:44 UTC
Or mark context="implicit" for this test case.
Comment 2 Carmelo Montanez 2005-11-15 14:04:43 UTC
Actually the correct version of fn-lang somehow got lost between my production 
area and the CVS repository.  I submitted the correct version this morning, 
which read as:

"
(: Name: fn-lang-2:)
(: Description: Evaluation of the fn:lang function with testlang set to empty 
sequence:)
(: Uses fn:count to avoid empty file.    :)

(: insert-start :)
declare variable $input-context1 external;
(: insert-end :)

fn:lang((), $input-context1/langs/para[1])"

Thanks,
Carmelo