[oXygen-user] docbook variable substitution
Andrew Harrison
Tue Jun 9 04:36:23 CDT 2009
Hi George,
Perfect. Just what I need. Thanks very much.
cheers,
Andrew
On 9 Jun 2009, at 07:54, George Cristian Bina wrote:
> Hi Andrew,
>
> You have two options:
> 1. entities
> 2. XInclude
> Note that these are not linked to DocBook, you can use them for any
> XML
> vocabulary.
>
> 1. You can declare an entity in your DTD or in the DTD internal subset
> like below
>
> <!ENTITY book "Gone With the Wind">
>
> and then use it in your document
>
> I recently read &book;.
>
> 2. You can create a text file, let's say book.txt containing
>
> Gone With the Wind
>
> and then you use it in your document with
>
> I recently read <xi:include href="book.txt" parse="text"
> xmlns:xi="http://www.w3.org/2001/XInclude"/>.
>
> If you declare the XInclude namespace on the document root
> xmlns:xi="http://www.w3.org/2001/XInclude"
> then you can write it like
>
> I recently read <xi:include href="book.txt" parse="text"/>.
>
> Best Regards,
> George
> --
> George Cristian Bina
> <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
> http://www.oxygenxml.com
>
> Andrew Harrison wrote:
>> Hi,
>>
>> Apologies if this is slightly off topic. I have a docbook question.
>> Is
>> there a way to define a variable in docbook and reference it in the
>> text?
>>
>> In latex I would do:
>>
>> "\newcommand{\book}{Gone With the Wind}"
>>
>> then in the text:
>>
>> "I recently read \book."
>>
>> which would render as
>>
>> "I recently read Gone With the Wind."
>>
>> I can't seem to find out if this is possible.
>>
>> Thanks in advance.
>>
>> Andrew
>>
>>
>> _______________________________________________
>> oXygen-user mailing list
>>
>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
> _______________________________________________
> oXygen-user mailing list
>
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
School of Computer Science, Cardiff University,
Queen's Buildings, 5 The Parade, Cardiff CF24 3AA, Wales, UK
tel: +44(0)2920 879184
email:
More information about the oXygen-user
mailing list