> Will there be a solution to display the result of inline queries
> produced by SemanticMediawiki oder DynamicPageList with the collection
> extension in the near future?
we do not have anything planned. so most probably the answer is no.
patches are welcome.
> I just discovered this problem for myself. I was hoping to use both
> the Dynamic Page List and Collection extensions; I would not like to
> have to choose one or the other.
>
> The dpl maintainers appear ready to cooperate with your suggestion
> that "patches are welcome", http://semeb.com/dpldemo/index.php?title=Issue_talk:Export_to_pdf
> , but they would need help to add this support. I assume, from your
> answer, that it would be possible.
>
> To get started, could provide a pointer to a discussion of what is
> required to support a new tag, such as dpl, in the mwlib parser?
Parsing a new tag is easy:
diff --git a/mwlib/refine/core.py b/mwlib/refine/core.py
index fa561a3..338ebf2 100755
--- a/mwlib/refine/core.py
+++ b/mwlib/refine/core.py
@@ -790,6 +790,9 @@ class parse_uniq(object):
txt = util.replace_html_entities(txt)
return T(type=T.t_text, text=txt)
+ def create_dpl(self, name, vlist, inner, xopts):
+ print "DPL:", (name, vlist, inner)
+
class XBunch(object):
def __init__(self, **kw):
self.__dict__.update(kw)
diff --git a/mwlib/uniq.py b/mwlib/uniq.py
index 5e73b6e..d5def22 100644
--- a/mwlib/uniq.py
+++ b/mwlib/uniq.py
@@ -60,7 +60,7 @@ class Uniquifier(object):
self.txt = txt
rx = self.rx
if rx is None:
- tags = set("nowiki math imagemap gallery source pre ref timeline".split())
+ tags = set("nowiki math imagemap gallery source pre ref timeline dpl".split())
from mwlib import tagext
tags.update(tagext.default_registry.names())
This lets me do:
>>> from mwlib.refine import core
>>> core.parse_txt("<dpl val=1>blabla</dpl>")
DPL: ('dpl', {'val': 1}, 'blabla')
[]
create_dpl would need to return a meaningful parse tree for the dpl tag
however.
Regards,
- Ralf
On Nov 18, 4:17 pm, Jan Schoonderbeek <saru...@gmail.com> wrote:
> On Wed, Nov 18, 2009 at 6:43 PM, Jeremy <jeremy.breid...@gmail.com> wrote:
>
> > On Nov 18, 11:07 am, Ralf Schmitt <r...@brainbot.com> wrote:
[snip]
--