Document attributes replacement for docinfo files

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Document attributes replacement for docinfo files

ghillert
The document attributes feature is super-nice and works nicely for asciidoc files but it seems to not work for associated docinfo files. As I am very new to asciidoc and asciidoctor, I may miss something obvious. Anyway, let's say I use an attribute in my asciidoc file {appversion} and I pass in the attribute via the asciidoctor gradle plugin:

options = [
    attributes: [
        appversion: "$version",
        ...
    ]
]

In this case the dynamic property from the Gradle build will be passed-in and replaced correctly for the adoc file. However, when I try the same for the -docinfo.xml file (in order to set a docbook meta element) it does not get replaced.

Is there something I am missing? Any workaround?

Thanks!

Cheers,

Gunnar
Reply | Threaded
Open this post in threaded view
|

Re: Document attributes replacement for docinfo files

mojavelinux
Administrator
Turns out you discovered a compliance bug. Good work! AsciiDoc performs attribute substitutions on docinfo files, which I didn't realize.



If it looks good to you, I'll merge it in.

-Dan

p.s. In the future we may want to introduce a flag that controls which types of substitutions are performed on docinfo files. Something like:

docinfosubs: attributes,macros


On Wed, Jun 5, 2013 at 10:24 PM, Gunnar Hillert [via Asciidoctor :: Discussion] <[hidden email]> wrote:
The document attributes feature is super-nice and works nicely for asciidoc files but it seems to not work for associated docinfo files. As I am very new to asciidoc and asciidoctor, I may miss something obvious. Anyway, let's say I use an attribute in my asciidoc file {appversion} and I pass in the attribute via the asciidoctor gradle plugin:

options = [
    attributes: [
        appversion: "$version",
        ...
    ]
]

In this case the dynamic property from the Gradle build will be passed-in and replaced correctly for the adoc file. However, when I try the same for the -docinfo.xml file (in order to set a docbook meta element) it does not get replaced.

Is there something I am missing? Any workaround?

Thanks!

Cheers,

Gunnar


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Document-attributes-replacement-for-docinfo-files-tp296.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--