4 * Copyright 2007 $ThePhpWikiProgrammingTeam
6 * This file is part of PhpWiki.
8 * PhpWiki is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * PhpWiki is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with PhpWiki; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 * UriResolver/uri => xml-id
25 * This function transforms a valid url-encoded URI into a string
26 * that can be used as an XML-ID. The mapping should be injective.
27 * Inverse to RdfWriter::makeURIfromXMLExportId()
30 require_once('lib/SemanticWeb.php');
32 class WikiPlugin_UriResolver
36 return _("UriResolver");
39 function getDescription () {
40 return _("Converts an uri-escaped identifier back to an unique XML-ID");
43 function getDefaultArguments() {
47 function allow_undeclared_arg() {
51 function run($dbi, $argstr, &$request, $basepage) {
52 $args = $request->getArgs();
53 unset($args['pagename']);
54 unset($args['action']);
55 unset($args['start_debug']);
56 // FIXME: ?Test=1 => Test
57 $arg = join("/",array_keys($args));
58 $xmlid = RdfWriter::makeXMLExportId($arg);
68 // c-hanging-comment-ender-p: nil
69 // indent-tabs-mode: nil