You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Daniel Schroeder <da...@mozquito.com> on 2000/05/04 20:21:01 UTC

XHTML 1.1 DTD not parsable with Xerces-C

I tried running a very simple HTML document that is based on the XHTML 1.1
DTD (as created by Murray Altheim of Sun) through Xerces-C. This DTD
contains the following paragraph:


<!ENTITY % xhtml-prefw-redecl.module "IGNORE" >
<![%xhtml-prefw-redecl.module;[
%xhtml-prefw-redecl.mod;
<!-- end of xhtml-prefw-redecl.module -->]]>

Note the difference between %xhtml-prefw-redecl.module and
%xhtml-prefw-redecl.mod.

The point is now that %xhtml-prefw-redecl.mod is never defined or declared
anywhere in that DTD, so that Xerces-C throws a Fatal Error message "Entity
'xhtml-prefw-redecl.mod' was not found".

My question is now: should Xerces-C try to read that entity, or should it
silently ignore it? Chapter 3.4 of the XML 1.0 W3C Recommendation states:
"Note that for reliable parsing, the contents of even ignored conditional
sections must be read in order to detect nested conditional sections and
ensure that the end of the outermost (ignored) conditional section is
properly detected". However, the IBM Java Parser that we used to use *does*
ignore it, and does not generate an error.

As is, the XHTML 1.1 DTD is not parsable with Xercex-C. I also sent Murray
Altheim an email asking him for comments.

What does everybody think?

  Daniel

-- ------------------------------
Daniel Schröder (daniel@mozquito.com)
Senior Software Engineer
Stack Overflow AG



Re: XHTML 1.1 DTD not parsable with Xerces-C

Posted by Dean Roddey <dr...@charmedquark.com>.
I'll send in a patch for it tonight. It shouldn't be a big issue.

--------------------------
Dean Roddey
The CIDLib Class Libraries
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"Give me immortality, or give me death"

----- Original Message -----
From: "Daniel Schroeder" <da...@mozquito.com>
To: <xe...@xml.apache.org>
Sent: Thursday, May 11, 2000 12:30 AM
Subject: RE: XHTML 1.1 DTD not parsable with Xerces-C


>
> So, as nobody has objected (or is nobody really interested in that topic?
> ;-)), could that change be implemented? The XHTML-1.1 DTD is not yet used,
> but *when* it will, I feel it's important that Xerces-C can validate
against
> it.
>
> The problem was that Xerces tries to expand a parameter entity reference
> even if it's in an IGNORE clause, and if that parameter entity is
undefined,
> it creates an error.
>



Re: XHTML 1.1 DTD not parsable with Xerces-C

Posted by Dean Roddey <dr...@charmedquark.com>.
I don't have time to look too deeply right now, since I'm just home for
lunch. But, its got to be something deeper than it immediately appears. If
you look at DTDValidator::scanIgnoredSection(), which is what skips over
ignored parts. This code does not look for or expand PE refs. So something
else is going on that's not immediately apprarent.

--------------------------
Dean Roddey
The CIDLib Class Libraries
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"Give me immortality, or give me death"

----- Original Message -----
> The problem is clearly a bug in the parser, based on the statement in the
> XML Errata document, so yes, I care and it needs to be fixed.
>
> I've entered it onto my local bug list - the offical bug system being
down.
> If anyone already has a patch for the problem and would like to share it,
> please do.
>



Re: XHTML 1.1 DTD not parsable with Xerces-C

Posted by Andy Heninger <an...@jtcsv.com>.
The problem is clearly a bug in the parser, based on the statement in the
XML Errata document, so yes, I care and it needs to be fixed.

I've entered it onto my local bug list - the offical bug system being down.
If anyone already has a patch for the problem and would like to share it,
please do.

  Thanks,

  -- Andy

----- Original Message -----
From: "Daniel Schroeder" <da...@mozquito.com>


>
> So, as nobody has objected (or is nobody really interested in that topic?
> ;-)), could that change be implemented? The XHTML-1.1 DTD is not yet used,
> but *when* it will, I feel it's important that Xerces-C can validate
against
> it.
>
> The problem was that Xerces tries to expand a parameter entity reference
> even if it's in an IGNORE clause, and if that parameter entity is
undefined,
> it creates an error.
>
>


Re: XHTML 1.1 DTD not parsable with Xerces-C

Posted by Mike Pogue <mp...@apache.org>.
AH, too bad.   I want to encourage people to jump in and help, rather than 
just asking the current set of people to do the work!...This is open source,
so we can always use more people working on the code!

