SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Threaded View

  1. #1
    SitePoint Enthusiast JoeRags's Avatar
    Join Date
    Jan 2004
    Location
    Delete Account
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP 5 DOM module cannot load XML documents containing DTD

    Using the following files I get the following errors "Entity 'test1' not defined in..." and "Entity 'test2' not defined in...".

    test.php

    PHP Code:
    <?php
    DomDocument
    ::load('/Users/josephragsdale/Sites/joerags/development/test.xml');
    ?>
    test.xml

    Code:
    <?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
    <!DOCTYPE test SYSTEM "/Users/josephragsdale/Sites/joerags/development/test.dtd">
    <test>
      <example>&test1; &test2;</example>
    </test>
    test.dtd

    Code:
    <!DOCTYPE test [
    <!ENTITY test1 "Test 1">
    <!ENTITY test2 "Test 2">
    
    <!ELEMENT test (example)>
    <!ELEMENT example (#PCDATA)>
    ]>
    I've researched a bit with Google and stumbled across bug 17779 and bug 17390 at bugs.php.net which might be somewhat related to my problem but I'm unsure. From what I can tell the above should work.

    I'm using Apache 1.3.31, PHP 5 RC3, libxml2 2.6.9, and libxslt 1.1.7.
    Last edited by JoeRags; Jun 14, 2004 at 23:26.


Bookmarks

Posting Permissions

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