Adding entity to books formatting
Sergey Kandaurov
pluknet at gmail.com
Sun Dec 18 10:36:20 UTC 2011
On 17 December 2011 17:20, Dmitry Morozovsky <marck at rinet.ru> wrote:
> On Sat, 17 Dec 2011, Sergey Kandaurov wrote:
>
>> > I need an advice from dsl-fu-knowledgeable perswon ;)
>> >
>> > Prodded by glebius@, I'm trying to add new entity svnref to generate a link to
>> > svnweb.
>> >
>> > My quick patch stopped with an erro, while generating seems-to-be-correct
>> > content:
>> >
>> > -- 8< --
>> > marck at woozle:~/FreeBSD/doc/en_US.ISO8859-1/books/porters-handbook> grep -6i
>> > svnref freebsd-versions.html
>> >>Dec 12, 2011</TD
>> >><TD
>> >>10-CURRENT after defining boolean true/false in sys/types.h,
>> > sizeof(bool) may had changed (rev <A
>> > HREF="http://svnweb.freebsd.org/base?view=revision&revision=228444"
>> >><TT
>> > CLASS="SVNREF"
>> >>228444</TT
>> >></A
>> >>).
>> > <TT
>> > CLASS="FILENAME"
>> >>foofile</TT
>>
>> You most probably need to modify share/sgml/freebsd41.dtd as well.
>> Something like these lines:
>>
>> +<!ELEMENT SVNRef - - ((%cptr.char.mix;)+)>
>> +<!ATTLIST SVNRef
>> + %common.attrib;
>> +>
>> +
>>
>> Hope this helps.
>
> Thanks!
>
> Not exactly ;) -- now it's recognized but specifically disallowed:
Eh, sure. You also need to add it to local.tech.char.class.
Sorry, I forgot to mention this previously. See also how devicename
is implemented. A complete diff below on top of your changes, and
it should work now (it works for me):
doc/share/sgml/freebsd41.dtd or doc/share/sgml/freebsd.dtd ?
What DTD file is actually used is not clear for me. I chose freebsd41.dtd
@@ -26,7 +26,7 @@
<!-- Entities for element classes and mixtures ........................... -->
<!-- Character level classes -->
-<!ENTITY % local.tech.char.class
"|HostID|Username|Groupname|Devicename|MakeTarget|MakeVar">
+<!ENTITY % local.tech.char.class
"|HostID|Username|Groupname|Devicename|MakeTarget|MakeVar|SVNRef">
<!ENTITY % local.cptr.char.mix "|CO">
@@ -116,6 +116,11 @@
%common.attrib;
>
+<!ELEMENT SVNRef - - ((%cptr.char.mix;)+)>
+<!ATTLIST SVNRef
+ %common.attrib;
+>
+
<!-- The content model for <filename> was changed between DocBook 3.1 and
4.1. Specifically, <envar> was disallowed. There's a suggestion from
the DocBook maintainers that this may have been a mistake. In the
--
wbr,
pluknet
More information about the freebsd-doc
mailing list