In this case, Dean fixed it, and Andy H just added the fix to CVS.  So,
you can pick up the fix there (you'll need to rebuild yourself..)

Mike

Daniel Schroeder wrote:
> 
> I would, but I'm still too new to XML parsers, so I need to learn some more
> before I feel I should start messing with the source code.
> 
> Ask again in a few months. :-)
> 
> Daniel
> 
> -- ------------------------------
> Daniel Schröder (daniel@mozquito.com)
> Senior Software Engineer
> Stack Overflow AG
> 
> Phone: +49-89-76736370
> 
> > -----Original Message-----
> > From: Mike Pogue [mailto:mpogue@apache.org]
> > Sent: Thursday, May 11, 2000 5:48 PM
> > To: xerces-c-dev@xml.apache.org
> > Subject: Re: XHTML 1.1 DTD not parsable with Xerces-C
> >
> >
> > As soon as somebody has time...are you volunteering?  :-)
> >
> > Mike
> >
> > Daniel Schroeder wrote:
> > >
> > > So, as nobody has objected (or is nobody really interested in
> > that topic?
> > > ;-)), could that change be implemented? The XHTML-1.1 DTD is
> > not yet used,
> > > but *when* it will, I feel it's important that Xerces-C can
> > validate against
> > > it.
> > >
> > > The problem was that Xerces tries to expand a parameter entity reference
> > > even if it's in an IGNORE clause, and if that parameter entity
> > is undefined,
> > > it creates an error.
> > >
> > > Regards
> > >   Daniel
> > >
> > > -- ------------------------------
> > > Daniel Schröder (daniel@mozquito.com)
> > > Senior Software Engineer
> > > Stack Overflow AG
> > >
> > > > -----Original Message-----
> > > > From: Dean Roddey [mailto:droddey@charmedquark.com]
> > > > Sent: Saturday, May 06, 2000 3:11 AM
> > > > To: xerces-c-dev@xml.apache.org
> > > > Subject: Re: XHTML 1.1 DTD not parsable with Xerces-C
> > > >
> > > >
> > > > So really its just a matter of skipping 'top level' parameter
> > > > entities, not
> > > > parameter entities in general. I'd be willing to believe that. But all
> > > > others have to be parsed in order to successfully parse the
> > > > contents. If the
> > > > general consensus is that this should be done, it would be
> > reasonably easy
> > > > to do.
> > > >
> > > > --------------------------
> > > > Dean Roddey
> > > > The CIDLib Class Libraries
> > > > Charmed Quark Software
> > > > droddey@charmedquark.com
> > > > http://www.charmedquark.com
> > > >
> > > > "Give me immortality, or give me death"
> > > >
> > > > ----- Original Message -----
> > > > From: "Daniel Schroeder" <da...@mozquito.com>
> > > > To: <xe...@xml.apache.org>
> > > > Sent: Friday, May 05, 2000 3:32 AM
> > > > Subject: RE: XHTML 1.1 DTD not parsable with Xerces-C
> > > >
> > > >
> > > > > I should have included more of Murray's response in my
> > previous post -
> > > > > sorry. Here's the rest:
> > > > >
> > > > > -------------------------
> > > > >
> > > > > "The contents of ignored conditional sections should be
> > read, but this
> > > > > doesn't imply that parameter entities should be expanded, especially
> > > > > since entities are required in XML to be self-contained (ie., you
> > > > > couldnt' have a start tag in one, end tag in a different
> > one). This is
> > > > > a bug in the Xerces parser.
> > > > >
> > > > > Put it another way: the whole purpose of ignored
> > conditional sections is
> > > > > to *not* process the internal content. A parser is required
> > to parse the
> > > > > internal content to be aware of any nested conditional
> > sections (so that
> > > > > the properly nested ']]>' is detected), but even in case like:
> > > > >
> > > > >  <![%condsectkey1;[
> > > > >    <![%condsectkey2;[
> > > > >       %parameterent;
> > > > >     ]]>
> > > > >   ]]>
> > > > >
> > > > > the value of %condsectkey2; is irrelevant, since all contents
> > > > of the outer
> > > > > section are ignored regardless of the value of
> > %condsectkey2;. No parser
> > > > > should be expected to expand %parameterent; under any circumstance.
> > > > >
> > > > > I'm not sure who on the Xerces team receives bug reports,
> > but one should
> > > > > be filed."
> > > > >
> > > > > -------------------------
> > > > >
> > > > > Regards
> > > > >   Daniel
> > > > >
> > > > >
> > > > > -- ------------------------------
> > > > > Daniel Schröder (daniel@mozquito.com)
> > > > > Senior Software Engineer
> > > > > Stack Overflow AG
> > > > >
> > > > > Phone: +49-89-76736370
> > > > >
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > > > > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > > > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

