Need help with external DTD!

Questions about XML that are not covered by the other forums should go here.
gauri
Posts: 2
Joined: Thu Dec 29, 2016 10:48 am

Need help with external DTD!

Post by gauri »

I need help for my studies based on XML. The exercise is to create an external DTD to store a resume for a job.

Here the dtd and xml files as zip:
https://we.tl/GOA7VkVTwQ

Unfortunately when I try to open the xml file in explorer or chrome, nothing is shown resp. an error is shown:
error on line at column 18: specification mandate value for attribute resume1

Please help me where I went wrong. :roll:
Thank you!
Costin
Posts: 829
Joined: Mon Dec 05, 2011 6:04 pm

Re: Need help with external DTD!

Post by Costin »

Hello,

Please note that we can only help you with Oxygen XML software related issues.
If I understood correctly, you are not using oXygen to edit your documents.

However, I've took a look over the files you have attached and I found some errors in both the DTD schema and the XML file.

In order to make them work, your files should look like the below

DTD schema:

Code: Select all

<!ELEMENT resume (name+,age+,gender+,qualification+,fathername+,place+,langknown*,mobile+,mail*)+>
<!ELEMENT name (#PCDATA)>
<!ELEMENT age (#PCDATA)>
<!ELEMENT gender (#PCDATA)>
<!ELEMENT qualification (#PCDATA)>
<!ELEMENT fathername (#PCDATA)>
<!ELEMENT place (#PCDATA)>
<!ELEMENT langknown (#PCDATA)>
<!ELEMENT mobile (#PCDATA)>
<!ELEMENT mail (#PCDATA)>
XML document:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE resume SYSTEM "resume.dtd">
<resume>
<name>S. Thomas</name>
<age>23</age>
<gender>male</gender>

<qualification>
S.no. Course Institution Percentage Year of Study
1. S.S.L.C St Marys 83.5% 2003

2. +2 St Marys 75% 2005
High School

3. B.Sc. Govt. Art 65% 2008
College

4. M.C.A VSCET 79% 2010
</qualification>

<fathername>C. Machill</fathername>
<place>Delhi</place>
<langknown>C, C++, Java, VC++,xml</langknown>
<mobile>7373234108</mobile>
<mail>thomas_123@gmail.com</mail>
</resume>
Best Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
gauri
Posts: 2
Joined: Thu Dec 29, 2016 10:48 am

Re: Need help with external DTD!

Post by gauri »

Thanks a lot for your support! It works fine now.

Sorry, didn't know that Oxygen XML software is needed to seek help in this forum.
Post Reply