Re: New FAQ: entities and NCRs

On Monday, July 4, 2005, 6:16:52 AM, Felix wrote:

FS> On Mon, 04 Jul 2005 12:11:26 +0900, Chris Lilley <chris@w3.org> wrote:

>> On Monday, July 4, 2005, 5:00:15 AM, Felix wrote:
>> FS> You'll need an XML DTD processor which expands the entity
>> FS> references before RelaxNG validation.
>>
>> Parsing XML requires an XML parser, which is required to expand entities
>> defined in the internal DTD subset. The infoset thus produced may then be
>> passed to a RelaxNG processor. There is no such thing as an "XML DTD
>> processor" separate from an XML parser.
>>
>> Perhaps you are confusing  parsing and DTD validation?

FS> Maybe.

(DTD) Validation is an optional feature in XML. There are
two classes of product, validating parsers and non validating parsers.

For non-validating parsers, fetching the external DTD subset is
optional(unfortunately there are no names for these two classes of
non-validating parser).

FS> Do you need an XML parser to produce the infoset on which RelaxNG
FS> validation takes place?

Yes.

FS> If the answer is yes, then I'm wrong and there is no problem. The
FS> RelaxNG spec for DTD compatibility [1] doesn't talk about that, but
FS> just says something like "We don't handle entity declarations":

Which means, RelaxNG (and indeed, same for W3C XML Schema) does not
provide an alternative mechanism that could be used to replace the
entity mechanism. For RelaxNG,this is because as a design decision,
RelaxNG only validates. It makes no change to the infoset. (W3C XML
Schema does make changes to the infoset, hence the term PSVI (post
schema validation infoset).

It does not mean, as you seemed to read it, that using RelaxNG disables
the built in entity expansion that XML parsers do.


-- 
 Chris Lilley                    mailto:chris@w3.org
 Chair, W3C SVG Working Group
 W3C Graphics Activity Lead

Received on Monday, 4 July 2005 14:27:34 UTC