Customization of layout-masters.xsl


Dave C
 

I have recently upgraded to DITA-OT 1.5.3 and noticed that several changes were made to the layout-masters.xsl and the customization catalog.xml. Does anyone know if adding the layout-masters.xsl to the catalog.xml is on the roadmap? Right now, if you want to customize the layout-masters.xsl, you have to edit the cfg/fo/ version, as the version in th customization folder is ignored. This means that I have to merge my customizations every time there is an update, which is a bit of a pain.

Thanks,
Dave C.


Bertrand Lefort <blefort@...>
 

I think it is already built in.

I have in my catalog.xml file :


<uri name="cfg:fo/layout-masters.xml" uri="fo/layout-masters.xml"/>


I also moved my customization directory path by setting property :

<property name="customization.dir"
value="${dita.dir}${file.separator}MyProjectDirectory${file.separator}fo${f
ile.separator}Customization"></property>

Bertrand

On 11-09-08 2:46 PM, "Dave Carter" <dac.dave@gmail.com> wrote:

I have recently upgraded to DITA-OT 1.5.3 and noticed that several
changes were made to the layout-masters.xsl and the customization
catalog.xml. Does anyone know if adding the layout-masters.xsl to the
catalog.xml is on the roadmap? Right now, if you want to customize the
layout-masters.xsl, you have to edit the cfg/fo/ version, as the version
in th customization folder is ignored. This means that I have to merge my
customizations every time there is an update, which is a bit of a pain.

Thanks,
Dave C.



------------------------------------

Yahoo! Groups Links



Dave C
 

That is the problem. The 'catalog.xml' only shows a custom path for the the 'layout-masters.XML', but I have my customization in the 'layout-masters.XSL'. I believe the 'layout-masters.XML' is for backwards compatibility (at least that is what it states in the header) but there just doesn't appear to be customization support for the 'layout-masters.XSL'.

Dave C.

--- In dita-users@yahoogroups.com, Bertrand Lefort <blefort@...> wrote:

I think it is already built in.

I have in my catalog.xml file :


<uri name="cfg:fo/layout-masters.xml" uri="fo/layout-masters.xml"/>


I also moved my customization directory path by setting property :

<property name="customization.dir"
value="${dita.dir}${file.separator}MyProjectDirectory${file.separator}fo${f
ile.separator}Customization"></property>

Bertrand



On 11-09-08 2:46 PM, "Dave Carter" <dac.dave@...> wrote:

I have recently upgraded to DITA-OT 1.5.3 and noticed that several
changes were made to the layout-masters.xsl and the customization
catalog.xml. Does anyone know if adding the layout-masters.xsl to the
catalog.xml is on the roadmap? Right now, if you want to customize the
layout-masters.xsl, you have to edit the cfg/fo/ version, as the version
in th customization folder is ignored. This means that I have to merge my
customizations every time there is an update, which is a bit of a pain.

Thanks,
Dave C.



------------------------------------

Yahoo! Groups Links



Bertrand Lefort <blefort@...>
 

I am sorry, I read to fast, you are right.

I am also interested in this feature, so I tried the following:

I simply import layout-masters.xsl into my custom.xsl file (defined in my
catalog) and it seems to work for what I tested.

Bertrand

On 11-09-09 8:06 AM, "Dave Carter" <dac.dave@gmail.com> wrote:

That is the problem. The 'catalog.xml' only shows a custom path for the
the 'layout-masters.XML', but I have my customization in the
'layout-masters.XSL'. I believe the 'layout-masters.XML' is for backwards
compatibility (at least that is what it states in the header) but there
just doesn't appear to be customization support for the
'layout-masters.XSL'.

Dave C.

--- In dita-users@yahoogroups.com, Bertrand Lefort <blefort@...> wrote:

I think it is already built in.

I have in my catalog.xml file :


<uri name="cfg:fo/layout-masters.xml" uri="fo/layout-masters.xml"/>


I also moved my customization directory path by setting property :

<property name="customization.dir"

value="${dita.dir}${file.separator}MyProjectDirectory${file.separator}fo$
{f
ile.separator}Customization"></property>

Bertrand



On 11-09-08 2:46 PM, "Dave Carter" <dac.dave@...> wrote:

