Re: A Conditional Section in QName Declaration..[XHTMLMOD]

<kjc777@nca.or.kr> wrote:

> <![%Inventory.prefixed; [
> <!ENTITY % Inventory.pfx "%Inventory.prefix;:">
> ]]>
> <!ENTITY % Inventory.pfx "">
> 
> [XHTMLMOD] says -
> "Define a parameter entity MODULE.pfx that is "%MODULE.prefix::" 
> when prefixing is enabled, and "" when it is not." 
> 
> In this example, initially the value of Inventory.prefixed is assigned for "IGNORE", so it makes sense.
> But, How about in the case of "INCLUDE"???
> I think the last line of this example is parsed always, so the prefix is configured as default XML namespace 
> in the namespace-aware parser.

See "4.2 Entity Declarations" of XML 1.0 [1].

   ... If the same entity is declared more than once, the first declaration
   encountered is binding; at user option, an XML processor may issue
   a warning if entities are declared multiple times.

So in the case of "INCLUDE", the first declaration is binding.

[1] http://www.w3.org/TR/REC-xml#sec-entity-decl

Regards,
-- 
Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium

Received on Saturday, 7 July 2001 07:52:05 UTC