Link to home
Start Free TrialLog in
Avatar of Miguel Oz
Miguel OzFlag for Australia

asked on

Can I use a master xsl file to be used for other xsl files?

Dear Experts:

My requirement is to define a master template (that contains header, footer and other common details) for all the other detail xsl files to consume.
Please provide sample implementation, The current tool I am using is Ecrion Designer if you can provide samples as EPR files will be great but xsl files will do as well.

Thanks,

MAS
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

I am not in a position to provide sample code on my phone

But i do this a lot

Have a seperate xslt file that has the template for the document node
I use that file as the “skin” put the header and the footer in the main template
Inside the body I call a named template

Then where your logic is make an xsl:import ( not xsl:include !!! )
Define the named template for content processing in the importing stylesheet
And apply templates inside the named template for the other nodes

Thatbis all there is to it
Changing the skin is easy, just import a different skin xslt
I use that for an equal,look and feel on different documents accross projects
I also have standard libraries that build xsl:fo fragments that could be reused accross templates
Avatar of Miguel Oz

ASKER

Import looks promising if you could provide some sample code or links with samples will be great
SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial