Thanks to each of you for your help.
Tony
-----Original Message-----
From: Hussein Shafie [mailto:[email protected]]
Sent: Wednesday, April 25, 2007 03:51 AM
To: mail at antonio-dasilva.com
Cc: Pavel.Skopik at aipsafe.cz, xmleditor-support at xmlmind.com
Subject: Re: [XXE] Profiling DocBook files

Tony DaSilva wrote:
> I want to do some simple profiling of procedures for a manual. I have a 
> document which contains procedures for an Oracle and MS SQL database user and 
> want to create output for each user.
> 
> What's the easiest, most straightforward way to get this done in XXE?
> 

I'll use the sample DocBook article sent as an attachment.

This article contains 2 sections, first is about "foo" and second is
about "bar".

I want to convert this article to two HTML pages. The first HTML page
should tell you everything about "bar" and nothing about "foo", and the
second HTML page just the opposite.

Here's how to do it:

[1] Add attribute condition="foo" to first section.
Then add attribute condition="bar" to second section.

There are attributes other than "condition" that are used for profiling.
More information in http://www.sagehill.net/docbookxsl/

[2] Using XXE v3.6, select menu item "Options|Customize
Configuration|Change Document Conversion Parameters".

[a] Select Group of parameters called "Convert to single page HTML".
[b] Add parameter "profile.condition" with value "bar". See attached
screen shot.
[c] Click OK.

[3] Now the *tricky* part (We forgot to implement that in v3.6. Sorry,
this will be fixed in next release):

[a] Use notepad and open "XXE_user_preferences_dir/custom/~44oc~42ook/conf"

* XXE_user_preferences_dir is $HOME/.xxe/ on Linux/Mac and
%APPDATA%/\XMLmind\XMLEditor\ on Windows.

[b] the contents of this file is:

---
<?xml version="1.0" encoding="UTF-8"?>
<cfg:configuration
  name="DocBook"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration";>

  <cfg:parameterGroup name="DocBook.docb.toHTML1.transformParameters">
    <cfg:parameter name="profile.condition">bar</cfg:parameter>
  </cfg:parameterGroup>

</cfg:configuration>
---

add this element:

---
<cfg:property name="docb.toHTML1.transform"
url="true">xxe-config:docbook/xsl/html/profile-docbook.xsl</cfg:property>
---

after the cfg:parameterGroup element.

("docb.toHTML.transform" specifies the multi-page HTML transformation:
that is, normally, "xxe-config:docbook/xsl/html/chunk.xsl";
"docb.toPS.transform" specifies the PDF/PostScript transformation: that
is, normally, "xxe-config:docbook/xsl/fo/docbook.xsl"; etc. The basic
idea here is to substitute to the normal XSL "xxx.xsl", the profiling
XSL which is by convention "profile-xxx.xsl")

[c] Save the "conf" file (same as attached copy). Quit notepad.

[d] Quit XXE. Restart XXE. (This is needed only because we have manually
edited the "conf" file: a hack that will no longer be needed in next
release.)

[4] Now use "DocBook|Convert Document|Convert to HTML [single page, no
TOC]". This will produce an HTML page about "bar".

[5] Use menu item "Options|Customize Configuration|Change Document
Conversion Parameters", select "Convert to single page HTML", change
"profile.condition" from "bar" to "foo". Click OK. (No need to restart XXE.)

Using "DocBook|Convert Document|Convert to HTML [single page, no TOC]".
will this time produce an HTML page about "foo".







Reply via email to