RE: XHTML 1.1 DTD not parsable with Xerces-C

Posted by Daniel Schroeder <da...@mozquito.com>.
I would, but I'm still too new to XML parsers, so I need to learn some more
before I feel I should start messing with the source code.

Ask again in a few months. :-)

Daniel

-- ------------------------------
Daniel Schröder (daniel@mozquito.com)
Senior Software Engineer
Stack Overflow AG

Phone: +49-89-76736370

> -----Original Message-----
> From: Mike Pogue [mailto:mpogue@apache.org]
> Sent: Thursday, May 11, 2000 5:48 PM
> To: xerces-c-dev@xml.apache.org
> Subject: Re: XHTML 1.1 DTD not parsable with Xerces-C
>
>
> As soon as somebody has time...are you volunteering?  :-)
>
> Mike
>
> Daniel Schroeder wrote:
> >
> > So, as nobody has objected (or is nobody really interested in
> that topic?
> > ;-)), could that change be implemented? The XHTML-1.1 DTD is
> not yet used,
> > but *when* it will, I feel it's important that Xerces-C can
> validate against
> > it.
> >
> > The problem was that Xerces tries to expand a parameter entity reference
> > even if it's in an IGNORE clause, and if that parameter entity
> is undefined,
> > it creates an error.
> >
> > Regards
> >   Daniel
> >
> > -- ------------------------------
> > Daniel Schröder (daniel@mozquito.com)
> > Senior Software Engineer
> > Stack Overflow AG
> >
> > > -----Original Message-----
> > > From: Dean Roddey [mailto:droddey@charmedquark.com]
> > > Sent: Saturday, May 06, 2000 3:11 AM
> > > To: xerces-c-dev@xml.apache.org
> > > Subject: Re: XHTML 1.1 DTD not parsable with Xerces-C
> > >
> > >
> > > So really its just a matter of skipping 'top level' parameter
> > > entities, not
> > > parameter entities in general. I'd be willing to believe that. But all
> > > others have to be parsed in order to successfully parse the
> > > contents. If the
> > > general consensus is that this should be done, it would be
> reasonably easy
> > > to do.
> > >
> > > --------------------------
> > > Dean Roddey
> > > The CIDLib Class Libraries
> > > Charmed Quark Software
> > > droddey@charmedquark.com
> > > http://www.charmedquark.com
> > >
> > > "Give me immortality, or give me death"
> > >
> > > ----- Original Message -----
> > > From: "Daniel Schroeder" <da...@mozquito.com>
> > > To: <xe...@xml.apache.org>
> > > Sent: Friday, May 05, 2000 3:32 AM
> > > Subject: RE: XHTML 1.1 DTD not parsable with Xerces-C
> > >
> > >
> > > > I should have included more of Murray's response in my
> previous post -
> > > > sorry. Here's the rest:
> > > >
> > > > -------------------------
> > > >
> > > > "The contents of ignored conditional sections should be
> read, but this
> > > > doesn't imply that parameter entities should be expanded, especially
> > > > since entities are required in XML to be self-contained (ie., you
> > > > couldnt' have a start tag in one, end tag in a different
> one). This is
> > > > a bug in the Xerces parser.
> > > >
> > > > Put it another way: the whole purpose of ignored
> conditional sections is
> > > > to *not* process the internal content. A parser is required
> to parse the
> > > > internal content to be aware of any nested conditional
> sections (so that
> > > > the properly nested ']]>' is detected), but even in case like:
> > > >
> > > >  <![%condsectkey1;[
> > > >    <![%condsectkey2;[
> > > >       %parameterent;
> > > >     ]]>
> > > >   ]]>
> > > >
> > > > the value of %condsectkey2; is irrelevant, since all contents
> > > of the outer
> > > > section are ignored regardless of the value of
> %condsectkey2;. No parser
> > > > should be expected to expand %parameterent; under any circumstance.
> > > >
> > > > I'm not sure who on the Xerces team receives bug reports,
> but one should
> > > > be filed."
> > > >
> > > > -------------------------
> > > >
> > > > Regards
> > > >   Daniel
> > > >
> > > >
> > > > -- ------------------------------
> > > > Daniel Schröder (daniel@mozquito.com)
> > > > Senior Software Engineer
> > > > Stack Overflow AG
> > > >
> > > > Phone: +49-89-76736370
> > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > > > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>


