OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Unnecessary well-formedness constraint

[ Lists Home | Date Index | Thread Index ]
  • From: "Paul W. Abrahams" <abrahams@valinet.com>
  • To: xml-dev <xml-dev@xml.org>
  • Date: Wed, 18 Oct 2000 14:34:24 -0400

"Hanson, Jon" wrote:

> i think the annotation is simple saying that something that looks like a
> parameter entity such as %Fred; that appears outside of a DTD will simple be
> interpreted as the text '%Fred;', not as a parameter entity.
> hence the constraint is necessary, otherwise the expression would be a
> parameter entity regardless of its context.

The problem is that what Rusty notes is a constraint, not an annotation.
According to Scripture, "[A validity constraint is] a rule which applies to all
valid XML documents.  Violations of validity constraints are errors; they must,
at user option, be reported by validating XML processors".

So if '%Fred;' appears outside of a DTD, the document is invalid and therefore
erroneous.   I agree with Rusty: that rule should not be a constraint.   The
obvious way to deal with that is to insert a (nonnormative) Note: "A parameter
entity appearing outside of a DTD is interpreted as ordinary text." or
something to that effect.

Paul Abrahams

> > -----Original Message-----
> > From: Elliotte Rusty Harold [SMTP:elharo@metalab.unc.edu]
> > Sent: Thursday, October 12, 2000 8:38 PM
> > To:   xml-dev
> > Subject:      Unnecessary well-formedness constraint
> >
> > Section 4-1 of the XML 1.0 second edition spec states:
> >
> >
> > Well-Formedness Constraint: In DTD
> > Parameter-entity references may only appear in the DTD.
> >
> >
> > The Annotated XML spec notes that:
> >
> > This constraint is not actually wrong, but it is rather misleading.
> > Suppose I have a parameter entity named Fred, then if the string %Fred;
> > appears somewhere in the document, outside of the DTD, that's not an
> > error as this suggests; it's just the string %Fred;.
> >
> > So my question is why is this constraint here at all? What is its
> > effect? If we removed it form the spec (say in the third edition) would
> > this in any way change which document are considered to be well-formed
> > or valid? Would removing it give parsers any leeway they don't have now?
> > Right now this seems like an unnecessary statement to me.





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS