RFC: Upgrading to DocBook 5.0

Gabor Kovesdan gabor at FreeBSD.org
Wed Jun 5 15:12:41 UTC 2013


Em 05-06-2013 14:10, Hiroki Sato escreveu:
> Gabor Kovesdan <gabor at FreeBSD.org> wrote
>    in <519FA4FE.4030305 at FreeBSD.org>:
>
> ga> username --> systemitem class="username"
> ga> groupname --> systemitem class="groupname"
> ga> hostid role="fqdn" --> systemitem class="fqdomainname"
> ga> hostid role="hostname" --> systemitem class="fqdomainname"
> ga> hostid role="domainname" --> systemitem class="fqdomainname"
> ga> hostid role="netmask" --> systemitem class="netmask"
> ga> hostid role="mac" --> systemitem class="etheraddress"
> ga> hostid role="ipaddr" --> systemitem class="ipaddress"
> ga> hostid --> systemitem
>
>   Hmm, I do not like to create "a rule" to mark up both a username and
>   a hostname by using <systemitem> element without attribute.  Even if
>   the rendering results are the same, they are different.  Is it
>   problem with allowing both writing <systemitem>s without attribute
>   and adding attributes into them later (or at the same time)?  I do
>   not think limiting the vocabulary is useful for learning.  Allowing
>   people who are not familiar with DocBook to mark up by using
>   <systemitem> only should be enough if it is really an issue.
Technically it is easily possible to convert them "correctly", i.e. as 
described above, it was just my suggestion to leave out class 
attributes. It is also possible to allow systemitem with and without the 
class attribute specified.
>
> ga> This is actually a type of file and the filename class attribute may
> ga> also be devicefile, which expresses its semantics. Again, we should
> ga> consider dropping the class attributes to simplify things:
> ga> devicename --> filename class="devicefile"
> ga>
> ga> These are not actually distinguished in formatting and the package
> ga> element expresses them better:
> ga> filename role="package" --> package
> ga> filename role="port" --> package
>
>   package should support a role to distinguish if it is a port or a
>   package because the linkend can be different.  The following DSSSL
>   fragment was removed in our XSLT:
>
> ----
>          (element filename
>            (let* ((class         (attribute-string (normalize "role"))))
>              (cond
>               ((equal? class "package")
>                (let* ((urlurl    "http://www.FreeBSD.org/cgi/url.cgi")
>                       (href      (string-append urlurl "?ports/"
>                                                 (data (current-node))
>                                                 "/pkg-descr")))
>                  (create-link (list (list "HREF" href)) ($mono-seq$))))
>               (else ($mono-seq$)))))
> ----
It's true that I didn't notice this distinction in the rendering. But 
why not addding this link to both packages and ports? My personal 
impression is that there are people, who mostly use packages and others, 
who use ports. This preference is independent from the context. If the 
text talks about the textproc/docproj ports but I prefer dealing with 
packages, I will still want to install the package and vice versa. In 
the essence, they are the same. This is why I would not distinguish them.

Gabor


More information about the freebsd-doc mailing list