discuss: Docbook XML and ENTITIES


Previous by date: 10 Jun 2003 00:57:37 -0000 Re: Docbook XML and ENTITIES, Hal Burgiss
Next by date: 10 Jun 2003 00:57:37 -0000 Re: Docbook XML and ENTITIES, Greg Ferguson
Previous in thread: 10 Jun 2003 00:57:37 -0000 Re: Docbook XML and ENTITIES, Hal Burgiss
Next in thread: 10 Jun 2003 00:57:37 -0000 Re: Docbook XML and ENTITIES, Greg Ferguson

Subject: Re: Docbook XML and ENTITIES
From: Greg Ferguson ####@####.####
Date: 10 Jun 2003 00:57:37 -0000
Message-Id: <200306100055.h5A0tJQe043319@hoop.timonium.sgi.com>

On Mon, 9 Jun 2003 20:04:54 -0400 Hal Burgiss ####@####.#### wrote:

> On Mon, Jun 09, 2003 at 05:14:53PM -0500, Martin A. Brown wrote:
> ... 
> What I really want to do is have content conditionally included based
> on build parameters, eg:
> 
>  <![%draft;[  
>   <para>
>    Since this document is not even started yet, you should not even be
>    able to read this. At least, in theory.
>   </para>
>  ]]>

Here's something the PHP-Nuke folks did for their document, which is
quite similar. It was processed w/Jade/DSSSL, but it is indeed XML.

This was used to trigger which version of a graphic to use.
At the entity declaration area, they had:

  <!ENTITY % output.print.png "INCLUDE">
  <!ENTITY % output.print.pdf "IGNORE">
  <!ENTITY % output.print.eps "IGNORE">

I was informed to set the value "INCLUDE" to the type of
graphic I wanted to use during processing. as you can see in
this example, output.print.png has been changed to INCLUDE
(from IGNORE).

Within the text:

   <mediaobject>
      <![ %output.print.png; [
      <imageobject>
         <imagedata fileref="./images/&graph1001;.png" format="PNG">
      </imageobject>
      ]]>
      <![ %output.print.pdf; [
      <imageobject>
         <imagedata fileref="&graph1001;.pdf" format="PDF" scale="65">
      </imageobject>
      ]]>
     ...
   </mediaobject>

So you can get an idea on how this works. Yes, the source file
must be tweaked in this example, but I could see you having=
something like:

     <!ENTITY % draft "INCLUDE">
...
  <![ %draft; [  
   <para>
    Since this document is not even started yet, you should not even be
    able to read this. At least, in theory.
   </para>
  ]]>


which in this case would cause the text to be displayed. If you
do not want it to show up, set INCLUDE -> IGNORE.

Is that what you're looking for?

regard,
--
Greg


Previous by date: 10 Jun 2003 00:57:37 -0000 Re: Docbook XML and ENTITIES, Hal Burgiss
Next by date: 10 Jun 2003 00:57:37 -0000 Re: Docbook XML and ENTITIES, Greg Ferguson
Previous in thread: 10 Jun 2003 00:57:37 -0000 Re: Docbook XML and ENTITIES, Hal Burgiss
Next in thread: 10 Jun 2003 00:57:37 -0000 Re: Docbook XML and ENTITIES, Greg Ferguson


  ©The Linux Documentation Project, 2014. Listserver maintained by dr Serge Victor on ibiblio.org servers. See current spam statz.