Hi,
if you query data from deep websites, you almost always end up with a long get-link-download chain like:

doc("http://example.org";) // a [ condition 1 ] / doc( @href) //a [ condition 2 ] / doc(@href) //a [ condition 3 ] / doc(@href) / ....

Half the query is a / doc( @href) filler.
It is really ugly, isn't it?

How about replacing / doc( @href) with a single map operator? (or more general / doc((@href,@src,@action)[1])

Like ~

Looks much better:

doc("http://example.org";) // a [ condition 1 ] ~ //a [ condition 2 ] ~ //a [ condition 3 ] ~ / ....

Or !!

doc("http://example.org";) // a [ condition 1 ] !! //a [ condition 2 ] !! //a [ condition 3 ] !! / ....

Does it not?



What do you think?

I guess the WG is not going to add it soon? Are any other ~ or !! operators planed? Because it would be a shame to add it in an implementation, and then get XQuery 4, where there is a ~ operator that does something completely different.

Best,
Benito

_______________________________________________
talk@x-query.com
http://x-query.com/mailman/listinfo/talk

Reply via email to