I have recently upgraded to DITA-OT 1.5.3 and noticed that several
changes were made to the layout-masters.xsl and the customization
catalog.xml. Does anyone know if adding the layout-masters.xsl to the
catalog.xml is on the roadmap? Right now, if you want to customize the
layout-masters.xsl, you have to edit the cfg/fo/ version, as the
version
in th customization folder is ignored. This means that I have to merge
my
customizations every time there is an update, which is a bit of a pain.

Thanks,
Dave C.



------------------------------------

Yahoo! Groups Links





------------------------------------

Yahoo! Groups Links



Dave C
 

No worries, having both files with the same name and a different extension is confusing.

I have had some things work but the main customs I am trying to incorporate are the number of columns, and banners.

I have customized my simple-page-master in the layout-master.xsl as follows:

<fo:simple-page-master
master-name="body-first"
page-width="{$page-width}"
page-height="{$page-height}">
<fo:region-body
column-count="{$column-count-BODY}"
column-gap="{$column-gap-BODY}"
margin-top="{$page-margin-top}"
margin-bottom="{$page-margin-bottom}"
margin-left="{$page-margin-left}"
margin-right="{$page-margin-right}"/>
<fo:region-before extent="{$page-margin-top}"
display-align="before"
region-name="first-body-header"
background-image="{$headerGFX}"
background-repeat="no-repeat"/>
<fo:region-after extent="{$page-margin-bottom}"
display-align="after"
region-name="first-body-footer"
background-image="{$page-front-background-bottom}"
background-repeat="no-repeat"/>
</fo:simple-page-master>

I tried putting this in my customization, and even in the layout-masters.xsl file that is included in the customization that is included in the DITA-OT, and it would not work. Only the original in the cfg folder would work.

If I am missing something, please let me know.

Dave C.

--- In dita-users@yahoogroups.com, Bertrand Lefort <blefort@...> wrote:

I am sorry, I read to fast, you are right.

I am also interested in this feature, so I tried the following:

I simply import layout-masters.xsl into my custom.xsl file (defined in my
catalog) and it seems to work for what I tested.

Bertrand

On 11-09-09 8:06 AM, "Dave Carter" <dac.dave@...> wrote:

That is the problem. The 'catalog.xml' only shows a custom path for the
the 'layout-masters.XML', but I have my customization in the
'layout-masters.XSL'. I believe the 'layout-masters.XML' is for backwards
compatibility (at least that is what it states in the header) but there
just doesn't appear to be customization support for the
'layout-masters.XSL'.

Dave C.

--- In dita-users@yahoogroups.com, Bertrand Lefort <blefort@> wrote:

I think it is already built in.

I have in my catalog.xml file :


<uri name="cfg:fo/layout-masters.xml" uri="fo/layout-masters.xml"/>


I also moved my customization directory path by setting property :

<property name="customization.dir"

value="${dita.dir}${file.separator}MyProjectDirectory${file.separator}fo$
{f
ile.separator}Customization"></property>

Bertrand



On 11-09-08 2:46 PM, "Dave Carter" <dac.dave@> wrote:

I have recently upgraded to DITA-OT 1.5.3 and noticed that several
changes were made to the layout-masters.xsl and the customization
catalog.xml. Does anyone know if adding the layout-masters.xsl to the
catalog.xml is on the roadmap? Right now, if you want to customize the
layout-masters.xsl, you have to edit the cfg/fo/ version, as the
version
in th customization folder is ignored. This means that I have to merge
my
customizations every time there is an update, which is a bit of a pain.

Thanks,
Dave C.



------------------------------------

Yahoo! Groups Links





------------------------------------

Yahoo! Groups Links



Bertrand Lefort <blefort@...>
 

I tried to change the column behaviour in my simple-page-master and it
works for me.

I follow this guideline, you probably already know it, but I put in case:
http://www.scriptorium.com/whitepapers/ditaotpdf/DITA-PDF-tweaks.pdf


The issue could be at different level.


I would debug it like that:

1. Is your custom.xsl called ?

Try simple to add character to break you xsl. At compile time, DITA-OT
should tell you that there is an issue in your custom.xsl
If not, your custom.xsl file is not called



2. Do you have the entire template in your custom.xsl, like:

