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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic question.Anybody need a star?????

Status
Not open for further replies.

durug

Technical User
Mar 22, 2002
335
CA
I have a basic DTD schema like this one:

<!ELEMENT D1 (ASNHeader)>
<!ELEMENT ASNHeader EMPTY>

and the xml file like this
<?xml version='1.0' standalone='no'?>
<!DOCTYPE document SYSTEM &quot;test.dtd&quot;>
<D1>
<ASNHeader></ASNHeader>
</D1>

And is not working. Instead if I change the D1 to &quot;document&quot;
so that now the DTD file looks like this:
<!ELEMENT document (ASNHeader)>
<!ELEMENT ASNHeader EMPTY>
and the XML file like
<?xml version='1.0' standalone='no'?>
<!DOCTYPE document SYSTEM &quot;test.dtd&quot;>
<document>
<ASNHeader></ASNHeader>
</document>

IT WORKS!!!!!!
WHY????

Thanks
 
Let me answer the questions:
because
<!DOCTYPE document SYSTEM &quot;test.dtd&quot;>
I could use as the roor element only document
 
Let me answer the questions:
because
<!DOCTYPE document SYSTEM &quot;test.dtd&quot;>
I could use as the root element only document
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top