Re: Faulty DTD of Object element

"Joseph M. Reagle Jr." wrote:

> Ed is correct about the statement regarding ANY. (ANY = element types within
> the DTD). Consequently, we use #PCDATA. XML1.0 does permit MIXED content
> models:

Sorry, I did not know the exact meaning of #PCDATA (see below). With the
definition Ed gives for it , the DTD of Object seems to be what it should be ;-)

[...]

>         <!ELEMENT b (#PCDATA)>

[...]

> Such that we could do the following:
>         <!ELEMENT Object ((#PCDATA  | SignatureProperties | Manifest)*) >
>         <!ELEMENT KeyValue  ((#PCDATA | DSAKeyValue | RSAKeyValue )*) >

[...]

> However, while I can get XMetalPro to compile and validate instances with
> that declaration, I can't get IE (and I'm not sure if my declaration is bugg
> or not ...) so I avoid them.

I have also made this experience with a XML parser API from Sun: If I declare

  <!ELEMENT Object (#PCDATA)>

then the instance

  <Object>
    <ATag>Some text</ATag>
  </Object>

does not validate. The validating API parser throws an exception because it
only expects character data. So this parser does not behave like #PCDATA
is intended to mean (as Ed described in his contribution).

-- 
---------------------------------------------------------------
Gregor Karlinger
mailto://gregor.karlinger@iaik.at
Institute for Applied Information Processing and Communications
Austria
---------------------------------------------------------------

Received on Friday, 25 February 2000 03:17:02 UTC