Re: Unspecified #IMPLIED attributes in Java

Paul Prescod (papresco@technologist.com)
Fri, 19 Dec 1997 11:02:17 -0500


Toby Speight wrote:
>
> If I write a {grove, tree} builder, it would be useful to know whether
> a DTD was used, so that it can report an error to an application trying
> to access an attribute that was not declared (this may be the symptom
> of a typo, perhaps). If a DTD was not used for the parse, then the
> access should return null (as if the attribute were declared #IMPLIED).

The DSSSL model is that trying to access a random attribute merely
returns #f. Although this could allow a typo to pass, it has the benefit
of making stylesheets a little more robust to DTD variations. For
instance, the same stylesheet can work with various versions of HTML.

Paul Prescod