The Artima Developer Community
Sponsored Link

Java Community News
Brett McLaughlin: What is XML Really Good For?

81 replies on 6 pages. Most recent reply: Mar 8, 2007 3:37 AM by Antti Tuomi

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 81 replies on 6 pages [ « | 1 ... 3 4 5 6 ]
James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Brett McLaughlin: What is XML Really Good For? Posted: Mar 6, 2007 5:53 PM
Reply to this message Reply
Advertisement
> > > I dislike python for the same reason. It's just too
> > easy
> > > open a file in a wrong editor and mess up the
> > indentation,
> >
> > Mess up the indention how? Remove it? What editors do
> > that?
> conversion between tabs and spaces combined with different
> spaces per tab settings.

How does this break Python indention?

> > > This is indeed a disadvantage of XML - as defined.
> > > It is, however, an unnecessary restriction, as all
> > > characters but " could have been allowed in
> attributes.
> >
> > Sure but we are talking about XML as it is, not what it
> > could be.
> I thought we were talking about both. This is a minor
> inconvenience for me though.

If you are arguing that XML could be improved upon then you are agreeing with me. That's my only point. XML has a lot of issues. It's not even close to being optimal in most of the contexts in which it is used.

> > > > age=18 & (!eyecolor=blue & voice=bass)
> > > I considered that but decided against it - because
> > schema
> > > (Relax NG btw.) auto-completion cannot support that -
> > > which I consider far more important. This is not a
> > general
> > > purpose language, a DSL!
> >
> > I don't see any need for auto-completion in such a
> simple
> > syntax.
> It does save time. Not for me, but for my co-workers who
> are probably glad if they have to figure out one thing
> less - there are still hundred other things left to figure
> out.
>
> > What make you think the above is a general purpose
> > e language?
> I said it's not a general purpose language.

Yes, that's right, you did. It doesn't change my question. Why does a non-general purpose language require the kind of features usually associated with general purpose languages? What was your point?

Gregor Zeitlinger

Posts: 108
Nickname: gregor
Registered: Aug, 2005

Re: Brett McLaughlin: What is XML Really Good For? Posted: Mar 6, 2007 10:40 PM
Reply to this message Reply
> > because schema document can get lost or may not be
> > available.
>
> So it just gets lost? Oops, I lost the schema? Just
> because a document looks a certain way does not mean that
> is the way it will always look. This is an extremely
> dangerous assumption that I have seen cause big
> production problems.
It's not an assumption on my part. I've seen cases where a schema was not available, did not exist, or obviously did not match the document.

On the contrary, it's extremely dangerous to assume that you do have a valid schema available.

Gregor Zeitlinger

Posts: 108
Nickname: gregor
Registered: Aug, 2005

Re: Brett McLaughlin: What is XML Really Good For? Posted: Mar 6, 2007 10:44 PM
Reply to this message Reply
> > XML also has it's advantages as interchange format.
> > Standardized Unicode support and namespaces are
> important
> > in this context. Without namespaces, it wouldn't be
> > possible to augment existing schemas by other vendors.
>
> I don't see how this is relevant. You aren't suggesting
> that only XML can allow for namespaces and unicode are you?
That's not what I said!
I said that namespaces are important when it comes to an interchange format, not that this feature is not available in XYZ. It is relevant, because all formats without namespace support are harder to use as interchange format.

Gregor Zeitlinger

Posts: 108
Nickname: gregor
Registered: Aug, 2005

Re: Brett McLaughlin: What is XML Really Good For? Posted: Mar 6, 2007 10:51 PM
Reply to this message Reply
> > I thought we were talking about both. This is a minor
> > inconvenience for me though.
>
> If you are arguing that XML could be improved upon then
> you are agreeing with me. That's my only point. XML has
> a lot of issues. It's not even close to being optimal in
> most of the contexts in which it is used.
Well, I don't agree with you on that one. I do think it's close to optimal.

> Why does a non-general purpose language require
> the kind of features usually associated with general
> purpose languages? What was your point?
Are you trying to ask me why

age=18 & (!eyecolor=blue & voice=bass)

would be a general purpose language? If so, why don't you say so explicitly?
Well, this example could be part of a general-purpose language (close to VB, Java). Isn't that obvious?

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Brett McLaughlin: What is XML Really Good For? Posted: Mar 7, 2007 7:31 AM
Reply to this message Reply
> It's not an assumption on my part. I've seen cases where a
> schema was not available, did not exist, or obviously did
> not match the document.

If a document does not match it's schema, the document is in fact invalid. If the schema is wrong, that's a different problem. If the schema does not exist, that's a problem in itself.

Just to be clear, I am not talking about the w3c schema per se but any predefined agreement of what data should be included in a document.

It is not possible to know what elements are required on a document without a schema of some sort. There is also no way to know that you have accounted for all possible documents. Most every broken piece of XML-related code I have fixed had this kind of mistake.

> On the contrary, it's extremely dangerous to assume that
> you do have a valid schema available.

How is it dangerous? Optimally, you validate against the schema before processing. If it is not valid, you find out why and do something to resolve it. What do you do? Guess and hope things work out?

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Brett McLaughlin: What is XML Really Good For? Posted: Mar 7, 2007 7:33 AM
Reply to this message Reply
> Are you trying to ask me why
>
> age=18 & (!eyecolor=blue & voice=bass)
>
> would be a general purpose language? If so, why don't you
> say so explicitly?

You brought up the whole thing and never made it clear what you meant by it. Now it's up to me to explain what you meant?

> Well, this example could be part of a general-purpose
> language (close to VB, Java). Isn't that obvious?

'Could' and 'is' are two different things. The XML version 'could' be general purpose too.

Antti Tuomi

Posts: 4
Nickname: hrnt
Registered: Dec, 2006

Re: Brett McLaughlin: What is XML Really Good For? Posted: Mar 8, 2007 3:37 AM
Reply to this message Reply
> Actually, data are neither hierarchical, nor relational.
> Data are functional, i.e. relations between data are
> defined by a mathematical function.

Considering that functions are relations, I don't understand what you mean. Function is just a set of ordered pairs (with some constraints), relations are more general.

Flat View: This topic has 81 replies on 6 pages [ « | 3  4  5  6 ]
Topic: Martin Fowler Takes ANTLR for a Test Drive Previous Topic   Next Topic Topic: Desklets for Java

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use