Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9133257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:27:16+00:00 2026-06-17T08:27:16+00:00

Validate Online: http://xmlvalidator.new-studio.org XML Document (also displayed below) Question 1 Why the following 6

  • 0

Validate Online: http://xmlvalidator.new-studio.org

XML Document (also displayed below)

Question 1

Why the following 6 Errors shows?

  1. Line 29 Column 18 : Attribute value "1" of type ID must be a name.
  2. Line 34 Column 22 : Attribute "type" must be declared for element type "dob".
  3. Line 39 Column 26 : Attribute "type" must be declared for element type "address".
  4. Line 49 Column 18 : Attribute value "2" of type ID must be a name.
  5. Line 54 Column 22 : Attribute "type" must be declared for element type "dob".
  6. Line 59 Column 27 : Attribute "type" must be declared for element type "address".

Question 2

When I uncomment the following line no. 4

<!ELEMENT persona (name,dob?,address*) >

AND comment the following line no. 5

<!ELEMENT name (first_name,last_name) >

Why the following error shows?

  • Line 4 Column 28 : An element type is required in the declaration of element type "persona".

The XML Document with embedded DTD

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE personality [
<!ELEMENT personality (persona*) >
<!-- <!ELEMENT persona (#PCDATA|(name,dob?,address*))> -->
<!ELEMENT persona (name,dob?,address*) >
<!ELEMENT name (first_name,last_name) >
<!ELEMENT first_name (#PCDATA) >
<!ELEMENT last_name (#PCDATA) >
<!ELEMENT dob (date+,month+,year+) >
<!ELEMENT date (#PCDATA) >
<!ELEMENT month (#PCDATA) >
<!ELEMENT year (#PCDATA) >
<!ELEMENT address (building,street,city,state,country,country_code) >
<!ELEMENT building (#PCDATA) >
<!ELEMENT street (#PCDATA) >
<!ELEMENT city (#PCDATA) >
<!ELEMENT state (#PCDATA) >
<!ELEMENT country (#PCDATA) >
<!ELEMENT country_code (#PCDATA) >

<!ATTLIST persona id ID #REQUIRED >
<!ATTLIST name type (string|number) "string" >

]>

<?xml-stylesheet type="text/css" href="xmlstyle.css" ?>

<personality>
    <persona id="1">
        <name type="string">
            <first_name>Abhisek</first_name>
            <last_name>Pattnaik</last_name>
        </name>
        <dob type="number">
            <date>29</date>
            <month>8</month>
            <year>1990</year>
        </dob>
        <address type="string">
            <building>Plot-471</building>
            <street>Sahid Nagar</street>
            <city>Bhubaneswar</city>
            <state>Odisha</state>
            <country>India</country>
            <country_code>91</country_code>
        </address>
    </persona>
    
    <persona id="2">
            <name type="string">
                <first_name>Anindita</first_name>
                <last_name>Patnaik</last_name>
            </name>
        <dob type="number">
            <date>5</date>
            <month>12</month>
            <year>1996</year>
        </dob>
            <address type="string">
            <building>Plot-471</building>
            <street>Sahid Nagar</street>
            <city>Bhubaneswar</city>
            <state>Odisha</state>
            <country>India</country>
            <country_code>91</country_code>
        </address>
    </persona>
</personality>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:27:17+00:00Added an answer on June 17, 2026 at 8:27 am
    Line 29 Column 18 : Attribute value "1" of type ID must be a name.
    Line 49 Column 18 : Attribute value "2" of type ID must be a name.
    

    The value of an attribute of type ID cannot start with a digit. It must match the Name production in the XML specification, which rules out initial digits.

    • http://www.w3.org/TR/xml/#sec-attribute-types
    • http://www.w3.org/TR/xml/#sec-common-syn

    Line 34 Column 22 : Attribute "type" must be declared for element type "dob".
    Line 39 Column 26 : Attribute "type" must be declared for element type "address".
    

    You haven’t declared a type attribute for the dob and address elements.


    <!ELEMENT persona (#PCDATA|(name,dob?,address*))>
    

    This (commented out in your DTD above) is an illegal declaration. The following would be OK (but may not be what you want):

    <!ELEMENT persona (#PCDATA|name|dob|address)*>
    

    For information on the constraints regarding “mixed content”, see

    • http://www.w3.org/TR/xml/#sec-mixed-content
    • http://en.wikipedia.org/wiki/PCDATA.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

. Validate Online: http://xmlvalidator.new-studio.org XML Document (also displayed below) Question 1 When I uncomment
I have a schema similar to the following... <?xml version=1.0 encoding=UTF-8?> <xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema> <xs:element
I have an xml and xsd file that both validate correctly (tested at http://xsdvalidation.utilities-online.info/
I'm trying to validate my XML document against my XML schema. This is my
I have this schema: <?xml version=1.0 encoding=UTF-8?> <xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema> <xs:simpleType name=errorType> <xs:restriction base=xs:decimal> <xs:totalDigits
I'm trying to validate a simple XML file against an XML schema using the
Hi I've got some XML that won't validate. I've narrowed down the problem to
I am trying to validate a few XML files and I'm failing due to
I have the following PHP code which simply grabs a URL behind HTTP-Basic authentication
I'm working on an online booking site (airline) and I want to validate if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.