[oXygen-user] XML AUTHOR + Docbook5: Problems with using custom HTML chunk scenarios (parameters conflict with customization layer)

Radu Coravu
Thu Dec 2 02:06:03 CST 2010


Hi Robert,

If I were you I'd start by duplicating the read-only "Docbook HTML - 
Chunk" transformation scenario, then press the "Parameters" button and 
add/remove/edit my custom parameter values.
There is nothing stopping you to modify the parameters Oxygen sends by 
default to the stylesheet.
When you look in the parameters list from the scenario edit dialog only 
the "bolded" parameter entries get transmitted to the XSLs. All the 
others represent the default values and are not sent to the XSL.

But, nonetheless, if you create a new transformation scenario:
The error that you get seems to indicate that the XSLT processor cannot 
create the HTML files in the chunk output directory.
So a very important XSLT parameter which you must set in the Oxygen 
Scenario Edit Dialog "Parameters" list is the "base.dir" parameter.
This directory points to the place where the HTML output will be set.
If this parameter is not set (which is probably your case) the HTML 
output will be relative to the place where the XSL stylesheets are 
located (probably in C:\Program Files\...OXYGEN_INSTALL_DIR....) which 
most of the times is a read-only location.

You should best set the value of "base.dir" to:
${cfd}/chunks/

this value will be automatically expanded to a "chunks" directory in the 
directory where the source XML file is located. This is the default 
value which is set in the Oxygen default "Docbook HTML - Chunk" 
read-only scenario.

Adding your "rjstyle.xsl" as an additional "cascading" stylesheet in the 
transformation scenario is not a good idea because:
The cascade added XSLT stylesheets are applied on the output generated 
by the default specified stylesheet. So your XSLT would be applied on 
the HTML files which were created by the default XSLT. In this case the 
problem is worse because if you have chunking then Oxygen really does 
not know where the first stylesheet has generated the HTML content.

Hope this helps.

Regards,
Radu

Radu Coravu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


On 11/28/2010 11:27 PM, Robert Nagle wrote:
> I have been having a persistent problem with doing HTML-chunk
> transformations with Docbook 5 and Oxygen 12. I think I had similar
> problems with Oxygen 11 too.
>
> I wrote a xsl customization layer  rjstyle.xsl.
>
> Initially what I thought I could do was to duplicate the HTML-chunk
> scenario and  change the XSL URL to rjstyle.xsl. But I discover that a
> few of my parameter settings  are not working. That is because the
> parameter values I am giving in rjstyle.xsl are differing from the
> preset parameters in Oxygen's HTML chunk scenarios. Oxygen's parameter
> settings are overriding my own in rjstyle.xsl.
>
> QUESTION: Is there a way to tell your Edit Scenario dialog for the
> parameter settings in rjstyle.xsl to override whatever presets Oyxgen
> put into its out-of-the-box Docbook scenarios?
>
> The answer would seem to be to create a new scenario from scratch.
> However, whenever I do that, I seem to receive a lot of compiler
> errors.
>
> To give an example of what I mean by errors:
>
> 1)Engine name: Saxon6.5.5
> Severity: error
> Description: ch01.html (Access is denied)
>
>
> Engine name: Saxon6.5.5
> Severity: error
> Description: The system cannot find the path specified
>
> (With both types of errors, it works fine when I use the
> out-of-the-box docbook chunk scenarios. Also, I have torn out all the
> excess stuff from rjstyle.xsl except for:
>      <xsl:import href="../../../1latest/docbook-xsl-1.76.1/html/chunk.xsl"/>
>
>
> 2)non-validating XHTML code. It won't show in the browser. (this is
> less common than the above two; might be a fluke with my current
> project).
>
>
>
>
> If I use Oxygen's chunk XSL defaults and add rjstyle.xsl as an
> additional XSLT stylesheet (an option in the Edit Scenario dialog), I
> get an error:
>
> SystemID: I:\My Documents\My Dropbox\xml\testbug2\index2.xml
> Engine name: Saxon6.5.5
> Severity: error
> Description: Cannot apply cascading transformation. Reason:
> org.xml.sax.SAXParseException: A well-formed document requires a root
> element.
>
>
> One of the complicating factors here is that the Edit Scenario dialog
> (with 3 tags) has a lot of options. It's good that the Oxygen team can
> compress so many options into one dialog; on the other hand, it's hard
> to transfer settings into a New Scenario and be certain you have
> copied everything.
>
> QUESTION: Do you have any hints about creating Docbook transformations
> from scratch that avoid the Access is denied and system cannot find
> the path specified errors?
>
> I realize that I am not giving you enough information about my
> specific project. But I suspect that you may have some general ideas
> about what is wrong (besides, my brain is growing weary).
>
> By the way, you might be wondering why I am not content using an
> out-of-the-box chunk scenario. 1)I find it cumbersome to edit the
> parameter list (and don't have a way to save my settings in an
> easy-to-read format) and 2)It's easier for me to hard code the latest
> docbook xsl in a user directory rather than a system directory.
>





More information about the oXygen-user mailing list