Re: [PEPr] Comment on XML::XML_FastCreate

From: Date: Mon, 19 Apr 2004 09:12:17 +0000
Subject: Re: [PEPr] Comment on XML::XML_FastCreate
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-27989@lists.php.net to get a copy of this message
Comments on comments - havent had time to look at the code yet..
Hi, I really lik the package, but there are still some issues I have: 1. HTML attribute
Specify single attribute with the null value. $x->input(array(type=>'checkbox', checked=>null)) = <input type="checkbox" checked />
AFAIK xhtml valid sytnax was checked="checked", html valid is just 'checked' (without the />) - I normally use checked=true to indicate that its a attribute without a value. , and check for === true.
This is not valid, neither in XML nor in XHTML :-( I don't know how to solve this, but maybe a flag to switch on HTML (without the X) compatibility would be nice.
the closing /> can sometimes break html - I cant remember the example of hand, but it does cause havoc sometimes..
2. Method names
$x->comment() and other methods
That means, it's not possible to create a tag <comment/>. I got no good solution for this problem either :-( Maybe some kind of prefixing should be used, using '_' would be great if this would not indicate a private method.
-- just leave it out.. - if you send a string down the line to the method, I presume it would treat it as raw HTML?? - or does it encode it... (html escaped would be a good idea, but you could check for stirngs starting with <!-- ....
I know that you mainly started this project to create HTML, but as it's in the XML category, a lot of people (including me), would possible like to create any XML document with it... 3. Error reporting Please use PEAR::raiseError() or the new Error_Stack to report errors, instead of a switch/case statement. If you could fix these issues (at least the third) I will vote a strong +1 for the package. Stephan
-----Original Message----- From: Guillaume Lecanu [mailto:Guillaume.Lecanu@Online.fr] Sent: Montag, 19. April 2004 10:30 To: PEAR developer mailinglist Subject: Re: [PEAR-DEV] [PEPr] Comment on XML::XML_FastCreate Hi ! Before i change the status to "Call for votes", i would know if anybody have propositions or remarks about XML_FastCreate and my PHP structure/syntax. Thanks for your help ! :) Quick overview of this package :
http://lya.no-ip.com/pear/XML_FastCreate/tests/example1.php
Le lun 19/04/2004 à 00:32, PEPr a écrit :
Guillaume Lecanu (http://pear.php.net/user/neokod) has
commented on the proposal for XML::XML_FastCreate.
Comment: I have added many changes following your advices : - Factory to choose the output driver ( Text or XML_Tree ) - Auto quote attributes and contents ( you can disable this option ) - Simple XML translation option - PHP Script to convert HTML to FastCreate syntax ( a file
or a text selection under your editor )
Quick overview of this package : http://lya.no-ip.com/pear/XML_FastCreate/tests/example1.php Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=47 -- Sent by PEPr, the automatic proposal system at http://pear.php.net
-- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

« previous php.pear.dev (#27989) next »