ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glenn A. McAllister" <gl...@somanetworks.com>
Subject Re: question and idea.
Date Sat, 16 Feb 2002 20:39:55 GMT
On Sat, 16 Feb 2002, Jonathan Locke wrote:

Hey Jonathan.  Comments inline...

>
> > The problem is, it isn't XML.  Maybe I'm missing the point, but it seems
> > to me that you've just created YAML; XML is supposed to make the mechanism
> > of parsing these files easier by providing two well defined properties:
> > well-formedness and the potential to validate (partially) the structure of
> > the document.
>
> you bring up good points, to which i have a few responses that may or may
> not sway you...
>
>  - it's *not* YAML because it's not an ML.  it's limited (intentionally)
>    to tree structures (where XML describes document markup).

Ah, but XML is a mechanism to *define* (not describe) structured
documents.  The inherent structure is always tree like (at least, when
defined with a DTD, I'm not familiar enough with XMLSchema and the like to
comment) if it is a valid document.  Even a well-formed document is tree
like due to the requirement of matching begin and end tags.

<element attribute="blah">
    <element/>
    <someotherelement>
    </somotherelement>
</element>

How is this not tree like?

>  - it would support schemas and dtd's (which would stay the same) that
>    describe tree structured documents.  you would get all the well-formedness
>    and validation properties therein.

Again, since all valid XML documents require a DTD or schema, how can you
create non-tree like XML docuemnts?  Please show me an example of such a
document that is well formed and I'll capitulate on this point.  :-)

> > XML has been doing this for years.  Admittedly its a tad verbose, but
> > there are worse things.  Why reinvent the wheel yet again?
>
> i guess my root feeling here is that tree data is not really a document.
> it can certainly be *treated* as a document, but it's really a subclass
> of documentness.  it's treeness and so it seems reasonable to have a special
> syntax that is better able to describe "tree documents".

I'm just reiterating my point here that I'm pretty damn sure you can't
create a well formed (much less valid) XML document that isn't a tree.

>
> > The rules you have defined are fine as far as they go, but I'm willing to
> > bet there are lots of issues you haven't address.  For example, how do you
> > manage importing external documents?
>
> i don't think this *should* come up, as we're only replacing the SAX level
> of DOM.  it *should* in theory be 100% transparent to higher level things
> like document parsers, validators, schemas etc.  that is, if the XML people
> have done there job optimally...

But what you are proposing is to replace the parser, are you not?  The
entity replacement mechanism used to import (parts of) XML documents is a
function of the parser, obeying rules defined by a DTD - internal or
external.  So either you have to have to reimplement the entity
replacement mechanism defined by DTD or your schema language of choice, or
you have to define a new one.


Glenn McAllister
SOMA Networks, Inc.



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message