Re: XHTML 1.1 DTD not parsable with Xerces-C

Posted by Mike Pogue <mp...@apache.org>.
As soon as somebody has time...are you volunteering?  :-)

Mike

Daniel Schroeder wrote:
> 
> So, as nobody has objected (or is nobody really interested in that topic?
> ;-)), could that change be implemented? The XHTML-1.1 DTD is not yet used,
> but *when* it will, I feel it's important that Xerces-C can validate against
> it.
> 
> The problem was that Xerces tries to expand a parameter entity reference
> even if it's in an IGNORE clause, and if that parameter entity is undefined,
> it creates an error.
> 
> Regards
>   Daniel
> 
> -- ------------------------------
> Daniel Schröder (daniel@mozquito.com)
> Senior Software Engineer
> Stack Overflow AG
> 
> > -----Original Message-----
> > From: Dean Roddey [mailto:droddey@charmedquark.com]
> > Sent: Saturday, May 06, 2000 3:11 AM
> > To: xerces-c-dev@xml.apache.org
> > Subject: Re: XHTML 1.1 DTD not parsable with Xerces-C
> >
> >
> > So really its just a matter of skipping 'top level' parameter
> > entities, not
> > parameter entities in general. I'd be willing to believe that. But all
> > others have to be parsed in order to successfully parse the
> > contents. If the
> > general consensus is that this should be done, it would be reasonably easy
> > to do.
> >
> > --------------------------
> > Dean Roddey
> > The CIDLib Class Libraries
> > Charmed Quark Software
> > droddey@charmedquark.com
> > http://www.charmedquark.com
> >
> > "Give me immortality, or give me death"
> >
> > ----- Original Message -----
> > From: "Daniel Schroeder" <da...@mozquito.com>
> > To: <xe...@xml.apache.org>
> > Sent: Friday, May 05, 2000 3:32 AM
> > Subject: RE: XHTML 1.1 DTD not parsable with Xerces-C
> >
> >
> > > I should have included more of Murray's response in my previous post -
> > > sorry. Here's the rest:
> > >
> > > -------------------------
> > >
> > > "The contents of ignored conditional sections should be read, but this
> > > doesn't imply that parameter entities should be expanded, especially
> > > since entities are required in XML to be self-contained (ie., you
> > > couldnt' have a start tag in one, end tag in a different one). This is
> > > a bug in the Xerces parser.
> > >
> > > Put it another way: the whole purpose of ignored conditional sections is
> > > to *not* process the internal content. A parser is required to parse the
> > > internal content to be aware of any nested conditional sections (so that
> > > the properly nested ']]>' is detected), but even in case like:
> > >
> > >  <![%condsectkey1;[
> > >    <![%condsectkey2;[
> > >       %parameterent;
> > >     ]]>
> > >   ]]>
> > >
> > > the value of %condsectkey2; is irrelevant, since all contents
> > of the outer
> > > section are ignored regardless of the value of %condsectkey2;. No parser
> > > should be expected to expand %parameterent; under any circumstance.
> > >
> > > I'm not sure who on the Xerces team receives bug reports, but one should
> > > be filed."
> > >
> > > -------------------------
> > >
> > > Regards
> > >   Daniel
> > >
> > >
> > > -- ------------------------------
> > > Daniel Schröder (daniel@mozquito.com)
> > > Senior Software Engineer
> > > Stack Overflow AG
> > >
> > > Phone: +49-89-76736370
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

RE: XHTML 1.1 DTD not parsable with Xerces-C

Posted by Daniel Schroeder <da...@mozquito.com>.
So, as nobody has objected (or is nobody really interested in that topic?
;-)), could that change be implemented? The XHTML-1.1 DTD is not yet used,
but *when* it will, I feel it's important that Xerces-C can validate against
it.

The problem was that Xerces tries to expand a parameter entity reference
even if it's in an IGNORE clause, and if that parameter entity is undefined,
it creates an error.

Regards
  Daniel

-- ------------------------------
Daniel Schröder (daniel@mozquito.com)
Senior Software Engineer
Stack Overflow AG

