OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


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


Hi,

currently I'm trying to inject language information from a <structure> element,
but it doesn't work as expected. Either I'm doing something completely wrong or
this is a bug.

Let's assume I have an assembly structure like this:

----
<assembly version="5.2" xml:lang="en"
    xmlns="http://docbook.org/ns/docbook";
    xmlns:xlink="http://www.w3.org/1999/xlink";
    xmlns:xi="http://www.w3.org/2001/XInclude";
    xmlns:tr="http://docbook.org/ns/transclusion";>
  <resources>
     <!-- ...pruned... -->
  </resources>

  <structure>
     <!-- ... modules comes here ... -->
  </structure>
</assembly>
----

The real content of <resources> and <structure> isn't that important for this
post. Let's focus entirely on <structure>. As you can see, it doesn't contain a
resourceref attribute.

When I call the assemble.xsl stylesheet I get the result file. So far, so good.

However, the result file doesn't contain any language. That was to be expected,
because we didn't set one. So in my naive view I thought I just add the
language information to <structure> like this:

  <structure xml:lang="en">

However, this isn't taken into account. My next try was to add it to <output/>:

  <structure>
    <output xml:lang="en"/>

This also has no effect.

I've looked into the assemble.xsl stylesheet and it seems this was an oversight
in the following line:

https://github.com/docbook/xslt10-stylesheets/blob/master/xsl/assembly/assemble.xsl#L137

If I change it to this line, it works:

  <xsl:copy-of select="@xml:id|@xml:lang"/>

Can someone confirm this?
If this is true, it means an author cannot set a language (or other attributes)
on the output.

I have two additional questions:

1. What if we have _two_ xml:lang attributes, both on <structure> and on
   <output>. Which wins? Which has the higher priority?
   Is that specified or defined anywhere?

2. What if an author wants to inject other attributes like role, os, or others?
   Where it is supposed to be inserted? Also same as point 1, who wins when we
   have the same attributes?


Thanks for your idea and answers!


--
GruÃ/Regards
  Thomas Schraitle


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]