|
From: S P. <in...@sk...> - 2007-10-31 11:53:52
|
Folger, Deborah H wrote: > In the Special:Export page you can add pages from a Category. > I would like to add pages from a Namespace. > Please consider adding this function. That's an enhancement to MediaWiki, not the Semantic MediaWiki extension of it. You can join mediawiki-l mailing list to make the same request (see http://www.mediawiki.org/wiki/Communication ), and/or file it in the bugbase at http://bugzilla.wikimedia.org/ that SMW also uses. Since the add feature simply populates Special:Export's textarea, you might be able to run a query on another page to get all pages in a namespace and past them in. E.g. <ask format=table link=none>[[Help:+]]</ask> You could also take advantage of the regularity of the XML output from Special:Export to grab only certain namespaces. In perl, something like: #!/bin/perl undef $/; # slurp whole file; $file = <>; @pages = split(/<page>/, $file); for (@pages) { print "<page>\n$_" if (m/<title>(User|Help):/s) }; will only print the <page> tags that contain User: or Help: pages. You still have to surround with the mediawiki and siteinfo tags. It would probably be easier to do this kind of XML grep as a transform in XSL with an XPath, but I've forgotten XSL. -- =S Page |