[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta-devel
Subject:    Re: [quanta-devel] Re: Using KDOM in Quanta
From:       Leo Savernik <l.savernik () aon ! at>
Date:       2005-06-08 21:23:55
Message-ID: 200506082324.01480.l.savernik () aon ! at
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Am Dienstag, 7. Juni 2005 13:09 schrieb Frans Englich:
> On the topic of parsing PHP and so forth; one way is to let the builder(if
> you use KHTML, you could inherit from KHTMLDocumentBuilder such that your
> builder can play nice with KHTML), and let it build specialize processing
> instructions, "QuantaPHPProcessingInstructionImpl", for PIs with name
> "php", and register each such node in a list in the "QuantaDocumentImpl".
> In this way you can quickly loop over all php instructions(without having
> to walk the tree), and access the PHP code as strings, which you can invoke
> a PHP parser on(and attach any data structures created from the PHP parsing
> on the QuantaPHPProcessingInstructionImpl, perhaps).
>
> This is a difficult and confusing topic!

This is even more difficult. As you can do sick things with php like

<?
function foo() {
  echo 'href="'.fancyUrl().'">'.fancyDescription()."</a>"
}
?>
...
go to <a<? foo() ?> and bar it ...

you'll get a valid document in the delivered output, but you'll never get a 
valid xml/html document on the server side. Hence, you cannot represent PHP 
processing instructions like static nodes within the DOM tree.

mfg
	Leo

[Attachment #5 (application/pgp-signature)]

_______________________________________________
quanta-devel mailing list
quanta-devel@kde.org
https://mail.kde.org/mailman/listinfo/quanta-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic