Comments for "XML_FastCreate"

» Submit Your Comment
Comments are only accepted during the "Proposal" phase. This proposal is currently in the "Finished" phase.
» Comments
  • Justin Patrin  [2004-04-08 00:00 UTC]

    Can't download the package file (Forbidden).

    Also, could you please put up a phps of FastCreate.php?
  • Guillaume Lecanu  [2004-04-08 10:55 UTC]

    I have fixed the problem of pear packaging (thanks to Stefan Neufeind & Stephan Schmidt).
    Now, you can try the package :)

    To the merging XML-RPC question, the problem of merging or not is open.
    We can make an alpha branch of the XML-RPC package.
  • Guillaume Lecanu  [2004-04-08 11:00 UTC]

    Oops sorry for this last comment ! :(

    The XML_FastCreate package is now ready to tests.
  • Guillaume Lecanu  [2004-04-09 08:13 UTC]

    I have add to the package a perl script for vim users (adaptation to others editors is possible).

    This script convert an HTML text selection to the XML_FastCreate style.
    Just select the text, and press the shorcut sequence :)

    # Before :

    <table border=1 width="40%">
    <tr>
    <td>
    <span> Hello </span>
    </td>
    <td align='center'>
    <span> World </span>
    </td>
    </tr>
    </table>


    # After shorcut sequence :

    $x->table(array('width'=>"40%", 'border'=>1),
    $x->tr(
    $x->td(
    $x->span(
    "Hello"
    )
    ),
    $x->td(array('align'=>"center"),
    $x->span(
    "World"
    )
    )
    )
    ),


    The perl script is directly accessible here :
    http://lya.no-ip.com/pear/XML_FastCreate/scripts/
  • Stephan Schmidt  [2004-04-09 21:18 UTC]

    Hi,

    basically I like the changes you made, and now the packages makes sense to me. But I'd like you to make some adjustments:

    1. Error management
    Please use PEAR::raiseError() to trigger errors instead of implementing your own error management.

    2. Drivers
    Please implement two different drivers for the output. You should implement a factory, like a lot of other packages do (see DB for an example). This has two advantages:
    If I do not need XML_Tree output, the code that has to be parsed is smaller. And your package can easily be extended by providing new drivers for DOM, simpleXML, etc.

    3. XML_Util
    In the XML driver, that directly creates XML, please use XML_Util, which is able to build tags, comments, etc.

    And a wish: please provide the perl script also as PHP script. This is especially useful for Windows users, as they probably haven't Perl installed.

    If you could implement these changes, I think the package is great!

    Stephan
  • Guillaume Lecanu  [2004-04-12 19:07 UTC]

    Hi !

    I have make many changes to follow your advices.
    Now i have implemented a factory system with external "driver" to output in different format (Text / XML_Tree)
    I have also make system to overloading works under PHP4 and PHP5.

    Nextly i will make a PHP version of the Perl script.

    Thanks
  • Guillaume Lecanu  [2004-04-18 22:32 UTC]

    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
  • Guillaume Lecanu  [2004-04-19 23:15 UTC]

    I have added change following your advices :
    - Errors reporting by PEAR Error object
    - Option 'expand' to write single tag like this : <tag></tag> rather <tag />
    - Option 'singleAttribute' to allow the single attributes like this 'checked'=>null

    For a quick overview of this package :
    http://lya.no-ip.com/pear/XML_FastCreate/tests/example1.php

    Thanks
  • Alan Knowles  [2004-04-20 03:56 UTC]

    dont release it as 1.0 * release - it should stay at 0.* for a few releases (at least a month or 2)

    you should add links for examples and source phps etc. before calling for votes.