Click here to get back home

DTD? Is address element block or inline?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
DTD? Is address element block or inline? Eric Lindsay 12-15-2005
Posted by Eric Lindsay on December 15, 2005, 10:16 pm
Please log in for more thread options


I'm trying to learn how to read a DTD I wanted to use,
http://www.w3.org/TR/html4/strict.dtd
to ensure I was treating each element correctly in terms of being block,
inline, or flow (either).

<!ENTITY % block
"P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">

<!ENTITY % flow "%block; | %inline;">

The way I read that was the block elements included ADDRESS. However
the next item related to ADDRESS was

<!ELEMENT ADDRESS - - (%inline;)* -- information on author -->
<!ATTLIST ADDRESS
%attrs; -- %coreattrs, %i18n, %events --
>

This seemed to me to be saying that the element ADDRESS requires opening
and closing tags, is an INLINE element that can be left out, or used one
or more times.

Can anyone explain to me what I am misunderstanding?

--
http://www.ericlindsay.com

Posted by Steve Pugh on December 15, 2005, 8:12 am
Please log in for more thread options


Eric Lindsay wrote:
> I'm trying to learn how to read a DTD I wanted to use,
> http://www.w3.org/TR/html4/strict.dtd
> to ensure I was treating each element correctly in terms of being block,
> inline, or flow (either).
>
> <!ENTITY % block
> "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
> BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">
>
> <!ENTITY % flow "%block; | %inline;">
>
> The way I read that was the block elements included ADDRESS. However
> the next item related to ADDRESS was
>
> <!ELEMENT ADDRESS - - (%inline;)* -- information on author -->
> <!ATTLIST ADDRESS
> %attrs; -- %coreattrs, %i18n, %events --
> >
>
> This seemed to me to be saying that the element ADDRESS requires opening
> and closing tags, is an INLINE element that can be left out, or used one
> or more times.

No, it's saying that the content of the address element must be
%inline.

Steve


Posted by Gus Richter on December 15, 2005, 12:34 pm
Please log in for more thread options


Eric Lindsay wrote:
> I'm trying to learn how to read a DTD I wanted to use,
> http://www.w3.org/TR/html4/strict.dtd
> to ensure I was treating each element correctly in terms of being block,
> inline, or flow (either).

There are just block or inline elements.
Flow is an "entity" which may be either inline or block.

> <!ENTITY % block
> "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
> BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">

This defines which elements are block type.
The %heading, %list and %preformatted entities are expanded elewhere
(permissable content type for each).

> <!ENTITY % flow "%block; | %inline;">

The % flow entity is defined to be either Block or Inline.

> The way I read that was the block elements included ADDRESS.

Correct. The ADDRESS element is defined to be block type.

> However
> the next item related to ADDRESS was
>
> <!ELEMENT ADDRESS - - (%inline;)* -- information on author -->
> <!ATTLIST ADDRESS
> %attrs; -- %coreattrs, %i18n, %events --
> >

The ADDRESS element may only _contain_ inline element(s) zero or more times.

> This seemed to me to be saying that the element ADDRESS requires opening
> and closing tags, is an INLINE element that can be left out, or used one
> or more times.
>
> Can anyone explain to me what I am misunderstanding?

How to read the HTML DTD:
<http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.3>

--
Gus

Posted by Eric Lindsay on December 16, 2005, 6:33 am
Please log in for more thread options



> Eric Lindsay wrote:
> > I'm trying to learn how to read a DTD I wanted to use,
> > http://www.w3.org/TR/html4/strict.dtd
> >
> > <!ELEMENT ADDRESS - - (%inline;)* -- information on author -->
>
> The ADDRESS element may only _contain_ inline element(s) zero or more times.
> > Can anyone explain to me what I am misunderstanding?

Thank you. The _contain_ was what I hadn't noticed and understood.

> How to read the HTML DTD:
> <http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.3>

I think the explanation of how to read the HTML DTD was what I was
having trouble with. I was reading (well, misreading, I guess)
http://www.w3.org/TR/REC-html40/struct/global.html which seems about the
same as the reference you kindly provided.

--
http://www.ericlindsay.com

Posted by Eric B. Bednarz on December 15, 2005, 2:26 pm
Please log in for more thread options



> I'm trying to learn how to read a DTD I wanted to use,
> http://www.w3.org/TR/html4/strict.dtd

Why? It hasn't any relevance for HTML. User agents who try to
implement the HTML spec at all aim at its prose including all attached
errors and are subsequently incompatible with the normative syntax.

Anyway, if you want to understand SGMLese, locate a reference with some
considerable clue-density (IOW, avoid W3C specs like the plague). A
good place to start for the basics might be

<http://www.hti.umich.edu/cgi/t/tei/tei-idx?type=extoc&byte=71769>

Or just wade through

<http://xml.coverpages.org/general.html>


I don't see the point, though, except if you have plans to mangle a
private DTD for usage in SGML aware authoring tools.


> <!ELEMENT ADDRESS - - (%inline;)* -- information on author -->

> This seemed to me to be saying that the element ADDRESS requires opening
> and closing tags, is an INLINE element

It can *contain* none or more instances of whatever is lumped together
in the parameter entity inline (it would be a good thing to forget about
the inconsistently used terms 'block' and 'inline' altogether in an HTML
context, BTW).


--
||| hexadecimal EBB
o-o decimal 3771
--oOo--( )--oOo-- octal 7273
205 goodbye binary 111010111011

Similar ThreadsPosted
Inline-Element with higher font-size inside A: Hover about full height? November 21, 2006, 7:55 pm
Can TR element be direct child node of TABLE element? February 13, 2005, 12:17 pm
table inside div block - no joy April 2, 2006, 6:26 pm
How to make block elements flow? May 15, 2005, 6:50 pm
IE7 Display:BLock and line breaks March 27, 2008, 2:41 pm
DOM CSS display:none/block switching hover problem December 29, 2004, 5:08 pm
XHTML Validation fails with nested block elements. January 10, 2005, 5:38 am
W3C Spec: Block level content within ? Style in ? Why? June 9, 2005, 6:20 am
Mozila Firefox: iframe keep relocate its position when set display block/hiden of another html component? October 11, 2004, 3:57 pm
inline frames September 21, 2005, 8:48 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap