Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > BOOK: Beginning XML, 4th Ed ISBN: 978-0-470-11487-2
|
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 1st, 2009, 11:03 PM
Registered User
 
Join Date: Nov 2009
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Question Confusing paragraph about "global attributes"

On page 84, last paragraph before the "Try It Out" section: the following sentences are confusing to me:

Quote:
However, attributes from a particular namespace can also be attached to elements from a different namespace. Attributes that are specifically declared to be in a namespace are called global attributes. A common example of a global attribute is the XHTML class attribute, which might be used on any XML element, XHTML or not.
I realize that this is early in the text and that "global attributes" are explained later. However, the way this sentence is worded it makes it sound as if there are some attributes that are global to all XML documents everywhere. Can I actually use the class attribute in any element in any XML document I create even if that attribute has never been declared in any of the namespaces declared for that document? In addition, it seems to imply that if anyone ever declares an attribute as a global attribute in any schema anywhere, then that attribute somehow can magically be used as valid in any element in any XML document anywhere.

Can someone please explain what this paragraph really means? It appears that the author is not clear as to the context within which he is writing. (This seems to be the biggest cause of confusion is all the questions I have.) Did he really mean: "Within a particular instance document with multiple declared namespaces, it is valid to use any of the attributes that were globally declared in any of those namespaces within any element of that document, regardless of the namespace of the specific element."?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Difficulties with "web.config" and "ASPNETDB" CFRham BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 2 July 3rd, 2010 10:19 AM
Need code corrections "get sub or function not defined" error" bluesboytoo Excel VBA 1 October 22nd, 2009 11:12 PM
How to theme the "Browse" button of "FileUpload" control? varunbwj BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 October 14th, 2009 01:22 AM
Add a CheckBox DataColumn to my DataGridView, Null format: "" or "True" but Error: F ismailc C# 2005 0 September 25th, 2009 04:56 AM
Code not going as planned: "icicle" vs "savedinstancestate" joopthecat BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 3 May 3rd, 2009 03:09 PM





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