On Tue, 2020-10-06 at 18:48 +0800, Kevin Buckley via lfs-dev wrote:
> i was experimenting with making use of an extra attribute in the
> XML source tags, akin to the vanilla book's  'sysv'  or 'systemd'
> for the "revision" attribute,, or to Thomas's Multilib arch attribute
> ('ml_32', 'ml_x32' or 'ml_all').
> 
> When i come to render my source, having added an extra
> stringparam to the xsltproc invocations, vis
> 
>                 --stringparam profile.revision $(REV) \
>                 --stringparam profile.arch $(ARCH)    \
>                 --stringparam profile.pkguser $(PKGUSER)    \
> 
> I get told
> 
> validity error : No declaration for attribute pkguser of element
> <element>
> 
> I realise that I have missed adding such a declaration into one of
> the
> stylesheet, or other ancillary, files but I can't determine, by
> inspection
> of many of those files, where such a declaration needs to go.
> 
> 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



-- 
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to