In the XPath spec, it says that "A node test node() is true for any node of any 
type
whatsoever." (http://www.w3.org/TR/xpath/#node-tests).

So how come the attribute is not included in the following code:

let $example := <bob time="now">Hello</bob>
return <results>{$example/node()}</results>

=> <results>Hello</results>



but it is included in this code:

let $example := <bob time="now">Hello</bob>
return <results>{$example/@*}</results>

=> <results time="now"/>



So to get attributes and all other nodes I'd have to do :

let $example := <bob time="now">Hello</bob>
return <results>{$example/(@*|node())}</results>

=> <results time="now">Hello</results>


What am I missing?


Thanks,
Ryan
                                          
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to