Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open XML in Word 2003

Status
Not open for further replies.

JustinEzequiel

Programmer
Jul 30, 2001
1,192
PH
I get Reference to undefined entity 'foo'
when trying to open this file in MS Word 2003
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE people_list SYSTEM "example.dtd">
<people_list>
  <person>
    <name test="&foo;">Fred &lt;&gt;</name>
    <birthdate>27&foo;2008</birthdate>
    <gender>Male&quot;&amp;&apos;</gender>
  </person>
</people_list>

where example.dtd is
Code:
<!ELEMENT people_list (person*)>
<!ELEMENT person (name, birthdate?, gender?, socialsecuritynumber?)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT birthdate (#PCDATA)>
<!ELEMENT gender (#PCDATA)>
<!ELEMENT socialsecuritynumber (#PCDATA)>

<!ENTITY foo "&#38;#60;&#62;">

I can however open the following XML in Word
which seems to indicate that Word ignores entity declarations in an external DTD file
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE people_list [
<!ENTITY foo "&#38;#60;&#62;">
]>
<people_list>
  <person>
    <name test="&foo;">Fred &lt;&gt;</name>
    <birthdate>27&foo;2008</birthdate>
    <gender>Male&quot;&amp;&apos;</gender>
  </person>
</people_list>

so dear helpful people, is there a way I can get the first XML file to open in MS Word 2003?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top