Project

Profile

Help

Compiled and non compiled stylesheet

Added by Anonymous over 17 years ago

Legacy ID: #4164344 Legacy Poster: eric (erbri)

Hi, I am developping a documents generation application using saxon 8.9 and I'd like to know if it is possible (and how) to mix compiled and non compiled stylesheets. My app is made of - a set of generic stylesheets (a kind of framework) that should not be modified - and some customizable stylesheets that contain templates which could be modified by the user to change the layout of the documents The customizable stylesheets import the generic ones and the whole process is run by executing "java -jar saxon8.jar input.xml mystylesheet.xsl -o thedoc.html" I'd like to provide a jar (or anything else) file containing the framework and a default (customizable) mystylesheet.xsl for the user to change the output layout. Thank you for your answers.


Replies (2)

RE: Compiled and non compiled stylesheet - Added by Anonymous over 17 years ago

Legacy ID: #4164554 Legacy Poster: Michael Kay (mhkay)

You can only compile a complete stylesheet, not individual modules. XSLT isn't really designed to enable separate compilation of individual stylesheet modules. For example, an importing module might override a global variable or named template that the imported module refers to, and the overriding variable or template might have a completely different data type, which would invalidate all type inferencing done in the imported module. In fact, the imported module doesn't even have to be a valid stylesheet in its own right: it can reference variables, functions, or templates that exist only in the importing module. You might be able to restructure your application as a pipeline so the generic components define a complete transformation and the user-supplied components act as a pre- or post-processor. Michael Kay

RE: Compiled and non compiled stylesheet - Added by Anonymous over 17 years ago

Legacy ID: #4164723 Legacy Poster: eric (erbri)

Thank you for your answer. I will restructure the app to generate an intermediary xml format of my own which will serve as an input for the last step (where user customization will take place)

    (1-2/2)

    Please register to reply