<xsl:template name="createDefaultLayoutMasters">

(...)

<fo:simple-page-master ...


(...)

</xsl:template>


or only the <fo:simple-page-master ... ?


Hope it helps.

Bertrand

On 11-09-09 9:18 AM, "Dave Carter" <dac.dave@gmail.com> wrote:

No worries, having both files with the same name and a different
extension is confusing.

I have had some things work but the main customs I am trying to
incorporate are the number of columns, and banners.

I have customized my simple-page-master in the layout-master.xsl as
follows:

<fo:simple-page-master
master-name="body-first"
page-width="{$page-width}"
page-height="{$page-height}">
<fo:region-body
column-count="{$column-count-BODY}"
column-gap="{$column-gap-BODY}"
margin-top="{$page-margin-top}"
margin-bottom="{$page-margin-bottom}"
margin-left="{$page-margin-left}"
margin-right="{$page-margin-right}"/>
<fo:region-before extent="{$page-margin-top}"
display-align="before"
region-name="first-body-header"
background-image="{$headerGFX}"
background-repeat="no-repeat"/>
<fo:region-after extent="{$page-margin-bottom}"
display-align="after"
region-name="first-body-footer"
background-image="{$page-front-background-bottom}"
background-repeat="no-repeat"/>
</fo:simple-page-master>

I tried putting this in my customization, and even in the
layout-masters.xsl file that is included in the customization that is
included in the DITA-OT, and it would not work. Only the original in the
cfg folder would work.

If I am missing something, please let me know.

Dave C.

--- In dita-users@yahoogroups.com, Bertrand Lefort <blefort@...> wrote:

I am sorry, I read to fast, you are right.

I am also interested in this feature, so I tried the following:

I simply import layout-masters.xsl into my custom.xsl file (defined in
my
catalog) and it seems to work for what I tested.

Bertrand

On 11-09-09 8:06 AM, "Dave Carter" <dac.dave@...> wrote:

That is the problem. The 'catalog.xml' only shows a custom path for the
the 'layout-masters.XML', but I have my customization in the
'layout-masters.XSL'. I believe the 'layout-masters.XML' is for
backwards
compatibility (at least that is what it states in the header) but there
just doesn't appear to be customization support for the
'layout-masters.XSL'.

Dave C.

--- In dita-users@yahoogroups.com, Bertrand Lefort <blefort@> wrote:

I think it is already built in.

I have in my catalog.xml file :


<uri name="cfg:fo/layout-masters.xml" uri="fo/layout-masters.xml"/>


I also moved my customization directory path by setting property :

<property name="customization.dir"
value="${dita.dir}${file.separator}MyProjectDirectory${file.separator}f
o$
{f
ile.separator}Customization"></property>

Bertrand



On 11-09-08 2:46 PM, "Dave Carter" <dac.dave@> wrote:

I have recently upgraded to DITA-OT 1.5.3 and noticed that several
changes were made to the layout-masters.xsl and the customization
catalog.xml. Does anyone know if adding the layout-masters.xsl to
the
catalog.xml is on the roadmap? Right now, if you want to customize
the
layout-masters.xsl, you have to edit the cfg/fo/ version, as the
version
in th customization folder is ignored. This means that I have to
merge
my
customizations every time there is an update, which is a bit of a
pain.

Thanks,
Dave C.



------------------------------------

Yahoo! Groups Links





------------------------------------

Yahoo! Groups Links





------------------------------------

Yahoo! Groups Links



Dave C
 

Thanks Bertrand!

The issue appears to be that I only included the page-sequence-masters instead of the entire template.

I am still unclear why then the layout-masters.xsl is included in the Customization folder, though.

Cheers,
Dave C.

--- In dita-users@yahoogroups.com, Bertrand Lefort <blefort@...> wrote:


I tried to change the column behaviour in my simple-page-master and it
works for me.

I follow this guideline, you probably already know it, but I put in case:
http://www.scriptorium.com/whitepapers/ditaotpdf/DITA-PDF-tweaks.pdf


The issue could be at different level.


I would debug it like that:

1. Is your custom.xsl called ?

Try simple to add character to break you xsl. At compile time, DITA-OT
should tell you that there is an issue in your custom.xsl
If not, your custom.xsl file is not called



