[reportlab-users] pyRXP and processing instructions
Dinu Gherman
reportlab-users@reportlab.com
Tue, 4 Mar 2003 11:26:11 +0100
Andy Robinson:
> We originally thought of pyRXP as "read only" but many people
> seem to want to rewrite XML. If you want to rewrite, then you
> need a richer model, as well as offsets into the original file
> to locate the positions spanned by tags. This could lead to
> super-fast-and-accurate rewriting by saying "this tag is unchanged,
> just echo out the text it originally came from"...
I did some rewriting and it kind of works if you don't expect
the resulting XML to be 100 % identical to the "original", but
only in some "canonical" sense. I found whitespace issues to be
one dominating brain teaser here.
Another is what to do with default values (defined in the DTD)?
They tend to rapidly "pollute" your tuple tree attributes, but
should not be rewritten to a flat XML file... Attribute order
can also be some kind of an issue.
Maintaining original tag indices... well, honestly I'm more in-
terested in UTF-8 support, which RXP seems to provide.
Dinu
--
Dinu C. Gherman
......................................................................
"I never apologize for the United States of America, I don't care what
the facts are." (George Bush, Sr.)