[reportlab-users] pyRXP and processing instructions
Andy Robinson
reportlab-users@reportlab.com
Tue, 4 Mar 2003 23:17:57 -0000
> My suggestion is that we return
> comments and processing instructions as
>
> ('<!--',None,['comment text'],None)
> and
> ('<?',None,['name','processing instruction text'],None)
>
> An alternative for the latter would be
>
> ('<?',{name: 'name'},['processing instruction text'],None)
>
Both fine by me. It's clear that the concept for pyRXP circa 1.0 is
a fairly homogeneous tree of primitive Python types; you should set
parser flags to decide whether XML constructs come straight through
as text or nodes. This does not rule out a pyRXP 2.0 with objects one
day, but not right now :-)
Robin, while looking at it next, can you find out the feasibility
of exposing namespace support? I suppose there are a gazillion
things one could do, but the one which interests me most is
"parse the tree for all tags with namespace prefix x, and leave
all others tags as unparsed text..."
(The reason for this is we are considering an XML variant of
our preppy preprocessor, similar to JSTL logic constructs
like <c:if...>. If you can flip to an XML representation
of a basic macro preprocessor, you can then use many good
XML editing tools for things like PythonPoint or RML, and
implement loops and conditionals easily).
I have one question for all pyRXP users. What's the oldest Python
version you are using pyRXP with? Anyone on 1.5.2? Would anyone
be worried if we made a separate utilities module to go with
pyRXP which required 2.2 and thus allowed some neat new features?
- Andy