[PHP-DEV] [PATCH] ext. dom php_dom.c

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Re: [PHP-DEV] [PATCH] ext. dom php_dom.c

    From: John Huntjens
    > When running the test script, in the entitys get not expanded.
    > But the standard
    >
    [url]http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-D[/url]
    > OMConfiguration
    > says about this:
    DOMConfiguration has not been implemented at the moment as it is level 3
    spec, so opted to just extend the specs, at least for now, as it is much
    more usable for the user. Concentration has been to at least get things up
    to level 2 working while some level 3 functionality has been added.

    Grab the latest code from cvs (added yesterday). New properties were added
    to the domDocument. (They are all booleans).

    validateOnParse - default FALSE (will load and validate against DTD)
    resolveExternals - default FALSE (will load the DTD without performaing
    validation)
    preserveWhiteSpace - default TRUE
    substituteEntities - default FALSE

    Your code would look like the following:

    $dom = new domDocument();
    $dom->resolveExternals = TRUE;
    $dom->substituteEntities = TRUE;
    $dom->load('test.xml');
    print $dom->savexml();

    Note: these properties have not yet been worked into the save methods yet,
    only the load methods.

    Also, use of libxml globals i.e. xmlSubstituteEntitiesDefault(1); - very bad
    thing especially with multiple extensions using libxml.

    Rob



    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Rob Richards Guest

  2. Similar Questions and Discussions

    1. I need this patch as soon as possible
      http://support.microsoft.com/default.aspx?scid=kb;en- us;832478&Product=winsvr2003 I am with a university and I cant get email support or...
    2. patch
      Sherry; Follow this to clean and protect your computer: http://www.kellys-korner-xp.com/xp_qr.htm#rpc -- Jupiter Jones An easier way to read...
  3. #2

    Default Re: [PHP-DEV] [PATCH] ext. dom php_dom.c

    <snip>
    > Grab the latest code from cvs (added yesterday). New properties were added
    > to the domDocument. (They are all booleans).
    >
    > validateOnParse - default FALSE (will load and validate against DTD)
    > resolveExternals - default FALSE (will load the DTD without performaing
    > validation)
    > preserveWhiteSpace - default TRUE
    > substituteEntities - default FALSE
    >
    > Your code would look like the following:
    >
    > $dom = new domDocument();
    > $dom->resolveExternals = TRUE;
    > $dom->substituteEntities = TRUE;
    > $dom->load('test.xml');
    > print $dom->savexml();
    >
    > Note: these properties have not yet been worked into the save methods yet,
    > only the load methods.
    >
    > Also, use of libxml globals i.e. xmlSubstituteEntitiesDefault(1); - very
    bad
    > thing especially with multiple extensions using libxml.

    Thanks Rob,

    I got the latest snap from [url]http://snaps.php.net/[/url] , version
    php5-200307111130.tar.tar, but that one wil not compile document.c

    /sys/tmp/php5-200307111130/ext/dom/document.c: In function
    `php_dom_ctx_error':
    /sys/tmp/php5-200307111130/ext/dom/document.c:120: parse error before
    `parser'
    /sys/tmp/php5-200307111130/ext/dom/document.c:122: `parser' undeclared
    (first use in this function)
    /sys/tmp/php5-200307111130/ext/dom/document.c:122: (Each undeclared
    identifier is reported only once
    /sys/tmp/php5-200307111130/ext/dom/document.c:122: for each function it
    appears in.)
    make: *** [ext/dom/document.lo] Error 1

    Do I have the wrong snap?

    John



    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    John Huntjens Guest

  4. #3

    Default Re: [PHP-DEV] [PATCH] ext. dom php_dom.c

    John Huntjens wrote in message
    > /sys/tmp/php5-200307111130/ext/dom/document.c: In function
    > `php_dom_ctx_error':
    > /sys/tmp/php5-200307111130/ext/dom/document.c:120: parse error before
    > `parser'
    > /sys/tmp/php5-200307111130/ext/dom/document.c:122: `parser' undeclared
    > (first use in this function)
    > /sys/tmp/php5-200307111130/ext/dom/document.c:122: (Each undeclared
    > identifier is reported only once
    > /sys/tmp/php5-200307111130/ext/dom/document.c:122: for each function it
    > appears in.)
    > make: *** [ext/dom/document.lo] Error 1
    The snap is correct. What are you using for configure and what version of
    libxml are you using?

    Rob



    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Rob Richards Guest

  5. #4

    Default Re: [PHP-DEV] [PATCH] ext. dom php_dom.c

    > > /sys/tmp/php5-200307111130/ext/dom/document.c: In function
    > > `php_dom_ctx_error':
    > > /sys/tmp/php5-200307111130/ext/dom/document.c:120: parse error before
    > > `parser'
    > > /sys/tmp/php5-200307111130/ext/dom/document.c:122: `parser' undeclared
    > > (first use in this function)
    > > /sys/tmp/php5-200307111130/ext/dom/document.c:122: (Each undeclared
    > > identifier is reported only once
    > > /sys/tmp/php5-200307111130/ext/dom/document.c:122: for each function it
    > > appears in.)
    > > make: *** [ext/dom/document.lo] Error 1
    >
    > The snap is correct. What are you using for configure and what version of
    > libxml are you using?
    >
    > Rob
    configure \
    --enable-track-vars --with-apxs \
    --with-config-file-path=/etc \
    --without-mysql \
    --without-pear \
    --with-interbase \
    --with-simplexml \
    --with-xsl \
    --with-ftp \
    --with-gd \
    --with-imap \
    --with-imap-ssl \
    --with-dbase \
    --with-zlib

    libxml2: 2.5.7
    lixxslt: 1.0.31

    John



    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    John Huntjens Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139