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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Re: [docbook-apps] How to insert "placeholder" in my documentation


Sounds like this might be an editor issue. I can open both the book and 
the xincluded sections/chapters in oXygen 9.1 without any issue.

I tried opening my files in XMLMind 3.8.0, and was able to replicate 
your issue. Unfortunately, I don't know of a workaround with this editor.

Best regards,

--Scott
www.FlatironsSolutions.com <http://www.flatironssolutions.com/>

Akagi K wrote:
> Hi Scott,
> 
> Thank you very much for your prompt response and solution!
> 
> We have worked out a way, as you can see below - which gives rise to the
> following issues -
> 
> 1) not being able to open the xincluded files without the declaration - but
> if the declaration is added, then the book file won't open.  Is there a way
> around this, to be able to do both - ie, to be able to open the  individual
> section/chapter files and the book files independently without having to go
> through the trouble of adding/removing declarations in the referenced files?
> 
> 2) can't add the entity reference &product_name; (for us, it is the & sign
> and not the %) from XMLMIND (3.5.0) as it will automatically convert the &
> to &amp; and invalidate the entity referencing. Can add from Crimson Editor.
> Is there a way around this to be able to use XMILMIND for this task?
> 
> As the volume of our work is quite large, little manual tasks can add up and
> inpinge upon the efficiency gained by the placeholder system.
> 
> Thank you
> 
> Akagi
> 
> Summary of steps: (Sample files can be supplied if necessary)
> 
> HOW to use the product name entity variable across core>projects:
> 
> 1. In src/en/common folder, add the entity file with the appropriate product
> name value within double quotes.
>  - customizable_tokens.ent file with a single line <!ENTITY product_name
> "PRODUCTNAME">
> 
> 2. In all the files replace instance of product name by &product_name;
> IMPORTANT: Use Crimson Editor to do this, as XMLMIND will convert & into
> &amp; and invalidate the entity reference.
> (Is it possible that a more recent version of XMLMIND can work around this?
> I'm using 3.5.0.)
> 
> 3. In the book file, add the following entity declaration:
> <!ENTITY % product_name SYSTEM "../common/customizable_tokens.ent">
> %product_name;
> 
> 
> (Note: From this point onwards, you will not be able to open the
> chapter/section files on their own in XMLMIND. See below.)
> 
> 4. When you open the book file (with a warning about editing the entity
> variable & turning into &amp;), the value SET FOR THE BOOK in the entity
> file will show.  The referenced chapters/sections will show 'white' and not
> blue, as though they were pasted physically.
> 
> HOW to edit the chapter/section files:
> Open the various chapters/sections from the book file and edit.
> 
> *If you have to open a chapter/section file on its own, add the following
> declaration:
> <!DOCTYPE section [
> <!ENTITY % product_name SYSTEM "../common/customizable_tokens.ent">
> %product_name;
> ]>
> 
> NOTE that then the book file referencing the chapter/section will not open.)
> 
> Thank you
> 
> 
> 
> Scott Hudson wrote:
>> Hi Akagi,
>>
>> I use this method:
>>
>> create an entity file that declares your entities. Mine looks like this
>> (client-entities.ent):
>>
>> <!ENTITY client "client_name">
>> <!ENTITY client_short "client_short">
>> <!ENTITY project "project_name">
>> <!ENTITY client_logo "images/logo.png">
>>
>> Then, in each of the content files (I put mine in the book and xincluded
>> section files) use this decl:
>>
>> <!DOCTYPE book [
>> <!ENTITY % client SYSTEM "client-entities.ent">         %client;
>> ]>
>>
>> or
>>
>> <!DOCTYPE section [
>> <!ENTITY % client SYSTEM "client-entities.ent">         %client;
>> ]>
>>
>> as appropriate. This way, I can "single source" my entities and edit any
>> of the content and the entities will resolve.
>>
>> The above examples work with DocBook v5.0, though I've also used it with
>>   v4.5 and a full DTD declaration.
>>
>> HTH,
>>
>> --Scott
>>
>>
>> Akagi K wrote:
>>> Dave,
>>>
>>> I am trying to insert a placeholder for the product name, which would
>>> vary
>>> from project to project.
>>>
>>> My docbook consists of a book file with a number of chapter and section
>>> files referenced. Can the entity be defined at book file level to affect
>>> all
>>> the files it references?  Some of the section files are imported from a
>>> different project during the doc build process (using ant), so we can't
>>> set
>>> the entity at individual file level.
>>>
>>> Is there a way of declaring the entity at project level, ie, in the
>>> stylesheet - so that the entity declaration itself is a variable that
>>> depends on the project name?
>>>
>>> We are using dtd 4.1, fop 0.93 and docbook 1.72.0.
>>> We use ant to build the pdf docs, but we wish to find a solution within
>>> docbook process.
>>>
>>> Best Regards
>>> Akagi
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Dave Cushman wrote:
>>>> Manuel,
>>>>
>>>> You can include your .propertie file like so in the header of your
>>>> main file (the one with <!DOCTYPE ...) :
>>>>
>>>> <!ENTITY % prop_file SYSTEM ".propertie.xml">  (be sure to make the
>>>> SYSTEM path correct)
>>>> %prop_file;
>>>>
>>>> This will then allow you to call for any entity defined in
>>>> the .propertie file.
>>>>
>>>> http://www.sagehill.net/docbookxsl/ModularEntities.html
>>>>
>>>> Dave
>>>>
>>>> On Mar 22, 2008, at 11:28 AM, Manuel Wallnoefer wrote:
>>>>
>>>>> Hi Dave !
>>>>>
>>>>> Thx for your quick reply.
>>>>>
>>>>> Yes i think this could help, but there is one problem.
>>>>>
>>>>> My customer name is saved in a .propertie file externally.
>>>>>
>>>>> In my documentation for example i have a file
>>>>>
>>>>> - index.xml
>>>>> - chapter1.xml
>>>>> - chapter2.xml    ... and so on
>>>>>
>>>>> When i now want to use &customer_name in chapter1.xml i must define
>>>>> the
>>>>> <!ENTITY customer_name "Loves My Product"> in the header of my
>>>>> chapter1.xml , am I right ?
>>>>>
>>>>> If it is so, there is my problem. The .properties file where the
>>>>> customer name is stored is generated right before i convert my docbook
>>>>> files.
>>>>>
>>>>> And so, the line <!ENTITY customer_name "customer name from .propertie
>>>>> file"> has to be generated in a certain way.
>>>>>
>>>>> Do you know what i mean ?
>>>>>
>>>>> And so my question is how to do such things in docbook ?
>>>>>
>>>>> Thanks for your help !
>>>>>
>>>>> ~manuel
>>>>>
>>>>>
>>>>>
>>>>> Dave Cushman wrote:
>>>>>> Manuel,
>>>>>>
>>>>>> It sounds like you are trying to include entities.  For instance, you
>>>>>> would define the entity <!ENTITY customer_name "Loves My Product">,
>>>>>> then call for it in your document with &customer_name;.  When you
>>>>>> convert, anywhere there is a call for &customer_name; the text "Loves
>>>>>> My Product" will appear.  Does this help?
>>>>>>
>>>>>> Dave
>>>>>>
>>>>>>
>>>>>> On Mar 22, 2008, at 9:19 AM, Manuel Wallnoefer wrote:
>>>>>>
>>>>>>> Hi all !
>>>>>>>
>>>>>>> First of all i want to say that i'mnew to dockook. It's cool
>>>>>>> stuff, now
>>>>>>> i'm working on my master theses and there i have to generate my
>>>>>>> documentation with docbook.
>>>>>>>
>>>>>>> My problem now is, that in my docu , there must be some
>>>>>>> "placeholder" in
>>>>>>> the text, which are filled with a certain property at compile time.
>>>>>>>
>>>>>>> These variable fields are something like the name of the customer,
>>>>>>> or
>>>>>>> the logo of the customer and so on ...
>>>>>>>
>>>>>>> I have a .propertie file wher all my variables are stored. Now i
>>>>>>> have to
>>>>>>> bring them "into" my docbook docu.
>>>>>>>
>>>>>>> A lot of variable things i solved with profiling attributes. But
>>>>>>> such a
>>>>>>> thing like placeholders i couldn't find up to now.
>>>>>>>
>>>>>>> Whats the best way to do this ?
>>>>>>>
>>>>>>> Thanks for help !
>>>>>>>
>>>>>>> ~manuel
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-
>>>>>>> open.org
>>>>>>> For additional commands, e-mail:
>>>>>>> docbook-apps-help@lists.oasis-open.org
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
>>>> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>>>>
>>>>
>>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/How-to-insert-%22placeholder%22-in-my-documentation-tp16221078p16993184.html
>>> Sent from the docbook apps mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
>>> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
>> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>>
>>
>>
> 
> --
> View this message in context: http://www.nabble.com/How-to-insert-%22placeholder%22-in-my-documentation-tp16221078p17021519.html
> Sent from the docbook apps mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
> 
> 



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