Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > BOOK: Beginning XML 3rd Edition
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Beginning XML 3rd Edition
This is the forum to discuss the Wrox book Beginning XML, 3rd Edition by David Hunter, Andrew Watt, Jeff Rafter, Jon Duckett, Danny Ayers, Nicholas Chase, Joe Fawcett, Tom Gaven, Bill Patterson; ISBN: 9780764570773
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning XML 3rd Edition section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 3rd, 2006, 06:06 PM
Registered User
Join Date: Jan 2006
Location: , , USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Default values in XMLSchema

   I just want to mention, first, that all files referred to in my question were validated by the Schematron validator.

     When, in chapter 4, we created a .dtd file and an .xml file which used that dtd, one of the attributes we created was "period" and we created it with a default value of "Cretaceous". Then, in dinosaurs5.xml and later iterations, we left out the "period" attribute on Gallimimus Bullatus. Nonetheless we had declared a default value for "period" and, sure enough, when I brought up our dinosaur xml file, in Firefox or in IE, the browser showed an attribute of "period='Cretaceous'" for Gallimimus, even though we had not entered one in the .xml file. This was correct behavior and I only mention it to compare to it what happened in Chapter 5.

     In Chapter 5 we use XMLSchemas to achieve the same purpose that our dtd served in the previous chapter. Again, we create a "period" attribute and assign a default value of "Cretaceous". It is part of our DinoAttributes attributeGroup and it looks like this:
     <attribute name="period" type="token" default="Cretaceous" />

     Here's the difference, and here is my question: when I call up dinosaurs10.xml (or dinosaurs9.xml for that matter)in my browsers, there is NO period attribute listed for Gallimimus Bullatus. It is just not there. But it should be there, right?! So what is going on here? It would seem that the browsers don't understand XMLSchema as well as they do DTDs. Is this a browser bug, or what is it?

     I really appreciate your input on this, as it is inexplicable to me. Thank you.


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Default Field Values tachtenberg Reporting Services 1 February 19th, 2008 05:52 PM
setting default values prithvi28 XSLT 1 October 3rd, 2006 01:38 PM
Default Values for Query Odifius Access VBA 3 September 20th, 2006 06:30 AM
Default values? Raymie_C Access VBA 2 May 16th, 2005 11:48 AM
Default Values davest Access VBA 2 October 19th, 2004 05:57 AM

All times are GMT -4. The time now is 05:54 PM.

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