Hi Rickard, thanks for your comments.

On Tue, May 25, 1999 at 07:30:31AM +0200, Rickard �berg wrote:
> Hi!
>
> I wrote:
> > As was mentioned by Constantine, namespaces in XML address this
> > problem, without breaking the important notion of document validity.
>
> Actually I'm not convinced one actually needs namesspaces for it.
> Example:
> <ejb-jar>
 .... (stuff deleted)
> </ejb-jar>

Namespaces is the standard way of doing precisely this sort of thing.
Simply adding tags, ala HTML, was something XML is designed to
discourage.

The reason XML was chosen for the new EJB deployment descriptor was to
encourage vendor interoperability and bean portability. If vendors
define their own DTDs, (btw, there's no inheritance in XML), then
we're back where we started.

> I wrote:
> > On the subject of validation, is there any reason why it was decided
> > not to specify any attributes in the tags for the XML format?
>
> I think the reason is, as Vlada stated, that some attributes couldn't be
> XML attributes because they needed to be multiline, so instead elements
> only was chosen for consistency (BTW, a decision that I agree with).

I disagree strongly. Attributes are a core part of the XML
specification.  Which attributes need to be multiline?

Consistency is achieved through effective DTD based validation, the
current DTD encourages document inconsistency. One of the best things
about XML is that you can define the DTD so that the parser does much
of the validation work for you.  Describing validation in comments in
the DTD suffers from ambiguity and requires each vendor to write new,
potentially buggy code to do validation that could be done, for free,
by well-tested parsers.

Another example, is XML linking. The current EJB DTD forces each
vendor to ensure that links are completely specified, for example,
between EJBs and datasources, ie. not dangling. By using the standard
ID and IDREF attributes, the XML parser would be able to ensure this
without the need for application logic.

>
> > The DTD in EJB1.1 serves to validate the hierarchy used in the
> > deployment descriptor, but not the content. I've been writing some XML
> > descriptor examples, and notice there is nothing in the DTD, comments
> > notwithstanding, to stop me specifying illegal values for any of the tags,
> > <transaction-type> and <reentrant> tags, for example.
>
> I don't see this as a problem as editors will be used to edit the XML
> files, and there will be validators available which cover all nasty
> rules.

This IS a problem. Another good thing about XML is that it can be read
and edited without special software. In any case, a good DTD will make
it easier to write these tools, enhance portability of deployment
descriptors, and improve overall quality.

My main point is that the spec. should try to make bean portability as
viable as possible. We all respect standards, otherwise we wouldn't be
on this list in the first place! My suggestion is that years of
experience in good DTD design from other parts of the industry should
be utilised before the spec. is finalised.

Malcolm

===========================================================================
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