Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning JavaScript and CSS Development with jQuery
This is the forum to discuss the Wrox book Beginning JavaScript and CSS Development with jQuery by Richard York; ISBN: 9780470227794
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning JavaScript and CSS Development with jQuery 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 1st, 2011, 06:06 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Isn't the xml in xhtml+xml redundant?

I was surprised to see a new mime type in this book: xhtml+xml; Up till now I've only used XHTML 1.0. But it got me thinking: Isn't the xml redundant? I'm under the impression that the X in XHTML stands for XML. So it looks like this to me: x(ml)html+xml.
Reply With Quote
  #2 (permalink)  
Old September 1st, 2011, 07:07 PM
Registered User
Points: 19, Level: 1
Points: 19, Level: 1 Points: 19, Level: 1 Points: 19, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well,

Technically, no.

Actually, the 'X' in XHTML stands for eXtensible.

Now, the fact that you are extending HTML with a subset of XML, and then adding full XML does seem rather redundant, however as you can see from the Wikipedia entry on XHTML, the two are not congruous, so there is not as much overlap as it might appear at first glance.
Quote:
Originally Posted by The Wikipedia entry on XHTML
...
Root element

The root element of an XHTML document must be html, and must contain an xmlns attribute to associate it with the XHTML namespace. The namespace URI for XHTML is http://www.w3.org/1999/xhtml. The example tag below additionally features an xml:lang attribute to identify the document with a natural language:
Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
DOCTYPEs

In order to validate an XHTML document, a Document Type Declaration, or DOCTYPE, may be used. A DOCTYPE declares to the browser the Document Type Definition (DTD) to which the document conforms. A Document Type Declaration should be placed before the root element.
The system identifier part of the DOCTYPE, which in these examples is the URL that begins with http://, need only point to a copy of the DTD to use, if the validator cannot locate one based on the public identifier (the other quoted string). It does not need to be the specific URL that is in these examples; in fact, authors are encouraged to use local copies of the DTD files when possible. The public identifier, however, must be character-for-character the same as in the examples.

XML declaration

A character encoding may be specified at the beginning of an XHTML document in the XML declaration when the document is served using the application/xhtml+xml MIME type. (If an XML document lacks encoding specification, an XML parser assumes that the encoding is UTF-8 or UTF-16, unless the encoding has already been determined by a higher protocol.)
For example:
Code:
<?xml version="1.0" encoding="UTF-8" ?>
The declaration may be optionally omitted because it declares as its encoding the default encoding. However, if the document instead makes use of XML 1.1 or another character encoding, a declaration is necessary. Internet Explorer prior to version 7 enters quirks mode, if it encounters an XML declaration in a document served as text/html.
HTH.
Reply With Quote
  #3 (permalink)  
Old September 1st, 2011, 08:22 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Now that you mention it, I do remember my XHTML book saying that the X was from eXtensible (especially when you write it that way). Makes much more sense now.

I had done a quick Google search (without luck) for '"xhtml+xml" mime redundant' to see if anyone else had asked the same question. But I didn't think to search Wikipedia for XHTML.

Thank you.
Reply With Quote
Reply


Thread Tools
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
redundant text in output xml metinhoclam XSLT 3 August 13th, 2010 07:55 AM
Split xml file with result document and javax.xml.transform.Transformer. nisargmca XSLT 3 January 12th, 2010 06:26 AM
xml invalid top level from ASP write XML(solution) g000we XML 0 August 9th, 2006 04:56 AM
Forms with XML > XSLT > XHTML kwilliams XSLT 0 October 27th, 2005 10:52 AM
xhtml-tags i xml value-of select patric_jansson XSLT 5 October 3rd, 2005 01:15 PM



All times are GMT -4. The time now is 10:38 PM.


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