Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Regular Coder
    Join Date
    May 2003
    Location
    34░ 54' N 82░ 13' W
    Posts
    996
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Difference?? XTML -- XML

    Whats the difference between XHTML and XML??
    Stevie Peele
    Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
    #dev - any programming,etc. question
    #design - design discussion and critque
    #central - general chat
    Come join us!

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeň, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Have a look at the < What is XML and how do I use it?> sticky for a description of what XML is. XHTML is an XML language. So is RDF, MathML, XUL, XSL, SVG and many other markup languages. HTML is an SGML language, while XHTML is the XML equivalent of that language.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    Regular Coder
    Join Date
    May 2003
    Location
    34░ 54' N 82░ 13' W
    Posts
    996
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Okay, made an XML file, saved it, opened it, all it showed was my source. How do I make it display like a webpage?
    Stevie Peele
    Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
    #dev - any programming,etc. question
    #design - design discussion and critque
    #central - general chat
    Come join us!

  • #4
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeň, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    In difference to xhtml, pure xml does not have any default rendering. All elements are per default inline, and no elements have any behavior associated with them. Ie and newer moz versions displays the source tree per default, while op and older moz versions simply display the contents according to the style rules I explained above.
    If you assign a stylesheet to the xml file, the source will no longer be displayed, and the stylesheet will decide the styling.

    Have alook at the following links:
    <Associating Style Sheets with XML documents> (W3C),
    <XML Web Pages with Mozilla> (O'Reilly)

    You might be interested in having a look at what XSLT can do, as well.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #5
    Regular Coder
    Join Date
    May 2003
    Location
    34░ 54' N 82░ 13' W
    Posts
    996
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So, I need to apply a stylesheet for it not to show the source??
    Stevie Peele
    Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
    #dev - any programming,etc. question
    #design - design discussion and critque
    #central - general chat
    Come join us!

  • #6
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeň, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Yup.

  • #7
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,461
    Thanks
    1
    Thanked 23 Times in 21 Posts
    Originally posted by SDP2006
    So, I need to apply a stylesheet for it not to show the source??
    In IE the answer is yes. In Mozilla and Mozilla-based browsers, the answer is no. In Amaya, the answer is no.

    Nothing, I believe, stops a user-agent from applying an application-specific styling to elements. HTML itself would be useless without such capabilities...
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog

  • #8
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeň, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Alex: Not quite right. Moz displays the source in any of the recent versions, much the same as iew and iem does, if you don't apply a stylesheet. (Unless the doctype/namespace is recognised. In that case, the default rendering for that type will trigger instead.)
    Last edited by liorean; 09-10-2003 at 12:52 PM.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #9
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts

    I may be waaayyy off

    I only read maybe an article on XML so this is just a stab in the dark.

    I thought the difference between XML and XHTML was that XML does not have any predefined tags. I thought that XML was simply a way to define what data means and the XHTML (much like HTML) is used to show how data looks.

    What I mean by that is that is:
    Suppose you wanted to describe sandpaper.

    You could show everyone the sandpaper using XHTML but you would communicate the sandpapers roughness and other intangibles using XML.

    Thus that being the reason why you only get source code when you try to show a XML file. XML is not used to show data. XHTML is.
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.

  • #10
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeň, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Well, not exactly spot on. The thing you have to realise is that XML and XHTML isn't the same kind of languages. XHTML is XML but XML is not XHTML.

    < What is XML and how do I use it?> (the previous link doesn't work any longer).


    You see, XML is a meta langauge, a language in which you create other languages, in the same way SGML is. XHTML is one of those languages, in the same way HTML is one of the SGML languages.

    The thing is, you can use pure XML, of course. You can write a document with home-brewed tags, and present it using XML means. However, even though that document might be well-formed, it is not valid. To make a valid XML document, you have to have a validation scheme of some sort. The validation schemes that I'm aware of for the moment, is XML DTD, Relax NG, TRAX and XML Schema. These four can be used to validate the document, and what they do, is specify the grammar and vocabulary of a language built on the XML syntax.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #11
    Regular Coder
    Join Date
    Jun 2003
    Location
    California
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the difference is that XHTML and XML is that XHTML displays data much like the old html, and xml describes what data is....it takes a little getting used to. You can also think of it as this: XHTML is a mark-up language and XML is a meta language. A meta language is what's used to build other languages. if i'm wrong please tell me .

  • #12
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeň, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    That's pretty much correct. An analogy I like to draw is to actual human languages - SGML and XML are meta languages, these provide the syntax for the language. The XML or SGML applications (ie HTML, XHTML, DocBook, SVG, XUL, RDF, MathML etc.), on the other hand are the grammar and the vocabularies, that together with the syntax from the meta languages provides a full markup language. Semantics, however, are for the moment conveyed only through human recognition of the element and attribute names, or through namespace recognition.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #13
    New Coder
    Join Date
    Nov 2003
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post XHTML and XML

    XML is a cross-platform, software and hardware independent tool for transmitting information.

    XHTML is HTML defined as an XML application.

    You may want to look at the following website and read about XHTML and XML

    URL: http://www.w3schools.com/
    Last edited by lnxusr86; 04-11-2004 at 04:24 PM.

  • #14
    New Coder
    Join Date
    Sep 2004
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by liorean
    Have a look at the < What is XML and how do I use it?> sticky for a description of what XML is. XHTML is an XML language. So is RDF, MathML, XUL, XSL, SVG and many other markup languages. HTML is an SGML language, while XHTML is the XML equivalent of that language.
    Sorry, the link you gave is no longer available...

  • #15
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeň, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Which you would have seen I mentioned later, when I linked to a copy of it.

    I would normally correct things like this, but the intention was to write an XML FAQ and an XML documentation thread. I've placed this project on ice along with maintaining the HTML&CSS ones for lack of time.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •