![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
> I never understood why the closing tag must be named. What's the point?
A tiny increase in the ability to handle or at least detect malformed XML.
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Orchid XP v8 <voi### [at] dev null> wrote:
> Warp wrote:
> > I never understood why the closing tag must be named. What's the point?
> A tiny increase in the ability to handle or at least detect malformed XML.
Why should a program be able to try to guess what a malformed XML file
might be trying to say? There's no way of unambiguously tell what the
properly-formatted version would have looked like.
And if the XML file is malformed, it means that a person wrote it by hand.
Wouldn't it be better to directly tell the person that there's a mistake in
the file, rather than try to hide it, and possibly interpret it wrongly?
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
> Darren New <dne### [at] san rr com> wrote:
>> He makes a good point that
>> <integer>0</integer>
>> is a dumb-ass way of encoding data. :-)
>
> I never understood why the closing tag must be named. What's the point?
The point is to make it easy to check the data is formatted correctly.
In SGML, you could omit the closing tags when it wasn't ambiguous. If your
DTD said paragraphs cannot nest inside paragraphs, you could write
<p> first paragraph <p> second paragraph <p> third paragraph <section> next
just like you could in the very first versions of HTML.
XML tried to "simplify" it, but of course they simplified it for the writer
of the XML parser, rather than for the author of the XML data. SGML also
required a DTD, while XML can be parsed without.
Of course, you could just have </> mean "close the most recent tag that
hasn't been closed", and then you're really close to having s-expr's. ;-)
> I have always felt that XML is schizophrenic: It tries to be "human-
> readable", but at the same time it's *really* intended only for programs
> to read and generate. So it's trying to appeal to two completely different
> targets, and the result is a bloated mess.
Yep.
I see a lot of arguments that it's unnecessary to have both attributes and
nested CDATA. This argument, however, only comes from people who don't use
XML for markup. CDATA is the prose in your document. Attributes aren't. It's
pretty straightforward if you're using it for markup. If you're using it as
a wrapper for SOAP, then it doesn't make sense to have both attributes and
CDATA, but then it doesn't make sense to use XML to start with in that case.
> And rather unnecessarily at that, IMO. If they had done it with similar
> principles to LaTeX, it would have been human-readable, human-writable and
> relatively compact, all at the same time. Sure, it would have made XML parsers
> more complicated, but that's what programs are for: To ease the burden of
> people.
Agreed. Or, if they wanted a data transfer language like for SOAP or
whatever, use ASN.1. It's already standardized, easy to read, write, and
verify, and has both human-readable and compact and time-efficient
representations.
--
Darren New, San Diego CA, USA (PST)
Insanity is a small city on the western
border of the State of Mind.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>> I never understood why the closing tag must be named. What's the point?
>
> A tiny increase in the ability to handle or at least detect malformed XML.
For example lets say you have a very large document, and you
typo and omit a closure. With a named closure you continue parsing
the document until you hit the next closure, and see that it doesn't
match, so you can exit early with an error. If you have unnamed
closures, then you continue parsing until the end of the file, (or the
top level tag), where you can then generate an error that says there
are more tags than closures, but then that error can't say for sure
which closure is missing, since unnamed closures are interchangable.
Personally I find flat tags clearer than forcing them into trees.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
> Orchid XP v8 <voi### [at] dev null> wrote:
>> Warp wrote:
>
>>> I never understood why the closing tag must be named. What's the point?
>
>> A tiny increase in the ability to handle or at least detect malformed XML.
>
> Why should a program be able to try to guess what a malformed XML file
> might be trying to say? There's no way of unambiguously tell what the
> properly-formatted version would have looked like.
>
> And if the XML file is malformed, it means that a person wrote it by hand.
> Wouldn't it be better to directly tell the person that there's a mistake in
> the file, rather than try to hide it, and possibly interpret it wrongly?
>
Or.. It downloaded wrong (still does happen), got corrupted somehow,
your application you wrote yourself isn't "writing" it out correctly, etc.
Would be different, I supposed, if they had made it like code, and the
start tag was a "name", and everything else was between {}, or
something, but..
--
void main () {
if version = "Vista" {
call slow_by_half();
call DRM_everything();
}
call functional_code();
}
else
call crash_windows();
}
<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models,
3D Content, and 3D Software at DAZ3D!</A>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Darren New wrote:
> http://harmful.cat-v.org/software/xml/s-exp_vs_XML
...what the HELL?
Is this guy has I point, I don't know what it is. I must have missed it
somewhere between the outbursts of delusional raving.
Seriously. XML is overcomplicated and so forth, and there are all mannar
of technical complaints you could make about it, but I see very little
technical material in this drivel.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 22-6-2009 4:50, Tim Attwood wrote:
>
> Personally I find flat tags clearer than forcing them into trees.
Am I the only one to read that as 'flat tax'?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Patrick Elliott <sel### [at] npgcable com> wrote:
> Or.. It downloaded wrong (still does happen), got corrupted somehow,
> your application you wrote yourself isn't "writing" it out correctly, etc.
Named end tags are certainly not in any way the best way of dealing
with those problems.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Invisible wrote:
> Seriously. XML is overcomplicated and so forth, and there are all mannar
> of technical complaints you could make about it
http://www.w3.org/TR/xqueryx/#Examples
That's pretty special, right there...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
> Patrick Elliott <sel### [at] npgcable com> wrote:
>> Or.. It downloaded wrong (still does happen), got corrupted somehow,
>> your application you wrote yourself isn't "writing" it out correctly, etc.
>
> Named end tags are certainly not in any way the best way of dealing
> with those problems.
>
If you plan to have a machine look it over, true. Its "supposed" to be
sort of human readable though, and more conventional code type stuff,
especially if you are tired, can be damn hard to "see" mistakes in some
times. lol
--
void main () {
if version = "Vista" {
call slow_by_half();
call DRM_everything();
}
call functional_code();
}
else
call crash_windows();
}
<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models,
3D Content, and 3D Software at DAZ3D!</A>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |