Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
| Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old November 9th, 2007, 05:40 AM
Registered User
 
Join Date: Nov 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Unvalid DTD in 'Beginning XML Databases' ?

In the book 'Beginning XML Databases' there is the following DTD example on page 352:
<!ELEMENT demographics (region*)>
<!ELEMENT region (name, area, country*)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT area (#PCDATA)>
<!ELEMENT country (name, population, area, city*)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT population (#PCDATA)>
<!ELEMENT area (#PCDATA)>
<!ELEMENT city (name, population)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT population (#PCDATA)>
When inserting this in XMLSpy I get an error message saying:
'Element "name" has already been declared' and a reference to www.w3.org saying:
"Validity constraint: Unique Element Type Declaration
An element type MUST NOT be declared more than once."
Anyone that can clarify this?




  #2 (permalink)  
Old November 9th, 2007, 05:55 AM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

I haven't got a copy of the book, but it does look like an error on the face of it. Please submit it as an erratum. Instructions are here:

http://www.wrox.com/WileyCDA/Section/id-106035.html

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
  #3 (permalink)  
Old November 9th, 2007, 06:05 AM
Registered User
 
Join Date: Nov 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, I will.



Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginning C# Databases TEDY All Other Wrox Books 9 January 6th, 2008 09:59 PM
Automated tool to convert XML from DTD to DTD lsantos2000 XSLT 2 October 17th, 2007 08:21 AM
how to parse the XML file and DTD tufailfifa XML 0 June 25th, 2007 07:02 AM
XML converter by using own DTD? DorisTan XML 0 January 18th, 2005 09:57 AM
Defining a DTD for an XMl Document boemane C# 0 August 24th, 2004 08:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.