Hi Dak,

there is nothing wrong with selecting the attribute, but there’s a difference 
between the following XPath expressions:
> <x id="b" />/@id

and
> <x id="b" />/@id/string()

As you observed the former selects an attribute while the latter selects that 
attribute’s string() value.

The same holds for:
>>          <div>
>>              {$college/name}
>>          </div>
which will return something among the lines of:
>>          <div>
>>              <name>Foo</name>
>>          </div>
as it selects the <name /> element, not the  $college/name/text() which might 
be what you want actually.

Nevertheless, viewing <div><name>Foo</name></div> in a browser will most 
probably render the correct results to the viewer anyway.

I hope this helped clear things up a little .-)

Best 
Michael

Am 23.05.2013 um 11:01 schrieb Mailing Lists Mail <[email protected]>:

> Hi Mike/ JOhn/
> 
> As far as my knowledge went, i did not think anything was wrong as
> calling a child element should be the same as calling attribute for
> practical purposes.
> I will try to reproduce the issue with something smaller. In the
> meantime, I shall try John's suggestion..,
> 
> Thanks both for your replies.
> Dak

_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to