[oXygen-user] How to associate file relative to project with transformation scenario

Sorin Ristache
Fri May 1 08:04:39 CDT 2009


Hello,

If the files that you distribute are located in the folder of the 
project file or in subfolders of this folder the associations between 
scenarios and transformed files are saved with relative paths. If you 
saved the scenarios at project level you can look at the 
scenario.associations entry.

I think you have ${currentFileURL} in the XSL URL field of the scenario 
associated with an XSLT stylesheet and this saves the URL of the 
stylesheet in the scenario, that is the absolute path on your computer. 
You should use a variable like ${pdu} (project directory as URL) because 
it is not expanded when the scenario is saved which means you can 
distribute the same structure of files as on your computer. It does not 
matter in what base directory the users will place the project file and 
the transformed files on their computers because the variable is 
expanded when the scenario is executed.


Regards,
Sorin


Jirka Kosek wrote:
> Sorin Ristache wrote:
> 
>> scenarios. This switch is necessary because only one scenario (that 
>> specifies an XSLT stylesheet) can be associated with an XML file. You 
>> cannot save and distribute to other users more than one scenario 
>> association for the same XML file. This is true also for the other type 
>> of scenarios: you cannot associate more than one scenario (that 
>> specifies an XML file) to the same XSLT stylesheet.
>>
>> If this is not what you want maybe an example will help me understand 
>> your use case.
> 
> I want to distribute examples of XML and XSLT files to students of XSLT
> class. I have several sample XML documents. For each such XML file I
> have several transformations which show different XSLT language
> constructs. When student opens some XSLT file he should by able to run
> it against corresponding input XML data just by pressing "Apply
> Transformation Scenario" button. This is what I would like to accomplish.
> 
> I can easily accomplish this on my computer by associating XML file to
> each transformation. Problem is that transformation in project file is
> identified by absolute path so when I move project file to another
> computer associations are lost.
> 
> 			Jirka
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> oXygen-user mailing list
> 
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user



More information about the oXygen-user mailing list