Skip to main content
1-Visitor
January 29, 2015
Solved

Using custom stylesheet while publishing using publishing engine

  • January 29, 2015
  • 1 reply
  • 3826 views

Hi Experts,

I am using Publishing engine with arbortext editor to publish document. My problem is I am not able to use custom stylesheet while publishing. How to use custom .style stylesheet for publishing?

Publishing engine always use the default style sheet to publish. As a work around I am replacing default stylesheet with custom.

Please help me know the proper way of doing this task.

Thanks in Advance.

Best answer by SirkoRudolph

Hi,

There are 2 different ways to achieve this. First of all you should define an attribute on your bookmap that the authors set to define the desired output type (Service, Technical). You could use the standard DITA attribute "outputclass" on the bookmap element for example. Based on this attribute's value you could do

Approach 1:

When doing "Save As Server Object" you need to map this attribute to a Windchill attribute on your Dynamic Document. You can then use this Windchill attribute in the Publishing Rules to tell PE to use a different stylesheet.

Approach 2:

You handle the outputclass attribute value in your stylesheet. That means you merge the stylesheets into one and define your layout based on the value of the outputclass attribute on the bookmap.

Approach 1 is probably easier to handle as it keeps your stylesheets separate and easier to maintain.

A variant of this would be to define 2 publishing rules for manual publishing from Windchill where you can select the desired output type. If this is working depends on whether you want to do a manual or automatic publishing in Windchill. If you are only doing manual publishing from Windchill that would probably be the easiest way and would not even require the attribute on the bookmap.

To point your publishing rules to use a different stylesheet you need to add this worker parameter to your ruleset (using the standard dita stylesheet as an example here):

<worker name="stylesheet">D:\ptc\PE\custom\doctypes\ditabase\ditabase.style</worker>

Please note that the path to the stylesheet must be an absolute path to the stylesheet file on the Publishing Engine server.

I hope this helps.

Sirko

1 reply

1-Visitor
January 29, 2015

Hi there,

Publishing Engine must be configured to use a stylesheet other than the default.

The stylesheet must be placed in the doctype folder of the custom folders you are using on PE. The stylesheet will be an option in the dropdown on the publish dialog. If you want your stylesheet to be the default, you'll need to configure the custom folders to point to your stylesheet as the default.

hmungekar1-VisitorAuthor
1-Visitor
January 30, 2015

Thanks jeff,

let me tell you my current senario.

When I save document as "Save As Server Object" from Editor, my document gets published as PDF in Windchill as per the publishing rules I have written.

My question is, if I want to publish different types of manuals (Service, Technical) using same Doctype (Bookmap) but with different Stylesheets, do I need to define different Doctypes or is there any altenative way?

5-Regular Member
January 30, 2015

Hi,

There are 2 different ways to achieve this. First of all you should define an attribute on your bookmap that the authors set to define the desired output type (Service, Technical). You could use the standard DITA attribute "outputclass" on the bookmap element for example. Based on this attribute's value you could do

Approach 1:

When doing "Save As Server Object" you need to map this attribute to a Windchill attribute on your Dynamic Document. You can then use this Windchill attribute in the Publishing Rules to tell PE to use a different stylesheet.

Approach 2:

You handle the outputclass attribute value in your stylesheet. That means you merge the stylesheets into one and define your layout based on the value of the outputclass attribute on the bookmap.

Approach 1 is probably easier to handle as it keeps your stylesheets separate and easier to maintain.

A variant of this would be to define 2 publishing rules for manual publishing from Windchill where you can select the desired output type. If this is working depends on whether you want to do a manual or automatic publishing in Windchill. If you are only doing manual publishing from Windchill that would probably be the easiest way and would not even require the attribute on the bookmap.

To point your publishing rules to use a different stylesheet you need to add this worker parameter to your ruleset (using the standard dita stylesheet as an example here):

<worker name="stylesheet">D:\ptc\PE\custom\doctypes\ditabase\ditabase.style</worker>

Please note that the path to the stylesheet must be an absolute path to the stylesheet file on the Publishing Engine server.

I hope this helps.

Sirko