2. Do you have the entire template in your custom.xsl, like:

<xsl:template name="createDefaultLayoutMasters">

(...)

<fo:simple-page-master ...


(...)

</xsl:template>


or only the <fo:simple-page-master ... ?


Hope it helps.

Bertrand



On 11-09-09 9:18 AM, "Dave Carter" <dac.dave@...> wrote:

No worries, having both files with the same name and a different
extension is confusing.

I have had some things work but the main customs I am trying to
incorporate are the number of columns, and banners.

I have customized my simple-page-master in the layout-master.xsl as
follows:

<fo:simple-page-master
master-name="body-first"
page-width="{$page-width}"
page-height="{$page-height}">
<fo:region-body
column-count="{$column-count-BODY}"
column-gap="{$column-gap-BODY}"
margin-top="{$page-margin-top}"
margin-bottom="{$page-margin-bottom}"
margin-left="{$page-margin-left}"
margin-right="{$page-margin-right}"/>
<fo:region-before extent="{$page-margin-top}"
display-align="before"
region-name="first-body-header"
background-image="{$headerGFX}"
background-repeat="no-repeat"/>
<fo:region-after extent="{$page-margin-bottom}"
display-align="after"
region-name="first-body-footer"
background-image="{$page-front-background-bottom}"
background-repeat="no-repeat"/>
</fo:simple-page-master>

I tried putting this in my customization, and even in the
layout-masters.xsl file that is included in the customization that is
included in the DITA-OT, and it would not work. Only the original in the
cfg folder would work.

If I am missing something, please let me know.

Dave C.

--- In dita-users@yahoogroups.com, Bertrand Lefort <blefort@> wrote:

I am sorry, I read to fast, you are right.

I am also interested in this feature, so I tried the following:

I simply import layout-masters.xsl into my custom.xsl file (defined in
my
catalog) and it seems to work for what I tested.

Bertrand

On 11-09-09 8:06 AM, "Dave Carter" <dac.dave@> wrote:

That is the problem. The 'catalog.xml' only shows a custom path for the
the 'layout-masters.XML', but I have my customization in the
'layout-masters.XSL'. I believe the 'layout-masters.XML' is for
backwards
compatibility (at least that is what it states in the header) but there
just doesn't appear to be customization support for the
'layout-masters.XSL'.

Dave C.

--- In dita-users@yahoogroups.com, Bertrand Lefort <blefort@> wrote:

I think it is already built in.

I have in my catalog.xml file :


<uri name="cfg:fo/layout-masters.xml" uri="fo/layout-masters.xml"/>


I also moved my customization directory path by setting property :

<property name="customization.dir"
value="${dita.dir}${file.separator}MyProjectDirectory${file.separator}f
o$
{f
ile.separator}Customization"></property>

Bertrand



On 11-09-08 2:46 PM, "Dave Carter" <dac.dave@> wrote:

I have recently upgraded to DITA-OT 1.5.3 and noticed that several
changes were made to the layout-masters.xsl and the customization
catalog.xml. Does anyone know if adding the layout-masters.xsl to
the
catalog.xml is on the roadmap? Right now, if you want to customize
the
layout-masters.xsl, you have to edit the cfg/fo/ version, as the
version
in th customization folder is ignored. This means that I have to
merge
my
customizations every time there is an update, which is a bit of a
pain.

Thanks,
Dave C.



------------------------------------

Yahoo! Groups Links





------------------------------------

Yahoo! Groups Links





------------------------------------

Yahoo! Groups Links



Erlend Leganger <eleganger@...>
 

On 9 September 2011 15:00, Bertrand Lefort <blefort@...> wrote:

I simply import layout-masters.xsl into my custom.xsl file (defined in my
catalog) and it seems to work for what I tested.

Thanks for the tip - this worked right out the box when doing as you described. Here is the contents of my customdir/fo/xsl/custom.xsl:

http://www.w3.org/1999/XSL/Transform"
    xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.1">
   
   
   
   
   

I strongly recommend the trick (learnt from Adena Frazer in a suite-sol webinar?) to append the string "custom" in the file name of customized files - this has saved me a ton of times from making changes in the wrong place.

- Erlend