> -----Original Message-----
> From: Dean Roddey [mailto:droddey@charmedquark.com]
> Sent: Saturday, May 06, 2000 3:11 AM
> To: xerces-c-dev@xml.apache.org
> Subject: Re: XHTML 1.1 DTD not parsable with Xerces-C
>
>
> So really its just a matter of skipping 'top level' parameter
> entities, not
> parameter entities in general. I'd be willing to believe that. But all
> others have to be parsed in order to successfully parse the
> contents. If the
> general consensus is that this should be done, it would be reasonably easy
> to do.
>
> --------------------------
> Dean Roddey
> The CIDLib Class Libraries
> Charmed Quark Software
> droddey@charmedquark.com
> http://www.charmedquark.com
>
> "Give me immortality, or give me death"
>
> ----- Original Message -----
> From: "Daniel Schroeder" <da...@mozquito.com>
> To: <xe...@xml.apache.org>
> Sent: Friday, May 05, 2000 3:32 AM
> Subject: RE: XHTML 1.1 DTD not parsable with Xerces-C
>
>
> > I should have included more of Murray's response in my previous post -
> > sorry. Here's the rest:
> >
> > -------------------------
> >
> > "The contents of ignored conditional sections should be read, but this
> > doesn't imply that parameter entities should be expanded, especially
> > since entities are required in XML to be self-contained (ie., you
> > couldnt' have a start tag in one, end tag in a different one). This is
> > a bug in the Xerces parser.
> >
> > Put it another way: the whole purpose of ignored conditional sections is
> > to *not* process the internal content. A parser is required to parse the
> > internal content to be aware of any nested conditional sections (so that
> > the properly nested ']]>' is detected), but even in case like:
> >
> >  <![%condsectkey1;[
> >    <![%condsectkey2;[
> >       %parameterent;
> >     ]]>
> >   ]]>
> >
> > the value of %condsectkey2; is irrelevant, since all contents
> of the outer
> > section are ignored regardless of the value of %condsectkey2;. No parser
> > should be expected to expand %parameterent; under any circumstance.
> >
> > I'm not sure who on the Xerces team receives bug reports, but one should
> > be filed."
> >
> > -------------------------
> >
> > Regards
> >   Daniel
> >
> >
> > -- ------------------------------
> > Daniel Schröder (daniel@mozquito.com)
> > Senior Software Engineer
> > Stack Overflow AG
> >
> > Phone: +49-89-76736370
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>


Re: XHTML 1.1 DTD not parsable with Xerces-C

Posted by Dean Roddey <dr...@charmedquark.com>.
So really its just a matter of skipping 'top level' parameter entities, not
parameter entities in general. I'd be willing to believe that. But all
others have to be parsed in order to successfully parse the contents. If the
general consensus is that this should be done, it would be reasonably easy
to do.

--------------------------
Dean Roddey
The CIDLib Class Libraries
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"Give me immortality, or give me death"

----- Original Message -----
From: "Daniel Schroeder" <da...@mozquito.com>
To: <xe...@xml.apache.org>
Sent: Friday, May 05, 2000 3:32 AM
Subject: RE: XHTML 1.1 DTD not parsable with Xerces-C


> I should have included more of Murray's response in my previous post -
> sorry. Here's the rest:
>
> -------------------------
>
> "The contents of ignored conditional sections should be read, but this
> doesn't imply that parameter entities should be expanded, especially
> since entities are required in XML to be self-contained (ie., you
> couldnt' have a start tag in one, end tag in a different one). This is
> a bug in the Xerces parser.
>
> Put it another way: the whole purpose of ignored conditional sections is
> to *not* process the internal content. A parser is required to parse the
> internal content to be aware of any nested conditional sections (so that
> the properly nested ']]>' is detected), but even in case like:
>
>  <![%condsectkey1;[
>    <![%condsectkey2;[
>       %parameterent;
>     ]]>
>   ]]>
>
> the value of %condsectkey2; is irrelevant, since all contents of the outer
> section are ignored regardless of the value of %condsectkey2;. No parser
> should be expected to expand %parameterent; under any circumstance.
>
> I'm not sure who on the Xerces team receives bug reports, but one should
> be filed."
>
> -------------------------
>
> Regards
>   Daniel
>
>
> -- ------------------------------
> Daniel Schröder (daniel@mozquito.com)
> Senior Software Engineer
> Stack Overflow AG
>
> Phone: +49-89-76736370
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>


RE: XHTML 1.1 DTD not parsable with Xerces-C

Posted by Daniel Schroeder <da...@mozquito.com>.
I should have included more of Murray's response in my previous post -
sorry. Here's the rest:

-------------------------

"The contents of ignored conditional sections should be read, but this
doesn't imply that parameter entities should be expanded, especially
since entities are required in XML to be self-contained (ie., you
couldnt' have a start tag in one, end tag in a different one). This is
a bug in the Xerces parser.

Put it another way: the whole purpose of ignored conditional sections is
to *not* process the internal content. A parser is required to parse the
internal content to be aware of any nested conditional sections (so that
the properly nested ']]>' is detected), but even in case like:

 <![%condsectkey1;[
   <![%condsectkey2;[
      %parameterent;
    ]]>
  ]]>

the value of %condsectkey2; is irrelevant, since all contents of the outer
section are ignored regardless of the value of %condsectkey2;. No parser
should be expected to expand %parameterent; under any circumstance.

I'm not sure who on the Xerces team receives bug reports, but one should
be filed."

-------------------------

Regards
  Daniel


-- ------------------------------
Daniel Schröder (daniel@mozquito.com)
Senior Software Engineer
Stack Overflow AG

Phone: +49-89-76736370


RE: XHTML 1.1 DTD not parsable with Xerces-C

Posted by Daniel Schroeder <da...@mozquito.com>.
Murray replied as follows:

"The contents of ignored conditional sections should be read, but this
doesn't imply that parameter entities should be expanded, especially since
entities are required in XML to be self-contained (ie., you couldnt' have a
start tag in one, end tag in a different one). This is a bug in the Xerces
parser."


Also, I found the following in the XML errata document:

"Section 3.4: Append the following to the second sentence of the second
paragraph after the table of productions: "; parameter entity references are
not recognized within an ignored conditional section."

I am not really an XML specification expert, so I dare not judge who is
right here. However, currently the XHTML 1.1 DTD and the Xerces-C parser
cannot be used together, and this is dissatisfying. So some action seems to
be necessary.

Thanks
  Daniel

-- ------------------------------
Daniel Schröder (daniel@mozquito.com)
Senior Software Engineer
Stack Overflow AG

Phone: +49-89-76736370

> -----Original Message-----
> From: Dean Roddey [mailto:droddey@charmedquark.com]
> Sent: Friday, May 05, 2000 2:20 AM
> To: xerces-c-dev@xml.apache.org
> Subject: Re: XHTML 1.1 DTD not parsable with Xerces-C
>
>
> My belief (of course :-) is that if you are going to correctly
> handle nested
> conditionals, that includes parsing the referenced entities. But, someone
> could prove me wrong I guess.
>
> --------------------------
> Dean Roddey
> The CIDLib Class Libraries
> Charmed Quark Software
> droddey@charmedquark.com
> http://www.charmedquark.com
>
> "Give me immortality, or give me death"
>
> ----- Original Message -----
> From: "Daniel Schroeder" <da...@mozquito.com>
> To: <xe...@xml.apache.org>
> Sent: Thursday, May 04, 2000 11:21 AM
> Subject: XHTML 1.1 DTD not parsable with Xerces-C
>
>
> >
> > I tried running a very simple HTML document that is based on
> the XHTML 1.1
> > DTD (as created by Murray Altheim of Sun) through Xerces-C. This DTD
> > contains the following paragraph:
> >
> >
> > <!ENTITY % xhtml-prefw-redecl.module "IGNORE" >
> > <![%xhtml-prefw-redecl.module;[
> > %xhtml-prefw-redecl.mod;
> > <!-- end of xhtml-prefw-redecl.module -->]]>
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>


Re: XHTML 1.1 DTD not parsable with Xerces-C

Posted by Dean Roddey <dr...@charmedquark.com>.
My belief (of course :-) is that if you are going to correctly handle nested
conditionals, that includes parsing the referenced entities. But, someone
could prove me wrong I guess.

--------------------------
Dean Roddey
The CIDLib Class Libraries
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"Give me immortality, or give me death"

----- Original Message -----
From: "Daniel Schroeder" <da...@mozquito.com>
To: <xe...@xml.apache.org>
Sent: Thursday, May 04, 2000 11:21 AM
Subject: XHTML 1.1 DTD not parsable with Xerces-C


>
> I tried running a very simple HTML document that is based on the XHTML 1.1
> DTD (as created by Murray Altheim of Sun) through Xerces-C. This DTD
> contains the following paragraph:
>
>
> <!ENTITY % xhtml-prefw-redecl.module "IGNORE" >
> <![%xhtml-prefw-redecl.module;[
> %xhtml-prefw-redecl.mod;
> <!-- end of xhtml-prefw-redecl.module -->]]>
>