Then repeat what you did in a "0assembly.xxe" file importing stock

"assembly.xxe", simply do not forget to replace command prefix "db51."

by "asm.".



Dear Mr Shafie,



Thanks for your swift reply. We actually hoped - knowing that assemblies will 
eventually by compiled into valid DocBook documents -that they would use the 
same parameter sets as DocBook documents, avoiding to redo the complete 
configuration work... But we can surely proceed as you suggest.



Many thanks for your feedback,

Best regards,

Philippe.





Philippe Nobili

Subsurface Imaging - Product Engineering

Tel: +33 16447 4090 | Mobile: +33 63756 6441



CGG,

27 avenue Carnot

Massy, 91341 - France

http://www.cgg.com



Please consider the environment before printing.



-----Original Message-----
From: Hussein Shafie [mailto:huss...@xmlmind.com]
Sent: Wednesday, February 01, 2017 3:26 PM
To: nobili, philippe
Cc: 'xmleditor-support@xmlmind.com'
Subject: Re: [XXE] Using Docbook-5.1 customization in assemblies



On 01/31/2017 06:35 PM, nobili, philippe wrote:

>

>

> We are in the process to upgrade to XXE-7.3  to take advantage of

> DocBook-5.1 assemblies for some of our products documentation.

>

>

>

> We successfully ported our DocBook (4) customization to DocBook-5.1;



The stock -as of XXE v7.3- "DocBook v5.1+ configuration" add-on contains in 
fact *two* configurations:







1) <XXE_install_dir>/addon/config/docbook51/docbook51.xxe contains a

configuration called "DocBook v5.1+".



This configuration is used to parametrize XXE when a DocBook 5.1 book,

chapter, section, topic, etc, is opened in XXE.



It contains process commands like (excerpts from

docbook51_convert_menu.incl):

---

   <command name="db51.toPS">

     <process>

       <subProcess name="{db51}toPS.step0" parameter="%*" />



       <mkdir dir="images/callouts" />

       <copyProcessResources

resources="@docbook5-config:xsl/images/svg_images.list"

                             to="images" />

       <copyProcessResources

resources="@docbook5-config:xsl/images/callouts/svg_callouts.list"

                             to="images/callouts" />



       <transform stylesheet="docbook5-config:xsl/fo/docbook.xsl"

                  file="__doc.xml" to="__doc.fo">

         <info>

           <label>Convert to PDF, PostScript</label>

<documentation>http://docbook.sourceforge.net/release/xsl/current/doc/fo/%{parameter.name|paper.type}.html</documentation<http://docbook.sourceforge.net/release/xsl/current/doc/fo/%25%7bparameter.name|paper.type%7d.html%3c/documentation>>

<documentation>http://docbook.sourceforge.net/release/xsl/current/doc/fo/%{attribute-set.name|formal.object.properties}.html</documentation<http://docbook.sourceforge.net/release/xsl/current/doc/fo/%25%7battribute-set.name|formal.object.properties%7d.html%3c/documentation>>

           <alternateStylesheet

location="docbook5-config:xsl/fo/profile-docbook.xsl"

                                label="Profiling stylesheet" />

           <alternateStylesheets name="db51.toPS.alternateXSLT" />

         </info>



         <parameter name="use.extensions">1</parameter>

         <parameter name="paper.type">A4</parameter>

         <parameter name="toc.section.depth">3</parameter>

         <parameter name="section.autolabel">1</parameter>

         <parameter name="callout.graphics">1</parameter>

         <parameter name="shade.verbatim">1</parameter>

         <parameter name="ulink.show">0</parameter>

         <parameter name="variablelist.as.blocks">1</parameter>



                <parameterGroup name="db51.toPS.transformParameters" />

       </transform>



       <processFO processor="XEP" file="__doc.fo" to="__doc.%0">

         <parameter name="OUTPUT_FORMAT">%0</parameter>

         <!-- Workaround XEP bug: renderx #22766 -->

         <parameter name="VALIDATE">false</parameter>

         <parameter name="PDF.PDF_VERSION">1.5</parameter>

                <parameterGroup name="db51.toPS.XEPParameters" />



                <!-- If XEP plug-in has not been installed, try FOP plug-in. -->

                <processFO processor="FOP" file="__doc.fo" to="__doc.%0">

                  <parameter name="renderer">%0</parameter>

                  <parameter name="strict-validation">false</parameter>

                  <parameterGroup name="db51.toPS.FOPParameters" />

                </processFO>

       </processFO>

     </process>

   </command>

---







2) <XXE_install_dir>/addon/config/docbook51/assembly.xxe contains a

configuration called "DocBook Assembly v5.1+".



This configuration is used to parametrize XXE when a DocBook 5.1

*assembly* (only an assembly, not a book, not a chapter, not a section,

not a topic, etc) is opened in XXE.



It contains process commands like (excerpts from

assembly_convert_menu.incl):



---

   <command name="asm.toPS">

     <process>

       <subProcess name="{asm}toPS.step0" parameter="%*" />



       <mkdir dir="images/callouts" />

       <copyProcessResources

resources="@docbook5-config:xsl/images/svg_images.list"

                             to="images" />

       <copyProcessResources

