On 10/6/20 7:59 PM, Kevin Buckley via lfs-dev wrote:
On Tue, 6 Oct 2020 at 20:03, Pierre Labastie via lfs-dev
<lfs-dev@lists.linuxfromscratch.org> wrote:
Where should such a declaration go?
The attribute has to be declared in the dtd (document type definition),
where anything pertaining to the xml document is declared (not only
attributes, but also tags and their content). For our docbook xml
sources, the dtd is pretty big, and comes from docbook. So you should
look at https://tdg.docbook.org/tdg/4.5/docbook.html, which gives the
details and the use of all tags and attributes. "revision" and "arch"
are attributes defined in the dtd. "pkguser" is not. But maybe,
condition="pkguser" could be used, since condition is a declared
attribute (
https://tdg.docbook.org/tdg/4.5/ref-elements.html#common.attributes),
and the stringparam profile.condition="pkguser" for profiling. Another
attribute name could be "userlevel"... Note that any attribute name
declared in the dtd could be used provided _you_ know what you use it
for, if you do not want to share your work.
Pierre
and Thomas echoed pointed out
Those attributes like 'arch', 'revision' etc. are defined somewhere in
the deepness of docbook. You cannot simply introduce new ones by
adding them to the string parameter list for the renderer. All the
attributes used in the {B,}LFS-book are predefined ones.
You may have allready seen the pages at
http://www.sagehill.net/docbookxsl/AddProfileAtt.html - the talk about
"how easy it is to add". Well, i didn't find it that easy, maybe you
have more luck.
--
Thomas
which suggests I missed picking up the knowledge as regards 'arch' and
'revision' NOT being something that LFS had added.
Wow!
All this time, and I had assumed that LFS had extended the Schema/DTD
so as to use certain attributes that appeared specific to LFS.
Cheers for pointing that out: I'll "make other plans" !
See https://tdg.docbook.org/tdg/4.5/ref-elements.html#common.attributes
for the defined attributes. To translate those attributes to html you
still need a custom xsl like stylesheets/lfs-chunked.xsl and the files
in stylesheets/lfs-xsl/. Learning xsl is definitely a non-trivial task.
It is not a procedural language. Generally we try to avoid changing
the xsl due to its complexity.
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page