Wrox Programmer Forums
|
BOOK: Beginning XML, 4th Ed ISBN: 978-0-470-11487-2
This is the forum to discuss the Wrox book Beginning XML, 4th Edition by David Hunter, Jeff Rafter, Joe Fawcett, Eric van der Vlist, Danny Ayers, Jon Duckett, Andrew Watt, Linda McKinnon; ISBN: 9780470114872
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning XML, 4th Ed ISBN: 978-0-470-11487-2 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
 
Old November 2nd, 2009, 12:40 AM
Registered User
 
Join Date: Nov 2009
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb Mixed content in DTDs

On page 109 the book discusses declaring mixed content DTDs. The example given

Code:
<!ELEMENT description (#PCDATA | em | strong | br)*>


seems to create a situation where a description can contain text, em, strong, or br tags but that none of those tags can contain anything within them but text. Only after reading a lot more of the book (and I have also read many other XML books) was I finally able to figure out that those other elements (em, strong, br) all also have to be declared to indicate what elements they are allowed to contain. For instance :

Code:
<!ELEMENT em (#PCDATA | strong | br)*>
<!ELEMENT strong (#PCDATA | em | br)*>
<!ELEMENT br EMPTY>
If the authors would mention this I think it would make the whole concept much more clear.

Thanks.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help transforming mixed complexType davegreig1978 XSLT 2 February 25th, 2009 02:46 PM
mixed content parsing joeri XSLT 2 October 7th, 2007 04:54 PM
Java solution Read Mixed data columns from excel. pranjaldutta VBScript 1 March 19th, 2007 12:29 PM
Mixed Mode and Stored Credentials jmurdock BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 June 25th, 2004 10:26 AM
mixed mode authentication Tremmorkeep SQL Server 2000 6 June 21st, 2004 12:14 PM





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