How to identify the error with this XML/DTD pair?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • paragpdoke
    New Member
    • Dec 2007
    • 62

    How to identify the error with this XML/DTD pair?

    Hello All.
    I am trying to use an entity value defined in an external dtd within an XML file. This renders fine in Internet Explorer 8, but Firefox 3 & Google chrome report problems.

    Can someone kindly spare a moment and help me please ?
    XML.xml:
    Code:
    <?xml version="1.0" standalone="no"?>
    <!DOCTYPE root SYSTEM "dtd.dtd">
    <root>
        &myEnt;
    </root>
    dtd.dtd:
    Code:
    <!ENTITY myEnt "Parag Doke">
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    it would help to know, what problems are reported …

    if the one line you posted is all that is in the DTD, then your XML simply does not validate (missing root element definition)

    Comment

    • paragpdoke
      New Member
      • Dec 2007
      • 62

      #3
      Found this:
      I have an XML file (diploma.xml) that looks like this: &lt;?xml version="1.0" standalone="no" ?&gt; &lt;!DOCTYPE Diploma SYSTEM "diploma.dtd"&gt; &lt;Diploma&gt; &amp;students; &amp;

      Comment

      • paragpdoke
        New Member
        • Dec 2007
        • 62

        #4
        Firefox says:
        Code:
        XML Parsing Error: undefined entity
        Location: <path to parent folder>/XML.xml
        Line Number 4, Column 5:
            &myEnt;
        ----^

        Comment

        • Dormilich
          Recognized Expert Expert
          • Aug 2008
          • 8694

          #5
          up to now, I have only used parameter entities …

          Comment

          Working...