Hi Adoro,

One you have something fully working, would be nice if you could  
contribute this back on code.xwiki.org as a code snippet.

Thanks
-Vincent

On Nov 14, 2008, at 4:58 PM, adoro wrote:

>
> Hi Sergiu,
> thank you so much for your help,
> the "wanted pages" query works fine if I use it for certain spaces:
>
> #set($sql= "select link.fullName, link.link.id from XWikiLink link  
> where
> link.fullName like 'MySpace.%' and not exists
> (select doc.fullName from XWikiDocument doc where doc.fullName =
> link.id.link) order by 1")
>
> #set($results= $xwiki.search($sql))
> #if ($results.size() == 0)
> #warning('Es gibt keine gewünschte Seiten')
> #else
> {table}
> Space|Document|Link
> #foreach ($row in $results)
>  #foreach ($col in $row)
>    #if ($velocityCount==1)
>     #set($docFullName=$col)
>    #elseif ($velocityCount==2)
>     #set($emptyLink=$col)
>     #set($el=$emptyLink.getLink())
>     #set($spaceName=$xwiki.getDocument($docFullName).space)
>     #end
>  #end
> $spaceName|[$docFullName]|$el
> #end
> {table}
> #end
>
> Best Regards,
> Alla
>
>
> Sergiu Dumitriu-2 wrote:
>>
>>
>> This should work:
>>
>> #set($query = "select link.id.link from XWikiLink link where not  
>> exists
>> (from XWikiDocument doc where doc.fullName = link.id.link)")
>> #foreach($item in $xwiki.search($query))
>> * $item
>> #end
>>
>> Note that several bad entries are placed there because the link
>> detection process does not pre-run velocity, so lots of entries  
>> actually
>> point to velocity variables or javascript code. Definitely the  
>> backlinks
>> need to be revised in the new rendering.
>>
>> Sergiu Dumitriu
>> http://purl.org/net/sergiu/
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to