Re: [xml] Attribute default value

Date view Thread view Subject view Author view

From: Stephane Conversy (Stephane.Conversy@lri.fr)
Date: Tue Aug 24 1999 - 11:04:10 EDT


Daniel Veillard wrote:

> On Tue, Aug 24, 1999 at 04:23:18PM +0200, Stephane Conversy wrote:
> >
> > What is the behavior of on xml parser for an attribute that is declared
> > to have
> > a default value in the dtd ?
> >
> > In a document that do not precise this attribute for an element, is the
> > parser
> > supposed to create a node with the default value or is it supposed to do
> > nothing ?
>
> Honnestly, i don't know ! I don't currently add them if missing.
> this is yet another configuration option which could be added to the
> parser :-\
>
> Daniel
>

as usual, I should have read the spec before asking:

"If a default value is declared, when an XML
processor encounters an omitted attribute, it is to behave as though the
attribute were present with the
declared default value."

I think the correct behaviour is for the parser to create a node.

    stef

--
Stéphane Conversy
http://www-ihm.lri.fr/~conversy/
mailto:conversy@lri.fr

---- Message from the list xml@rufus.w3.org Archived at : http://rufus.w3.org/veillard/XML/messages to unsubscribe: echo "unsubscribe xml" | mail majordomo@rufus.w3.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:29:43 EDT