manishrathi
08-18-2009, 04:14 PM
Is XML and XHTML one and same or different ?
If they are different, whats the difference between two ?
If they are different, whats the difference between two ?
|
Click to See Complete Forum and Search --> : xml and xhtml manishrathi 08-18-2009, 04:14 PM Is XML and XHTML one and same or different ? If they are different, whats the difference between two ? Charles 08-18-2009, 08:37 PM XHTML is a subset of XML in the same way that HTML is a subset of SGML. kennyv 08-28-2009, 01:50 PM I'm sorry but the previous answer is completely wrong, I suspect that Charles was thinking one thing but his fingers typed something else, it happens. This is from w3schools.com XHTML is a stricter and cleaner version of HTML. This is from w3.org: Extensible Markup Language (XML) is a simple, very flexible text format derived from SGML (ISO 8879). There are a few rules for XML but basically it is defined by you. Ken www.webdesigntips-foreveryone.com Scriptage 08-30-2009, 12:51 PM I'm sorry but the previous answer is completely wrong, I suspect that Charles was thinking one thing but his fingers typed something else, it happens. I'm sorry but you are a complete pudding head. Charles is indeed correct. XHTML is an XML serialisation of HTML. kennyv 08-30-2009, 01:40 PM Scriptage, First of all I wouldn't have disagreed with Charles unless I checked it out first. Second I am accustomed to dealing with professionals on Forums not arrogant people who feel they have to insult someone who they may disagree with. Third below are some references, you might be interested in taking a look at them. XML (Extensible Markup Language) - is a less robust variety of SGML http://mason.gmu.edu/~montecin/netterms.htm XHTML is a family of current and future document types and modules that reproduce, subset, and extend HTML 4 [HTML4]. XHTML family document types are XML based, and ultimately are designed to work in conjunction with XML-based user agents. http://www.w3.org/TR/xhtml1/ XML was conceived as a means of regaining the power and flexibility of SGML without most of its complexity. Although a restricted form of SGML, XML nonetheless preserves most of SGML's power and richness, and yet still retains all of SGML's commonly used features. http://www.w3.org/TR/xhtml1/ Thanks for your input Scriptage, I hope I haven't embarrassed you too much, Ken Scriptage 08-30-2009, 02:15 PM You haven't embarrassed me at all, I think you will find that XHTML is a subset of XML. A valid XHTML document (without HTML entities) is a valid XML document, thus, XHTML is a subset of XML. HTML is an application of SGML, XHTML is an application of XML. XHTML is an XML serialisation of HTML. The dictionary is your friend here, look up subset, derive and serialisation. Scriptage 08-30-2009, 03:26 PM I didn't have time to write a full response earlier. Second I am accustomed to dealing with professionals on Forums not arrogant people who feel they have to insult someone who they may disagree with. I don't insult people that I disagree with, the comment you made about Charles was very disrespectful and I repaid in kind. First of all I wouldn't have disagreed with Charles unless I checked it out first. You obviously didn't check it out well enough. Charles stated that XHTML is a subset of XML. Let's look at this mathematically: A set A is a subset of a set B if A is "contained" inside B. Notice that A and B may coincide. The relationship of one set being a subset of another is called inclusion. If we have two sets of numbers A (3,6,7,9,10) and B (6,7,9), set B is a subset of set A due to the sequence of B being contained in set A. Now because any valid XHTML document is a valid XML document, we can assert that XHTML is a subset of XML. XHTML is a family of current and future document types and modules that reproduce, subset, and extend HTML 4 So the XHTML family reproduce (is a serialisation (If a book is serialized, it is made into a number of television or radio programmes or published in a newspaper or a magazine in parts:)), subset and extend HTML 4. All this means is that the specification is split into different parts (serialisation), the parts being an application in XML and and application in SGML. If we go back to our lesson on sets we can see that: Notice that A and B may coincide. So B can be equal to A and still be a subset of A.The extension part refers to the extensible nature of XHTML. There is an XHTML 1.0 + RDFa document type that allows you to embed meta data within elements. Nothing here contradicts what Charles stated so I really don't see the point in referencing it. Charles' first point is, therefore, correct. I wouldn't be as quick to say that HTML is a subset of SGML because SGML is a means to describe a markup language, whereas, XML is a language in itself. I would say XHTML is a subset of XML and HTML is an application of SGML. Ken, don't take this the wrong way but you aren't going to win an educational p!ssing contest with me. Charles is one of the most knowledgeable people on here and you would do well to show him a little respect. W3Schools isn't the most acurate place to attain knowledge so quoting it as a reference is actually quite laughable. If you would like me to clarify anything else then I will do. Kind regards Carl kennyv 08-30-2009, 03:58 PM Carl, I must say that I wish that I had you as a student in my class when I was teaching at the University. You could have straightened me out when I was teaching my students total fallacies. I will be sure and contact you when I have a question instead of going to w3.org or w3schools.com. It must be comforting for you, at such a young age, to know that you are more knowledgeable than any of your professors. Sigh, I wish you had been in my classes. Again Thank you for you input, Have a wonderful and enriched life, Ken Scriptage 08-30-2009, 04:06 PM Oh my word. If you even bothered to read my post then you will see that what the W3C states does not contradict what Charles said. Let's take a look at what the W3C say (http://www.w3.org/2009/06/xhtml-faq.html): We distinguish: 1.XHTML meaning "an XML serialization of HTML," and 2.A family of documents including XHTML 1.0, XHTML 1.1, XHTML Basic 1.1, and XHTML Modularization. Regarding the XML serialization of HTML, the HTML 5 specification includes a section on XML serialization, as well as a section on text/html serialization. W3C plans to continue work on both serializations in the HTML Working Group. Thus, we expect the next generation XML serialization of HTML to be defined in the HTML 5 specification. Currently, the HTML 5 specification refers to this serialization as "XHTML 5" [HTML 5, section 1.6] There we have it, from the horse's mouth, XHTML is an XML serialisation of HTML. Now let's move onto HTML (http://www.w3.org/TR/html4/intro/sgmltut.html): Each markup language defined in SGML is called an SGML application. An SGML application is generally characterized by: So the W3C agrees with me that HTML is an application of SGML and mathematics agrees with me and Charles that XHTML is a subset of XML. Long story short, you don't know what you're on about. Scriptage 08-30-2009, 04:17 PM From the XHTML 1.0 specification: Abstract This specification defines the Second Edition of XHTML 1.0, a reformulation of HTML 4 as an XML 1.0 application, and three DTDs corresponding to the ones defined by HTML 4. The semantics of the elements and their attributes are defined in the W3C Recommendation for HTML 4. These semantics provide the foundation for future extensibility of XHTML. Compatibility with existing HTML user agents is possible by following a small set of guidelines. and from the XML specification: The Extensible Markup Language (XML) is a subset of SGML that is completely described in this document. Its goal is to enable generic SGML to be served, received, and processed on the Web in the way that is now possible with HTML. XML has been designed for ease of implementation and for interoperability with both SGML and HTML. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |