View Single Post
  #1 (permalink)  
Old September 24th, 2004, 07:46 AM
joefawcett's Avatar
joefawcett joefawcett is offline
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default resolve-Qname in XPath 2.0 by M. Kay

Dear Michael

In the functions glossary (page 404) I'm trying to understand the example:
Code:
<doc xmlns:one="one.uri" xmlns="default.uri">
  <chap xmlns="" att-one="text">
    <data-one>one:value</data-one>
    <data-two>value</data-two>
  </chap>
</doc>
variables:
$chap /doc/chap
$data1 /doc/chap/data-one
$data2 /doc/chap/data-two

You then show
Code:
resolve-QName(Schap/@att-one, $chap)
as returning (in Clark notation)
Code:
{default.uri}text
.
I don't follow, isn't there no default namespace on $chap so the function returns
Code:
{}text
, or have I misunderstood?

--

Joe
__________________
Joe
http://joe.fawcett.name/