public inbox for [email protected]  
help / color / mirror / Atom feed
From: Karel Zak <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: [email protected]
Subject: Re: [HACKERS] XML Docbook
Date: Thu, 20 Nov 2003 09:37:05 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

On Fri, Nov 14, 2003 at 08:16:30PM +0100, Peter Eisentraut wrote:
> Karel Zak writes:
> 
> > On Fri, Nov 14, 2003 at 10:32:10AM +0100, Peter Eisentraut wrote:
> > > XML disadvantage:
> > >
> > > - no arbitrary parameter entities
> >
> >  I unsure if I understand, can you show some example of this problem?
> 
> SGML and XML allow you to disable certain parts of your document, by
> writing
> 
> <![IGNORE[
> <stuff>...</stuff>
> ]]>
> 
> The opposite of IGNORE is INCLUDE.  Think of this as a preprocessing
> stage.  You can also make the IGNORE/INCLUDE variable, by declaring a
> "parameter entity", think of it as a variable.  This is declared like
> this:
> 
> <!entity % myvar "IGNORE">
> 
> Then you can write
> 
> <![%myvar;[
> <stuff>...</stuff>
> ]]>

 One  Czech XML  guru  suggest  me use  for  this "profiling". For  more
 information see:
 
    http://www.sagehill.net/docbookxsl/Profiling.html

 An example:

 <para os="windows">WinText</para>
 
 and when  you apply XSL template  you can use template  with "profile-"
 prefix  (profile-docbook.xsl,  profile-chunk.xsl)   and  define  option
 profile.os="windows".

 The other thing are INCLUDEs, I think best way is use W3C's <xinclude>.
 The  "xsltproc" support  it (--xinclude  option) and  for others  tools
 which doesn't support  it you can use common tool  "xmllint" that merge
 all to one temporary file:

 xmllint --xinclude --postvalid book.xml tmp.xml
 fop -xsl /path/file.xsl -xml tmp.xml -pdf book.pdf
 rm -f tmp.xml
 
 Comments?
 
    Karel

-- 
 Karel Zak  <[email protected]>
 http://home.zf.jcu.cz/~zakkr/



view thread (10+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [HACKERS] XML Docbook
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox