Thomas Schraitle | 3 Jun 2012 10:53
Picon

RFE/RFC: Include format Attribute in DocBook Schema?

Hi,

the Common Effectivity Attributes[1] in TDG5.1 contains a lot of useful 
attributes. However, IMHO, we don't have a way to express that an element 
"belongs" to a specific (output) format only. 

As such, I would propose to add such a "format" attribute to the DocBook 
schema (in the following text I use "format" for simplicity reasons. If you 
don't like it, feel free to suggest a different name like "outputformat", 
"targetformat", or whatever you think is appropriate.)

I know the committee is hesitent to add additional attributes to the schema, 
but I think it has several benefits. Here is why I think this is useful:

1. Currently, the DocBook stylesheets support several output formats. Probably 
this list will grow in the future.

Dealing with such a variety of possible output formats makes it sometimes 
harder to write in a "format independant" way. However, if someone really 
wants to express that a certain element is only useful for PDF, the current 
list of common attributes doesn't support this.

From a semantic point of view, no common effectivity attributes are suited for 
this task. By using a "format" attribute in combination with profiling, I can 
distinguish such a case.

2. The current assembly schema contains in its <output/>[2] element a "format" 
attribute (actually that's where this idea originated).

However, with the raise of assemblies and modules, output formats will become 
(Continue reading)

ben.guillon | 3 Jun 2012 13:44
Picon

Re: RFE/RFC: Include format Attribute in DocBook Schema?

Hi,

IMO there's already the profiling mechanism to have conditional elements:

http://www.sagehill.net/docbookxsl/Profiling.html

I think it's enough for elements used for a specific format. It's what I  
use to tweak PDF and HTML outputs.

Regards,
BG

On Sun, 03 Jun 2012 10:53:01 +0200, Thomas Schraitle <tom_schr <at> web.de>  
wrote:

> Hi,
>
> the Common Effectivity Attributes[1] in TDG5.1 contains a lot of useful
> attributes. However, IMHO, we don't have a way to express that an element
> "belongs" to a specific (output) format only.
>
> As such, I would propose to add such a "format" attribute to the DocBook
> schema (in the following text I use "format" for simplicity reasons. If  
> you
> don't like it, feel free to suggest a different name like "outputformat",
> "targetformat", or whatever you think is appropriate.)
>
> I know the committee is hesitent to add additional attributes to the  
> schema,
> but I think it has several benefits. Here is why I think this is useful:
(Continue reading)

Thomas Schraitle | 3 Jun 2012 14:20
Picon

Re: RFE/RFC: Include format Attribute in DocBook Schema?

Hi Ben,

Am Sonntag, 3. Juni 2012, 13:44:21 schrieb ben.guillon:
> 
> IMO there's already the profiling mechanism to have conditional elements:
> 
> http://www.sagehill.net/docbookxsl/Profiling.html
> 
> I think it's enough for elements used for a specific format. It's what I
> use to tweak PDF and HTML outputs.

Thanks Ben for your suggestion. :)

I use profiling and the condition attribute already. However, from a semantic 
point of view, condition is very general, not specific to an output format (of 
course, I can (ab)use it this way, but that's not the point.)

Another reason why I think a "format" attribute may be useful: the condition 
attribute could already be occupied, for example, to apply a special 
transformation rule. That's one reason why there is such a general attribute. 
All the other attributes (arch, audience, ...) have a meaning as well.

As far as I can see, currently there is no attribute which is invented for 
this purpose. That's the reason why I think the schema will benefit from it, 
also in the light of assemblies.

------
[1] http://www.sagehill.net/docbookxsl/Profiling.html#ProfilingAttribs

--

-- 
(Continue reading)


Gmane