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] profiling and entities -

We have exactly the same requirement.

Unfortunately, we found that we couldn't use entities, because  
XMLMind (our editor of choice) seems to permanently expand them when  
opening a document, so opening something with &OS; becomes "Linux"  
when the document is re-saved.

We have two ways to work around this:

1. We've added tags to DocBook - TargetOS, ProductName,  
ProductVersion, etc.  These tags can contain nothing (not even any  
text), and we've modified the stylesheets to replace them with text,  
based on parameters passed into the xsl preprocessor.

2. (This is the way that XMLMind recommends) is to use xi:include:

<phrase id = "my_os_phrase">
   <phrase os = "win">Windows</phrase>
   <phrase os = "linux">Linux</phrase>

And then everywhere you want to mention the OS, just do:

<xi:include pointer="element(my_os_phrase)" />

(XML Mind wraps this up nicely with its "Copy As Reference" capability)

If your processor is set up to follow xi:includes, or you pre-process  
them out, this should also do what you want.
(I've not actually tried this, because I've not got things set up for  
xi:include processing yet)


Geraint North
Principal Engineer

On 17 Oct 2007, at 12:12, Samuel Wright wrote:

> Hi All,
> I'm trying to publish three very similar documents, from one master.
> One can do this with profiling,
> <section os="win">
> </section>
> <section os="lin">
> </section>
> and then publishing once for each profile. But this gets more
> complicated if I want to use an entity, and reuse only one lot of
> text:
> This works, but is a LOT of overhead
> <section>
> <para> sfdfssdf sdfsfsdf sdfdsfdsf  <phrase
> os="lin">&MYENT_LINUX</phrase><phrase
> os="win">&MYENT_WINDOWS</phrase></para>
> </section>
> Is there someway to control entities with profiling
> I could use
> <section>
> <para> sfdfssdf sdfsfsdf sdfdsfdsf  &MYOS; </para>
> </section>
> but if you use many variables it is a pain to change them each time,
> and could induce errors.
> Any thoughts on the best way to do this?
> Thanks
> Sam,
> ---------------------------------------------------------------------
> 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]