[rkward-devel] a new approach to external plugins

meik michalke meik.michalke at uni-duesseldorf.de
Thu Sep 1 14:55:48 UTC 2011


hi,

thanks for the suggestions!

am Donnerstag 01 September 2011 (12:24) schrieb Thomas Friedrichsmeier:
> On Saturday 27 August 2011, meik michalke wrote:
> > and non-empty tags without value or children turn into empty tags, i need
> > to preserve that type info someway.

i fixed that one in the meantime, <tag></tag> doesn't become <tag /> any more. 
it was rather trivial, i just add an empty value (""). so i guess only the 
mixed text/tags issue is left.

> 1) You could treat text fragments as a sort of "pseudo" node

yes, i do -- at least i think i do ;-) it just doesn't really work yet, but i 
didn't look into that in detail. it probably is only an issue of how this 
pseudo node is designed, i might have done that too sloppy (cause it was of no 
practical relevance to me yet).

> Perhaps you'd keep one list of true child elements, and one list of all
> child fragments, where fragments can either be plain character, or a tag
> representation.

the problem is to decide what is a true child and what only a fragment. it's 
probably the easiest, most transparent solution to make everything a child 
node. there are different types already, like empty tags, dtd or xml 
declarations. in theory this should work.

> 2) The text representation could simply strip all child tags. See e.g. 
> http://doc.qt.nokia.com/4.6/qdomelement.html#text . Certainly not ideal,
> but  it could be a start.

at least it wouldn't break the parsing any more. if i can't get the above idea 
to work i'll maybe think of this as a temporary workaround. in the end, of 
course, a document should be functionally equal to the original after it was 
parsed and pasted back again.

> > compared to the XML package this one's really primitve, i don't know if
> > it's meant for CRAN?
> 
> Well, given that there are installation problems with the XML package, I
> could  certainly imagine there is a demand for a simple XML package, which
> may not cover everything, but "just works".

hm, ok ;-) when i'm convinced it really just works, i'll put it up on CRAN.


viele grüße :: m.eik

-- 
dipl. psych. meik michalke
institut f"ur experimentelle psychologie
abt. f"ur diagnostik und differentielle psychologie
heinrich-heine-universit"at d-40204 d"usseldorf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20110901/0cd65540/attachment.sig>


More information about the Rkward-devel mailing list