Hi!

Rickard �berg wrote:

> Emmanuel Pirsch wrote:
> > You may gain a little for a little more consistence but you loose a lot in error
> > report. You do not use the capability of XML DTD to validate an XML file.
>
> Which becomes a non-issue if editors are used (mine is just finished and
> will be released in a couple of days).

It it not a non-issue because an validating editor will not always be used to produce 
the
XML descriptor. The more validation we can put on the root (DTD)) the better the spec 
will
be.

> But both Description and Reentrant are logical attributes of Entity,
> hence it becomes confusing if different rules apply to them.

Reentrant is a lofical attribute, Description is something that get added to the 
descriptor
without any effect regarding it's content. So Reentrant is really an attribute to the
Entity (and modify it's meaning) and Description is just something that get attached 
to it
to provide infromation about it (and it does not affect it's meaning).

> > If you really want to use only elements, go for it but at least for something like
> > the reentrant attribute do something like this:
> > <!ELEMENT Reentrant (False|True)>
> > <!ELEMENT False EMPTY>
> > <!ELEMENT True EMPTY>
>
> So the XML becomes:
> <entity>
>   <reentrant>
>     <true/>
>   </reentrant>
> </entity>
> ----
> Now, where's the elegance in that? The way it works now is fine IMO.

The example DTD extract I've put was to provide validation not elegance. In fact it
strengthen my argument about elegance because, as you said, it is not elegant at all.

> My view is that validation can be done much better and with higher
> control in Java-based editors, instead of trying to create messy XML
> rules (is it even possible?).

That's true that a Java application can do a better job at validation that only the 
DTD,
but putting the most validation in the DTD is better. It is the same as using a script
language (Javascript) vs a compiled language (java, c, ...), the script language as 
less
validation at first, but valid everything when it execute, the compiled language valid 
a
lot of thing at first and valid less when it execute.
The more we do validation in the parsing process (with the DTD) the less the 
application
will have to do validation when it interpret the DOM tree wich, imho, is better, 
especially
for something that is to bee a standard.

XML provide us with a lot of functionnality to describe the content of a document, why 
not
use it to it's full extent?

--
-----
Emmanuel Pirsch
Sun Certified Java Programmer
Unite for Java! - http://www.javalobby.org/
---
"The intuitive mind is a sacred gift and the rational mind is a faithful servant. We 
have
created a society that honors the servant and has forgotten the gift."
 - Albert Einstein.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to