Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 May 2002 01:20:34 +0300
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        Chris Pepper <pepper@reppep.com>
Cc:        freebsd-doc@freebsd.org
Subject:   Re: (man page || manpage) => manual page
Message-ID:  <20020529222034.GD67628@hades.hell.gr>
In-Reply-To: <p05111a1bb91affba8a28@[129.85.219.160]>
References:  <20020529214746.GA67346@hades.hell.gr> <p05111a1bb91affba8a28@[129.85.219.160]>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-05-29 18:03 -0400, Chris Pepper wrote:
> 	So this raises a question I've been wondering about. Sorry if 
> it's a FAQ -- I haven't stumbled across it yet.
> 
> 	What is the dividing line between entities and tags? I'd 
> think it would be more XML-ish and reusable to use something like:
> 
> 	<citerefentry>
> 	  <refentrytitle>lame</refentrytitle>
> 	  <manvolnum>1</manvolnum>
> 	</citerefentry>
> 
> 	than "&man.lame.1;". What's the dividing line that falls 
> between man pages and other tagged items, that makes man an entity 
> (in all the pages I've looked at so far, anyway)?

Reusability.  If you're going to write something only once, it
probably isn't worth the trouble to make an entity out of it, except
perhaps for stylistic reasons (we are not using <citerefentry>
directly anywhere else, so we shouldn't use it here either).

If the text that the entity substitutes is going to appear at least
twice, or more than a few times, using an entity has a few advantages.

a) If you change your mind and want to substitute something else, you
   just change the entity definition.  In this sense, entities are
   much like the #define statements of C.  You use them to define
   `magic' parts of text that are replaced by the SGML normalizer just
   like #define constants are replaced by the C preprocessor before
   compiling a C program.

b) You don't have to manually repeat stuff, which is error-prone and
   might also be boring after a while.  Most often, the text of an
   entity is far shorter than the substituted text, and you just feel
   too lazy to type the replacement text over and over again.  So you
   make an entity out of it, and use that.

- Giorgos


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020529222034.GD67628>