Re: DocBook Assemblies: is xml:lang considered in <structure>?

Thomas Schraitle <[email protected]> Fri, 21 Apr 2023 09:47:24 +0200
Newsgroups gmane.text.docbook.misc
Message-ID <[email protected]>
Hi Bob,

thanks for your answer.

On 20.04.23 20:41, Bob Stayton wrote:
> [...]
> Indeed, the xml:lang on structure should be carried into the output beca=
use
> there is no other way to set that attribute on the root element.=C2=A0 T=
hat is an
> oversight.

Thanks for your confirmation!

I've created a pull request that takes into account the xml:lang attribute=
:

   https://github.com/docbook/xslt10-stylesheets/pull/255


> The <output> element is not appropriate because its intended to alter th=
e
> behavior of the assembly transformation, not insert additional content.=
=C2=A0 So the
> answer to question #1 is that xml:lang on output will have no effect so =
there
> is no conflict.

Ok, thanks, I agree, that wouldn't be an appropriate place.

Sorry, but I have additional question regarding xml:lang and other attribu=
tes:

1. If xml:lang has no effect, other productivity attributes have probably =
also
    no effect.
    Shouldn't that be reflected in the assembly schema?

2. On a second thought, would it make sense to consider assembly/@xml:lang
    if structure/@xml:lang is not available?


> Regarding injecting other attributes (question #2), that is not currentl=
y a
> feature defined for assemblies.=C2=A0 Most attributes should reside in t=
he resource
> xml, not specified in the assembly.=C2=A0 Attributes like role and os sh=
ould reside
> in the resource XML file, it seems to me.=C2=A0 Defining those on the fl=
y at
> assembly time is not a use case I can imagine.

In my humble opinion, there are some use cases I can imagine. :)

For example, if you want to change some attributes for profiling reasons. =
The
original module could have A, but in your assembly you would like to add B=
. Or
change it completely. Or you would like to correct an original class attri=
bute.
Or if authors really want to change the role, why shouldn't they?

I'm sorry, but that seems to me quite limiting. Especially if assemblies u=
ses
the idea of "mix and merge". :)

It might be debatable if this feature is a "core feature" or something tha=
t
should be left to a customization.


> That said, the DocBook TC could not imagine all the ways that people mig=
ht use
> assemblies.=C2=A0 The assembly stylesheet can be customized to insert at=
tributes if
> you need that.

True, that's always an option. However, if Assemblies advertises itself as=
 a
tool for topic oriented writing, I would expect that it supports at least
certain features. I agree, the DocBook TC can not support all and everythi=
ng.
But in my view, copying attributes over should be a core feature (and is o=
ne of
the benefits).


Thank you for your thoughts and ideas!


=2D-
Gru=C3=9F/Regards
   Thomas Schraitle