All docs pages in a single XML file probably would be a great source for 
demonstrating full text search. ;)

By the way, you can fetch all pages in export format (is there any reader for 
that but a local mediawiki instance?) -- by using XQuery, of course:

    declare namespace xhtml = "http://www.w3.org/1999/xhtml";;
    declare namespace wiki = "http://www.mediawiki.org/xml/export-0.4/";;
    declare option db:parser "html";
    
    let $pages := fn:serialize(
      
doc("http://docs.basex.org/wiki/Special:AllPages";)//xhtml:table[@class="mw-allpages-table-chunk"]//xhtml:a,
      map { "method" := "text", "item-separator" := "\r\n" }
    )
    let $request :=
      <http:request href="http://docs.basex.org/index.php?title=Special:Export"; 
method="post">
        <http:body media-type="application/x-www-form-urlencoded" method="text">
          <![CDATA[catname=&curonly=1&wpDownload=1&pages=]]>{ 
fn:encode-for-uri($pages) }
        </http:body>
      </http:request>
    return http:send-request($request)//wiki:mediawiki

That code interprets the "All Pages" special page and feeds that list into the 
"Export" page.

Regards from Lake Constance, Germany,
Jens Erat

@Christian: We're definitely missing some HTTP-Post for form data example in 
the docs, `<http:body method="text"/>` was really hard to find.

-- 
Jens Erat

 [phone]: tel:+49-151-56961126
  [mail]: mailto:[email protected]
[jabber]: xmpp:[email protected]
   [web]: http://www.jenserat.de

     PGP: 350E D9B6 9ADC 2DED F5F2  8549 CBC2 613C D745 722B

 

Am 19.02.2013 um 22:33 schrieb Colin McEnearney <[email protected]>:

> It looks like recent versions of MediaWiki have an api enabled by default - 
> if you have a login you can use it to query the docs, etc.
> 
> I've just applied for one for docs.basex - if I find anything really cool 
> I'll post back. 
> 
> Thanks again,
> Colin
> 
> On Tue, Feb 19, 2013 at 3:11 PM, Christian Grün <[email protected]> 
> wrote:
> > I see that now on the homepage. Can I suggest that this link be repeated
> > under "print/export" in the left-hand menu?
> 
> Ok, done.
> 
> > And just out of curiousity, is there a way to get as data (markupl, csv,
> > etc.)  ?
> 
> If you find a way, I’d be interested as well ;) The MediaWiki homepage
> might be a good starting point [1].
> 
> Christian
> 
> [1] http://www.mediawiki.org/
> 
> _______________________________________________
> BaseX-Talk mailing list
> [email protected]
> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

_______________________________________________
BaseX-Talk mailing list
[email protected]
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

Reply via email to