From: <ba...@dc...> - 2003-02-20 09:25:46
|
mmm, finally what you suggest: notices/notice[.//sencence &= 'house']/author is the same as i suggest: /notices/notice//sencence[. &= 'house']../../author and it doesn't return the same number of authors than sencences, so we don't know which author corrsponds to each sentence. I think the solution is what you have said, a nested query. You get all notices that contains sencences with the word 'house', and for each notice, you query for the sencences. Then you can compound the result. The problem with this solution is that if you have an additional level in the tree, for example, the first level tag is newspaper, and this newspaper has a publication year, and you want to show this year together with the sencences, you have to make three loops: 1) Get the newspapers that have sentences that contain the word 'house'. 2) For each newspaper, get the notices that have sentences that contain the word 'house'. 3) For each notice, get the sencences that contain the word 'house'. And finally, we can compound the result. But i don't see any other solution. Mario Barcala |