Talk:XML
|
|
| Contents |
Spring 2005 re-write
The whole article is not good enough; it is flabby, poorly organized, and in places misleading. Also some examples would be welcome. I plan to spend the next week or so rebuilding carefully, and will keep progress notes here. The first step is to go and work on Markup language to introduce the notions of presentational, procedural, and descriptive markup. Tim Bray 22:32, 16 Apr 2005 (UTC)
XML + CSS in IE and Mozilla
"This process is still not yet stable as of March 2004 in those browsers, in other browsers such as the Opera web browser this works very well."
- Seems fine here with a superficial test. What doesn't work?
Is XSL only for making PDFs?
I am rather suspicious of the claim that "XSL itself is intended for creating PDF files", but I haven't changed it because I don't know much about either XSL or PDF (I came here looking for some information) ... Just wanted to draw this to the attention of someone who might know enough to make any necessary changes. If I'm wrong, sorry! Tremolo 01:17, 29 Jan 2004 (UTC)
- It is wrong. It should say XSL can be used to genrate any type of file, e.g. PDF files. Mr. Jones 08:01, 22 Jun 2004 (UTC)
I think this is great stuff. Good job.
Poor terminology in the article
I am finding the use of terminology here a little confusing. You say that Doc Book is an XML language. I would say it is a particular DTD, and a DTD is a possible way of defining the elements of a particular XML language. Alternatively, an XML language can specify its element by a Schema, or simply define its elements within each document itself. Also, one of its main features is its flexibilty compared with HTML. Each user can, indeed, define their own mark-up language by defining each required and optional element for their language. Finally, the entire Doc Book DTD has been made available by O'Reilly online, and I suggest you provide a link to it. RoseParks
Yeah, DocBook probably isn't the best example, because it can be implemented in SGML as well. I'll reword to use something better. XML is not itself a markup language; specific applications of XML (defined by a DTD or schema) are. I'm not sure of a better way to word that.
What kind of language is XML?
It has occured to me that one way of thinking about XML is as a specification for the encoding of information. And, as is pointed out above, is not really a language in itself in the sense that it doesn't have its own vocabulary. The RDF (Resource Description Framework) states something to the effect of letting XML handle the issues with globalization (Unicode) and data formatting through the XML element/attribute/text value syntax and through other low-level transport considerations.
In most representations of multiple levels of XML applications that I see, it starts looking a lot like the OSI Model for networks. In the same way that applications run on top of TCP or UDP which run on top of IP (I think I got the order right), the DocBook "application" or RDF or any of the zoo of XML-based languages build on top of XML or could be done in SGML, or dozens other forms of data representation.
StWeasel
- XML is really a language in itself, with its own vocabulary (made up out of < and > and other such characters and groups of characters), its own grammar, et cetera. But it is a language whose sole purpose is to describe another language, which seems to confuse people (just like with HTML); the metalanguage gets mistaken for the languages it describes.
- What is stated above is that XML in itself is not a mark-up language, and that is true.--branko
While it might be arguable that it has a vocabulary, I can definitely agree on the characterization of XML as a metalanguage. It seems that the distinction I draw is that XML is essentially a mere specification of a syntax (how symbols can be put together to form the primitives of a language), but depends on other specifications as extensions (XHTML, MathML, RDF and the like) to provide a semantics (what can actually be expressed and how this expression is interpreted for meaning). It seems to me very much like saying that ASCII is a language, but from certain viewpoints I can see how this would be a valid statement. -- StWeasel
A question for the mathematicians out there: Is XML a formal language? (Or maybe a formal meta-language?)
When I'm reading the page, I don't see enough emphasis on XML's strictness. The words are there, certainly, but I'd like to—for example—to move the concepts of well-formed and valid up to be more prominent. But I'm wondering, can I call XML "formal"? And when the word "formal" appears in the introduction, should it be linked to formal grammar?
DanielVonEhren 16:13, 1 Feb 2005 (UTC)
Use of XML in Mac OS X
SHould we mention that Apple's OS X uses XML for most of its stored property settings (ie the equivalent of the weindows registry), the plist files? -- Tarquin 12:37 May 8, 2003 (UTC)
Removed text
Deleted following:
- The document must identify itself as an XML document with a preliminary declaration to this effect. This declaration is known as a prolog. It will contain information about the XML version and possibly also information about encoding and whether the XML file is standalone or not.
Read the [spec http://w3.org/TR/XML], and see how above is false.
I removed this sentence from the article: Also, again unlike HTML, XML tags explain what the data means rather than how simply to display it. I don't see how something like this can be said about a purely syntactic specification, also eg. XHTML is a concrete example that this is misleading at best. Maybe something similar but NPOV could be put in as a statement about recommendations and best practices. -- Mp 09:31, 27 Aug 2003 (UTC)
Strengths and weaknesses re:n-tier systems and XML
I've just removed the following section from the weaknesses section (and rewrote it in part):
if one is coding an object-oriented system running on a relational database, then adding an XML front-end involves three different architectural metaphores. Mapping between these layers adds much complexity to design and development. Alternatively keeping information in XML works quite well for storage and messaging, but not for business logic. While XSLT exists as a transformation language it is declarative and not intuitive for procedural programmers. Also because XSLT programs are XML documents they are hard to read and thus to understand. This area of n-tier XML architecture is ripe for innovation.
I've tried to keep some of this statement, but this is overly long compared to the rest of the section. Part of this weakness is not really inherent to XML; if you're developing an OO system on a relational database it's not the fault of XML that adding XML support adds complexity.
That said, I think the article could use a lot more work, and one would be to extend the strength and weaknesses section significantly. The article was definitely POV-biased towards XML previously, and probably still is (and this is coming from someone who likes various XML technologies). There is a huge debate pro and contra XML (and its various technologies) that we could capture. Martijn faassen
Should the syntax be described in detail? Should it be complete?
The article shouldn't go into the details of the syntax of XML, especially when not all of it is covered. A definition of well-formedness is given that refers to elements, but "element" is never defined. I think a short example of an XML document is sufficient; anybody wanting more can read the spec. -- 64.81.99.73 20:20, 1 Sep 2003 (UTC)
What does "Compatibility with web and internet protocols" mean?
"Compatibility with web and internet protocols" - What does this mean, as an advantage? The internet protocols (HTTP, FTP, SMTP/MIME, etc...) appear 'compatible' with anything that's a sequence of bytes and has a MIME type. Is the author referring to the fact that XML looks like HTML? --Alaric 14:07, 26 Apr 2004 (UTC)
"Also, again unlike HTML, clever choice of XML element names allows the meaning of the data to be retained as part of the markup. This makes it more easily interpreted by software programs." - also strikes me as wrong; how does the choice of element names impact software programs? I can't think of many cases of software programs doing more with element names than passing them on to somewhere else, or identity-comparing them with hardcoded ones it has been told to expect. Did the author mean that good choices of element names makes the markup more easily interpreted by *humans*?
--Alaric 14:07, 26 Apr 2004 (UTC)
Many of the examples of why XML is good, given here, are really applicable to any structured data format - particularly around the recipe example. Most of them look like the reasons why publishing documents as XML is better than publishing them as HTML, to me?
--Alaric 14:07, 26 Apr 2004 (UTC)
1) The transport method _interent protocols_ receive/present no advantages because XML is used. Actually if XML is used, usually bandwidth is increased.
2) How compatible XML is with the web or whatever porduct out there that accepts XML has to more with the parsing engine and funcitonalty it presents than with the run-of-the-mill web services, read; web browsing.
The claim is unfounded (and does not in fact appear anywhere in the article) but was probably somewhat confusedly based in the fact that XML was designed with the Web in mind. Doc. type declarations must use a URL reference for the DTD, for instance. Other than that, the criticism is of course valid, its main advantage is that the syntax it is rigidly defined and therefore tools can automatically validate etc, plus that if everyone uses it, a lot of "synergy effects" should be achievable.
-- Schnolle 19:59, 2004 Oct 22 (UTC)
Was XML intended as a successor to HTML?
I have a theory that XML was originally designed within the W3C as a replacement to HTML - the logic next step from a CSS-based world, changing <div class="foo"> to just <foo>, and a more powerful CSS - and that the conversion from this to 'data interchange' has caused some confusion.
--Alaric 14:07, 26 Apr 2004 (UTC)
- It certainly was intended to be used this way, but this kind of support has not been implemented in IE very well (and development of IE seems to have stopped in 2001). Also the specifications in this direction have not been developed very far. Mr. Jones 08:38, 22 Jun 2004 (UTC)
Nope, XML was never intended as a asuccessor to HTML. I was there and I know. Tim Bray 07:24, 11 Dec 2004 (UTC)
- It might be more accurate to say that the press picked up on the idea that XML was a successor to HTML. It would be interesting to trace where that idea came from: obviously, "the next HTML" made better press than "SGML on the Web" (SGM-what???), so the idea spread fast in XML's first year or two. Whatever W3C working group members and staffers did or did not actually say, much of the early W3C XML specification work was related to generic (i.e. non-XHTML) XML in the browser -- think of XLink, XSL(T/-FO), XPointer, XML Stylesheet linking, and even DOM. Data-oriented XML specifications, like SOAP or XQuery, mostly came later. David Megginson 00:03, 7 Apr 2005 (UTC)
history
why is there no history of how XML came into being on this page?
- because you haven't written one.
- so somebody did. It was horribly wrong, so I re-wrote it.
Document model versus schema
I can see that document model might be confusing with document object model (although it's harder to see how it could be confused with DOM).
On the other hand, I found it very confusing to see schema used to describe the thing-that-you-validate-against and also to describe one particular validation technology. The capital letter is very subtle. I got the phrase document model out of the O'Reilly book (Template:Book reference). The term is used a few times, first in Section 1.1.2.2 Validity. It's also used (more ambiguously) in XML In A Nutshell.
Maybe there is some other phrase we could come up with? I would think that when writing for an encyclopedia, we would prefer clarity for non-specialist.
DanielVonEhren 02:31, 5 Feb 2005 (UTC)
- "Document model" is way too ambiguous IMO; I'm doubtful that you could find consensus on that choice of terminology if you're really referring to what is known in XML circles as a schema. To clarify my point on this, XML itself is a way of modeling a document, and the XML spec in fact describes two document models: the "physical" one, in which the document is comprised of a collection of entities consisting of encoded Unicode characters in certain allowable sequences; and the "logical" one, in which the document is comprised of elements, attributes, etc. …DOM, XPath, and the XML Information Set provide various alternative document models, at roughly the same level of abstraction. I would say that a schema is, at best, a specialization or superset of these models. I guess what I take issue with is the statement that a document is valid if it complies with a document model. Given the broad definition above, any well-formed document complies with various document models.
- So, if we accept that "document model" is too broad, and "schema" is too arcane, what are we to do? I think that perhaps something dealing with "rules" might be best. Maybe "content rules"? "user-defined content rules?" I'm afraid that's too narrow, but it might make the most sense to a newbie. On the other hand, I think the way it is now is fine. It introduces the term schema, provides a brief explanation of what a schema is, in this context, and links to a schema article where the reader can flesh out their knowledge.
- As for a better way to differentiate between "W3C XML Schema" vs (any) "XML schema", I'm open to suggestions. Not too long ago, the only mention of schemas in the XML-related articles were DTDs and (W3C) XML Schema (not consistently capitalized). I split the XML schema article in two in order to give an article on RELAX NG equal footing, and to disambiguate the idea of a schema in general, an XML-specific schema language, examples of specific languages, and schema instances. I'm sure it could still use some work; I was just happy to be able to get the RELAX NG reference in there. - mjb 07:49, 5 Feb 2005 (UTC)
Outside of a couple of nits, it looks like you and I are in broad agreement about the confusions and mis-directions. I'm not wedded to anything; I kind of liked your "content rules" idea.
As you've probably noticed, I've been doing various copyedits the last few days. IMO, there's lots of other basic improvements needed for this article, so I'm stickin' with the wording as it for now. Maybe if it marinates a bit, a better alternative will emerge (or maybe not).
One question though. I want to make sure I understand what you mean by:
I guess what I take issue with is the statement that a document is valid if it complies with a document model.
You're saying that there are many models (encoding, syntax, content), and a document has to comply with them all to be valid? The 1.1 Spec[1] (http://www.w3.org/TR/xml11/#dt-valid) says only
Definition: An XML document is valid if it has an associated document type declaration and if the document complies with the constraints expressed in it.
That definition might be too restrictive in our current context—talking about more than just DTDs)—but it points directly and only to the <mumble> (schema, document model, content rules, whatever).
DanielVonEhren 18:58, 5 Feb 2005 (UTC)
- No, that's not what I was saying. Giving too broad of criteria for validity is what you appeared to be doing in the article, when you wrote "A valid document has data that conforms to its document model" and "An XML document that complies with its document model in addition to being well-formed is said to be valid."
- As I mentioned above, all well-formed XML documents "comply with" many models: XML's physical and logical models, as well as those of the XML Information Set, DOM, and XPath. In other words, you said "its document model" as if there were only one model that could apply to an XML document, whereas there are actually many. Documents can comply with these models yet do not meet the real criteria for being valid.
- Also, more than one schema (the kind of model you intended to talk about) can apply to a single document. So it would still be wrong to refer to "its" schema; you have to say something like "a given schema" or "a particular schema." - mjb 21:11, 5 Feb 2005 (UTC)
Capitalization
The XML Recommendation (http://www.w3.org/TR/REC-xml/) uses the capitalization Extensible Markup Language, not eXtensible Markup Language, despite the "XML" abbreviation. Think of "X" as standing for "Ex". Dpm64 02:45, 7 Apr 2005 (UTC)
'obscure features'
"The syntax contains a number of obscure, unnecessary features borne of its legacy of SGML compatibility." Could someone elaborate upon what these obscure features actually are? porges 00:38, Apr 12, 2005 (UTC)
- Tags. :) Actually, this info is in the spec. Look for the phrases "for compatibility" and "for interoperability". Examples include "
--" being disallowed in comments, and the requirement that element content models be deterministic (see appendix E). I would guess that some would also consider notations, unparsed entities, and public identifiers to be legacy cruft as well. - mjb 01:14, 12 Apr 2005 (UTC)
- I was hoping to be able to add a short list into the article, but they really are obscure, and the list wouldn't do anything more than confuse :P About the only thing that people are likely to come across in "normal" usage of XML is the "
--" not being allowed in comments. porges 05:20, Apr 12, 2005 (UTC)
- I was hoping to be able to add a short list into the article, but they really are obscure, and the list wouldn't do anything more than confuse :P About the only thing that people are likely to come across in "normal" usage of XML is the "
"No facilities exist for randomly accessing or updating only portions of a document."
Does not DOM allow random-access? I'm not sure about others (XQuery, XPath, XUpdate), but some of them may provide either the former or latter parts of the statement as well. porges 02:07, Apr 13, 2005 (UTC)
- Yes, but not on disk. If you're using DOM, you cannot update a document unless you load it into memory, modify it, and write it out again. All of it, that is. There is no way to add or remote stuff in XML documents on disk (at least not that works for arbitrary XML files). Anon 15:50, 22 Jun 2005 (UTC)
- Hmm, then I think the statement should be qualified to refer to a serialized document. — mjb 17:48, 22 Jun 2005 (UTC)
Remove software links?
- I suggest that we eliminate all software links (open or closed source). XML is so widely implemented that it does not make sense to single out individual software packages here, and linking to software is an obvious opportunity for contributors to abuse the article for personal gain. David 00:00, 2005 May 29 (UTC)
- Given the lack of objections, I've gone ahead and drastically simplified the External Links section. There are, literally, thousands of specifications, tutorials, and software packages related to XML, so any list is arbitrary (should the ASCII list include every programming language and OS that supports ASCII?). Simplifying the list also diminishes the temptation to abuse this page for self-promotion of products, projects, specs, etc. David 21:10, 2005 Jun 17 (UTC)
Don't think this is a correct statement
The basic parsing requirements do not support a very wide array of data types, so parsing sometimes involves additional work in order to extract the desired data from a document. For example, there is no provision in XML for mandating that "3.14159" is a floating-point number rather than a seven-character string.
XML schema (and the set of basic types that are supplied) support floating point numbers, in addition to decimals (BCD) and double-precision floating point. Type checking is achieved via validation against the schema upon which the document is based. Keith Jun 10 2005.
- XML Schema support and PSVI modeling are most certainly NOT part of the basic parsing requirements of XML. (Also, sign your name with three or four tildes, like this: ~~~~. They will be converted to your Wikipedia username and a datestamp automatically.) — mjb 21:08, 10 Jun 2005 (UTC)
