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 3282 - what does fn-prefix-from-qname-8 test?
Summary: what does fn-prefix-from-qname-8 test?
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.9.0
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-12 21:30 UTC by Marc Van Cappellen
Modified: 2006-07-06 13:07 UTC (History)
1 user (show)

See Also:


Attachments

Description Marc Van Cappellen 2006-05-12 21:30:56 UTC
What aspect is prefix-from-qname-8 testing.
The description says:
  (: Description: Evaluation of fn-prefix-fromQName function with a prefix that is not defined. :)

The query is as follows:
  fn:prefix-from-QName(xs:QName("foo:bar"))

According to the catalog XPST0003 is expected. We believe this query tests the xs:QName constructor where the prefix in the literal is not declared. As such FONS0004 should be expected.

As started in the description, it is unclear what the purpose of this test is. Especially as the current approach doesn't seem to test fn:prefix-from-QName().

Regards,
Marc
Comment 1 Carmelo Montanez 2006-05-15 20:43:13 UTC
Marc:

Thanks for the comment.  Although, I agree the give error code is in correct,
it will seems as though "XPST0081" is more appropriate.  Please comment.

Thanks,
Carmelo
Comment 2 Marc Van Cappellen 2006-05-15 20:57:02 UTC
No, I believe FONS0004 is the correct one. This query invokes a constructor functions xs:QName, passing it an xs:string "foo:bar".
As such the following applies: http://www.w3.org/TR/xquery-operators/#constructor-functions. And here we read:
...
The prefix within the lexical xs:QName supplied as the argument is resolved to a namespace URI using the statically known namespaces from the static context. If the lexical xs:QName has no prefix, the namespace URI of the resulting expanded-QName is the default element/type namespace from the static context. Components of the static context are discussed in Section C.1 Static Context ComponentsXP. A static error is raised [err:FONS0004] if the prefix is not bound in the static context. As described in Section 2.1 TerminologyDM, the supplied prefix is retained as part of the expanded-QName value.
...

Thanks
Marc
Comment 3 Carmelo Montanez 2006-05-16 14:43:06 UTC
Frans:

TYhanks for the explanation. Code changed to FONS0004.  Please close
bug if in agreement.

Carmelo
Comment 4 Tom Brosens 2006-06-20 12:46:39 UTC
Carmelo,

The expected error code in XQTS 0.9.4 is still XPST0003, can it be changed to FONS0004 please.

Thanks,
Tom.
Comment 5 Carmelo Montanez 2006-06-20 20:47:03 UTC
All:

Catalog file changed to reflect FONS0004.

Thanks,
Carmelo
Comment 6 Tom Brosens 2006-07-06 13:07:43 UTC
Issue verified and indeed fixed! Closing.

Thanks,
Tom.