Re: DTDs and XML Editors/Parsers
by "Frank Boumphrey" <bckman(at)ix.netcom.com>
|
Date: |
Tue, 7 Mar 2000 02:10:10 -0500 |
To: |
"Thomas G. Habing" <habing(at)acm.org>, "Murray Altheim" <altheim(at)eng.sun.com> |
Cc: |
<hwg-gutenberg-dtds(at)hwg.org> |
References: |
co sun co2 acm sun2 acm2 |
|
todo: View
Thread,
Original
|
|
Here is my element declaration
<!ENTITY % somecontent "|anotherelement">
<!ELEMENT myel (#PCDATA %somecontent;)>
I now decide that I want to do away with 'anotherelement' as content, so I
declare
<!ENTITY % somecontent ""
<!ENTITY % somecontent "|anotherelement">
<!ELEMENT myel (#PCDATA %somecontent;)>
This still parses.
Frank
----- Original Message -----
From: Thomas G. Habing <habing(at)acm.org>
To: Murray Altheim <altheim(at)eng.sun.com>
Cc: <hwg-gutenberg-dtds(at)hwg.org>
Sent: Tuesday, March 07, 2000 12:29 AM
Subject: Re: DTDs and XML Editors/Parsers
> Hi Murray,
>
> I just read your reply, and I think I understand your reasoning.
Although, I'm
> going to have to think about it a little before I agree or not....
>
> When redeclaring your content model, wouldn't it be cleaner (if not
easier) to
> just eliminate references to unneeded PEs, instead of declaring those PEs
to be
> empty strings? Or, would you do this to maintain backward compatability,
or as
> an aid to modularity?
>
> Tom
>
> Murray Altheim wrote:
>
> > "Thomas G. Habing" wrote:
> > >
> > > Hi Donna and all,
> > >
> > > I actually brought this issue up with Frank in an earlier message
about
> > > some other issues with the DTD. To quote:
> > >
> > > This is kind of nitpicking, but I generally prefer not to include the
> > > beginning or ending separators in parameter entity definitions. This
> > > can cause confusion when that entity is actually used elsewhere. For
> > > example, <!ENTITY % inline.class
> > > "|quote|emph|ital|reference|date|place|name|graphic|misc"> might be
> > > better as <!ENTITY % inline.class
> > > "quote|emph|ital|reference|date|place|name|graphic|misc">. Then when
it
> > >
> > > is used elsewhere it isn't separated using a space, such as <!ELEMENT
> > > pubinfo (#PCDATA|para|line %inline.class;)*> becomes <!ELEMENT pubinfo
> > > (#PCDATA|para|line|%inline.class;)*>. As I said, nitpicking....
> > [...]
> >
> > I'm not sure if you'd read my reply to Donna (I forgot to set the time
> > on my laptop, so it ended up with the wrong time), but there are fairly
> > good reasons for including the separator if it's expected that the
entire
> > parameter entity may end up being redeclared as an empty string. This
> > somewhat begs the question of why content models are necessarily
redeclared,
> > as this is rather unnecessary unless one is extending. The short answer
is
> > that the primary focus of XHTML modularization (which is where I've most
> > noticed this need) is extensibility, whereas in the Gutenberg DTDs this
> > might not be a requirement (although I note Frank has included it in his
> > requirements list).
> >
> > One thing I might also add is that this really only applies for
parameter
> > entities used primary in content models (or portions of) that are OR
> > groups. This is very common in DocBook and XHTML, hence the usage.
> >
> > Murray
> >
> >
...........................................................................
> > Murray Altheim
<mailto:altheim@eng.sun.com>
> > XML Technology Center
> > Sun Microsystems, Inc., MS MPK17-102, 1601 Willow Rd., Menlo Park, CA
94025
> >
> > the honey bee is sad and cross and wicked as a weasel
> > and when she perches on you boss she leaves a little measle -- archy
>
> --
> Thomas G. Habing
> mailto:habing(at)acm.org
>
>
HWG: hwg-gutenberg-dtds mailing list archives,
maintained by Webmasters @ IWA