=======================================================================When you edit DocBook documents (and only DocBook documents), there is a BIG, BIG PITFALL.
You must first select the *DocBook* *Profiling* *Stylesheets* in order to get conditional processing (AKA profiling) to work.
This is done once for all by: 1) Opening any DocBook document, for example your test2B_1.xml. 2) Selecting "Options|Customize Document Conversion Stylesheets". 3) Selecting "Convert to RTF, WordprocessingML,..." 4) Selecting "Profiling stylesheets" from the combobox. See first attached screenshot.More information in: 3. Using the facilities added by the "Easy Profiling" add-on,
Important preliminary step if you author DocBook documents, http://www.xmlmind.com/xmleditor/_distrib/doc/profiling/the_solutions.html ======================================================================= Other attached files are:- Your "test2B_1.xml" with all inclusions removed (you did not send us the included modules)
- Your "BEL.profiles" with elements having audience=DEU given a cyan text color (to make a difference with those having audience=BEL having a red text color).
--> Please save this "BEL.profiles" attachment to disk in order to recreate the underlying conditional processing files (that is, BEL_files/BELGIUM.xslt DEU.xslt RevisionCycle.xslt). <--
- "test2B_1_BEL.docx", the result of case 1. - "test2B_1_Rev1.docx", the result of case 3. See my answers below. Gerd F. wrote:
attached you can find a DocBook and profile that I want to use.
As you can see, I've set the AUDIENCE attribute for the 2 text elements
in Par 1.1 (one to BEL and one to DEU) and the revision number to 1 for
the text element in paragraph 3.1
What I'm trying to accomplish when converting the document to a WORD file :
* Case 1 : create a book with all elements that have their AUDIENCE
attribute not set, or set to BEL
This is called "filtering". Procedure A: 1) Open "test2B_1.xml". 2) Select "DocBook|Conditional Processing|Select Profile". 3) Check "Conditional Processing Profiles" and choose "BEL.profiles". 4) Select "BELGIUM" from the "Select profile" combobox. See second attached screenshot.5) Select "DocBook|Convert Document|Convert to Office Open XML". This will give you test2B_1_BEL.docx
* Case 2 : create a book where all the elements REVISION attribute is
set to 1 with a left border
This is called "flagging". --> Out of the box, "flagging" is supported by DITA, NOT by DocBook. <--More information in: "Chapter 29. Revision control", http://www.sagehill.net/docbookxsl/RevisionControl.html
* Case 3 : create a book only with the elements for which the REVISION
attribute is set to 1 (a kind of change listing)
Another case of "filtering". Procedure B: 1) Open "test2B_1.xml". 2) Select "DocBook|Conditional Processing|Select Profile". 3) Check "Conditional Processing Profiles" and choose "BEL.profiles". 4) Select "RevisionCycle" from the "Select profile" combobox.5) Select "DocBook|Convert Document|Convert to Office Open XML". This will give you test2B_1_Rev1.docx
(Steps (2) and (3) are not required if you already went into Procedure A. I mean, Procedure A has already associated "BEL.profiles" to "test2B_1.xml".)
--------------------------------------------------------------------Please note that "Conditional Processing|Select Profile" is just a handy facility.
You can achieve exactly the same thing without the help of our "Easy Profiling" add-on because it's the DocBook XSL stylesheets which implement the conditional processing. See "Chapter 26. Profiling (conditional text)", http://www.sagehill.net/docbookxsl/Profiling.html
Tutorial about our "Easy Profiling" add-on here: http://www.xmlmind.com/xmleditor/_tutorial/easy_profiling/index.html
Documentation of our "Easy Profiling" add-on here: http://www.xmlmind.com/xmleditor/_distrib/doc/profiling/index.html
--------------------------------------------------------------------
As to the headers and footers, I need to add some text to the different sections of those elements.
I'm sorry but XMLmind Software is not the developer of the DocBook XSL stylesheets. (XMLmind Software is the developer of the DITA and XHTML stylesheets though.) Therefore, we never did that and we don't know how to do that.
You'll find the answers to this kind of questions in: DocBook XSL: The Complete Guide, Profiling (conditional text) by Bob Stayton http://www.sagehill.net/docbookxsl/index.html
<?xml version="1.0" encoding="UTF-8"?> <book version="5.1" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:trans="http://docbook.org/ns/transclusion" xmlns:svg="http://www.w3.org/2000/svg" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:db="http://docbook.org/ns/docbook"> <info> <title revision="1">eatc</title> <author> <personname><firstname>employment</firstname><surname/></personname> <affiliation> <orgname/> </affiliation> </author> </info> <chapter audience="BEL"> <title>test</title> <section> <title>testing par 1</title> <para>my paragraph</para> <section> <title>National Annexes</title> <para audience="BEL">BEL Annex 1234</para> <para audience="DEU">DEU Annex 4321</para> <table> <title>Title</title> <tgroup cols="2"> <colspec align="center"/> <tbody> <row> <entry colsep="1">test</entry> </row> <row> <entry>test2</entry> <entry>test 3</entry> </row> </tbody> </tgroup> </table> </section> </section> <section> <title revision="2" revisionflag="changed">para 3- SOME NEW TEXT - LEVEL 2-BIS TEST</title> <section> <title>Section</title> <para revision="1" revisionflag="changed">please add this paragraph</para> </section> </section> </chapter> </book>
<?xml version="1.0" encoding="UTF-8"?>
<profiles class="com.xmlmind.xmleditext.profiling.docbook.DBProfileSet"
xmlns="http://www.xmlmind.com/xmleditor/schema/profiling"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:prf="http://www.xmlmind.com/xmleditor/schema/profiling"
xmlns:ns="http://www.w3.org/1999/xhtml">
<attributes>
<attribute allowMultipleValues="false" name="audience" valueSeparator=";">
<value style="color: #FF3366;">BEL</value>
<value style="color: #00CCCC;">DEU</value>
</attribute>
<attribute allowMultipleValues="false" name="revision">
<value style="border-top-style: none; border-bottom-style: none; border-left-style: solid; border-right-style: none; border-color: #339900;">1</value>
<value>2</value>
<value>3</value>
</attribute>
</attributes>
<profile implementation="BEL_files/BELGIUM.xslt" xml:id="BELGIUM">
<description xml:space="preserve">Profile for BEL annexes</description>
<attribute name="audience">
<value>BEL</value>
</attribute>
</profile>
<profile implementation="BEL_files/DEU.xslt" xml:id="DEU">
<description xml:space="preserve">Profile for DEU annexes</description>
<attribute name="audience">
<value>DEU</value>
</attribute>
</profile>
<profile implementation="BEL_files/RevisionCycle.xslt"
xml:id="RevisionCycle">
<description xml:space="preserve">list of revised paragraphs</description>
<attribute name="revision">
<value>1</value>
</attribute>
</profile>
</profiles>
test2B_1_BEL.docx
Description: MS-Word 2007 document
test2B_1_Rev1.docx
Description: MS-Word 2007 document
-- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

