Need help with external DTD!

Questions about XML that are not covered by the other forums should go here.
gauri
Posts: 2

Need help with external DTD!

Thu Dec 29, 2016 10:54 am

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: 368

Re: Need help with external DTD!

Thu Dec 29, 2016 12:02 pm

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

Re: Need help with external DTD!

Thu Dec 29, 2016 12:27 pm

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.

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 1 guest