[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: DTD error

Subject: Re: DTD error
From: "Gav..." <brightoncomputers@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 6 Nov 2007 12:00:39 +0900 (WST)
Re:  DTD error
<quote who="oryann9">
> Can anyone help me with this error I cannot find?
> thank you much!
>
> Your XML document   has an error:
> Expected an element name
> line: 12
> character: 22
>
>
> <?xml version="1.0" encoding="utf-8"?>
>
> <!-- Define Doc Type definition -->
> <!DOCTYPE CONTACTS [
> <!ELEMENT CONTACTS (PERSON)>
> <!ELEMENT PERSON (FIRSTNAME,LASTNAME,PHONE+)>
> <!ELEMENT FIRSTNAME (#PCDATA)>
> <!ELEMENT LASTNAME  (#PCDATA)>
> <!ELEMENT PHONE     (#PCDATA)>
> <!ATTLIST PHONE
>   TYPE CDATA #REQUIRED>
> <!ELEMENT WORKADDR  (#CDATA)>   <!-- LINE 12 IS HERE -->
> <!ELEMENT EMAIL     (#PCDATA)>
> <!ATTLIST EMAIL
>   TYPE CDATA #REQUIRED>
> <!ELEMENT TIMEZONE  (#PCDATA)>
> <!ELEMENT OTHERINFO (#CDATA)>
> ]>
>
> <!-- Begin XML user data -->
>
> <CONTACTS>
>     <PERSON>
>         <FIRSTNAME>Jeff</FIRSTNAME>
>         <LASTNAME>XXXX</LASTNAME>
>         <PHONE TYPE="HOME"> 9,234 876-90XX</PHONE>
>         <PHONE TYPE="WORK"> 9,234 767-78XX</PHONE>
>         <PHONE TYPE="CELL"> 9,234 778-67XX</PHONE>
>         <WORKADDR>Zsoft 23400 Park Place, XXXXX</WORKADDR>
>         <EMAIL TYPE="WORK">jXXXX</EMAIL>
>         <EMAIL TYPE="HOME">jXXXXXX</EMAIL>
>         <TIMEZONE>EST</TIMEZONE>
>         <OTHERINFO>Linux Admin, Perl Guru</OTHERINFO>
>     </PERSON>
> </CONTACTS>

It seems you have included <WORKADDR> , <EMAIL>, <TIMEZONE>, <OTHERINFO>
inside your <PERSON> element when they are not declared as such in the
DTD. They do not look like they are in the <CONTACTS> element either. They
are in the doctype, but belong to no element. You'll need to declare them
on the PERSON element if you want to include them inside the PERSON Div.

Warning, I'm a little rusty, but that's what it looks like to me at least.

Gav...




>
>
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>


-- 
Gav...

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.