resources="@docbook5-config:xsl/images/callouts/svg_callouts.list"

                             to="images/callouts" />



       <transform stylesheet="docbook5-config:xsl/fo/docbook.xsl"

                  file="__doc.xml" to="__doc.fo">

         <info>

           <label>Convert to PDF, PostScript</label>

<documentation>http://docbook.sourceforge.net/release/xsl/current/doc/fo/%{parameter.name|paper.type}.html</documentation<http://docbook.sourceforge.net/release/xsl/current/doc/fo/%25%7bparameter.name|paper.type%7d.html%3c/documentation>>

<documentation>http://docbook.sourceforge.net/release/xsl/current/doc/fo/%{attribute-set.name|formal.object.properties}.html</documentation<http://docbook.sourceforge.net/release/xsl/current/doc/fo/%25%7battribute-set.name|formal.object.properties%7d.html%3c/documentation>>

           <alternateStylesheet

location="docbook5-config:xsl/fo/profile-docbook.xsl"

                                label="Profiling stylesheet" />

           <alternateStylesheets name="asm.toPS.alternateXSLT" />

         </info>



         <parameter name="use.extensions">1</parameter>

         <parameter name="paper.type">A4</parameter>

         <parameter name="toc.section.depth">3</parameter>

         <parameter name="section.autolabel">1</parameter>

         <parameter name="callout.graphics">1</parameter>

         <parameter name="shade.verbatim">1</parameter>

         <parameter name="ulink.show">0</parameter>

         <parameter name="variablelist.as.blocks">1</parameter>



                <parameterGroup name="asm.toPS.transformParameters" />

       </transform>



       <processFO processor="XEP" file="__doc.fo" to="__doc.%0">

         <parameter name="OUTPUT_FORMAT">%0</parameter>

         <!-- Workaround XEP bug: renderx #22766 -->

         <parameter name="VALIDATE">false</parameter>

         <parameter name="PDF.PDF_VERSION">1.5</parameter>

                <parameterGroup name="asm.toPS.XEPParameters" />



                <!-- If XEP plug-in has not been installed, try FOP plug-in. -->

                <processFO processor="FOP" file="__doc.fo" to="__doc.%0">

                  <parameter name="renderer">%0</parameter>

                  <parameter name="strict-validation">false</parameter>

                  <parameterGroup name="asm.toPS.FOPParameters" />

                </processFO>

       </processFO>

     </process>

   </command>

---



Note that the two above process commands differ only by their command

"prefixes". The first one uses "{db51}" and "db51.". The second one uses

{asm} and "asm.".



Therefore:



If you managed to successfully customize the "DocBook v5.1+"

configuration in a "0docbook51.xxe" file importing stock

"docbook51.xxe". (Reference:

http://www.xmlmind.com/xmleditor/_distrib/doc/configure/customizing.html)



Then repeat what you did in a "0assembly.xxe" file importing stock

"assembly.xxe", simply do not forget to replace command prefix "db51."

by "asm.".



Sample "0assembly.xxe":

---

<configuration name="DocBook Assembly v5.1+"

   mimeType="application/x-docbook-assembly+xml"

   icon="xxe-config:common/mime_types/xml-green.png"

   xmlns="http://www.xmlmind.com/xmleditor/schema/configuration";

   xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration";

   xmlns:xi="http://www.w3.org/2001/XInclude";

   xmlns:xlink="http://www.w3.org/1999/xlink";

   xmlns:db="http://docbook.org/ns/docbook";>



   <include location="docbook51-config:assembly.xxe"/>



   <parameterGroup name="asm.toPS.transformParameters">

     <parameter name="variablelist.as.blocks">1</parameter>

   </parameterGroup>



   <parameterGroup name="asm.toRTF.transformParameters">

     <parameterGroup name="asm.toPS.transformParameters"/>

   </parameterGroup>



</configuration>

---









> how should we proceed to make DocBook-5.1 assemblies use it rather than the

> stock DocBook customization when converting assemblies into the target

> publishing format ?

>



If my memory serves me well you use "xxetool convert" to convert your

XML documents to other formats. Reference:

http://www.xmlmind.com/xmleditor/_distrib/doc/xxetool/index.html



It works exactly the same for DocBook 5.1 assemblies, but with process

commands having names starting with prefix "asm.".



xxetool is self-documenting:

---

$ xxetool convert

asm.toEclipseHelp

asm.toEpub

asm.toHTML

asm.toHTML1

asm.toHTMLHelp

asm.toJavaHelp

asm.toJavaHelpWithPrefix

asm.toPSFile

asm.toRTF

asm.toWebHelp

db5.toEclipseHelp

db5.toEpub

...

docb.toWebHelp

xhtml.toPSFile

xhtml.toRTF

---



Example (of course, "my_doc.xml" contains an assembly):

---

xxetool convert -p highlight.source 1 -p admon.graphics 1 \

     asm.toPSFile my_doc.xml \

     -s pdf -s pdf -u my_doc.pdf

---



Please download the full source of tutorial "DocBook Assemblies and

Topics for the Impatient" from

http://www.xmlmind.com/tutorials/DocBookAssemblies/DocBookAssemblies_src.zip

and take a look at the makefile it contains.














This email and any accompanying attachments are confidential. If you received 
this email by mistake, please delete
it from your system. Any review, disclosure, copying, distribution, or use of 
the email by others is strictly prohibited.
--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to