literal attributes

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

literal attributes

metro
I am using attribute values in my docinfo file.

For the <legalnotice> content I am trying to use an attribute. However, I cannot use docbook markup in the attribute definition as the special characters get escaped.

Is there a way prevent this escape and have the attribute be substituted literally in the docinfo file?

Thanks,

MT
--
Reply | Threaded
Open this post in threaded view
|

Re: literal attributes

mojavelinux
Administrator
Could you provide specific examples so I can recommend markup to use?

Cheers,

-Dan


On Tue, Aug 12, 2014 at 4:20 PM, metro [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I am using attribute values in my docinfo file.

For the <legalnotice> content I am trying to use an attribute. However, I cannot use docbook markup in the attribute definition as the special characters get escaped.

Is there a way prevent this escape and have the attribute be substituted literally in the docinfo file?

Thanks,

MT
--



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



--
Reply | Threaded
Open this post in threaded view
|

Re: literal attributes

metro
I would like the legal notice attribute to expand in docinfo.xml.

Current attribute definition:
:legalnotice: <para>All rights reserved.</para>

docinfo.xml:
<legalnotice>{legalnotice}</legalnotice>

Expands to:
<legalnotice>&lt;para&gt;All rights reserved.&lt;/para&gt;</legalnotice>

Desired output:
<legalnotice><para>All rights reserved.<para></legalnotice>
Reply | Threaded
Open this post in threaded view
|

Re: literal attributes

mojavelinux
Administrator
I don't really recommending using markup in your attribute values because it couples the AsciiDoc source to a backend (in this case DocBook). Your AsciiDoc should be agnostic to output format.

Having said that, you can still do it using an inline passthrough macro around the attribute value.

[source,asciidoc]
----
:legalnotice: pass:[<para>All rights reserved.</para>]
----

But why not just put the <para> in the docinfo.xml like this?

.docinfo.xml
[source,xml]
----
<legalnotice><para>{legalnotice}</para></legalnotice>
----

-Dan

On Tue, Aug 12, 2014 at 4:35 PM, metro [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I would like the legal notice attribute to expand in docinfo.xml.

Current attribute definition:
:legalnotice: <para>All rights reserved.</para>

docinfo.xml:
<legalnotice>{legalnotice}</legalnotice>

Expands to:
<legalnotice>&lt;para&gt;All rights reserved.&lt;/para&gt;</legalnotice>

Desired output:
<legalnotice><para>All rights reserved.<para></legalnotice>



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



--