Applying xml-stylesheet to XML files

Having trouble installing Oxygen? Got a bug to report? Post it all here.
ychaikin
Posts: 20
Joined: Thu Sep 09, 2004 9:23 pm

Applying xml-stylesheet to XML files

Post by ychaikin »

I've noticed this a few times already and wanted to know if I am configuring Oxygen wrong somehow...

Here is what happens... I have different XML files with xml-stylesheet declarations in them. The XSL file it points to exists in the same directory as the XML file itself. For some files, the default transformation configuration works just fine. For others, I get an error:
"Description: E C:\MyHelper.xsl (The system cannot find the file specified)"

Yet, if I explicitly configure the XSL file to be the transformation file using the transformation configuration XSLT option (choosing the XSL file), everything works.

What am I doing wrong?

Thanks,
Yaakov.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Yakoov,

When you invoke a transformation oXygen will apply the scenario you have selected for that file. To see what schenario is selected you can use the Configure transformation scenarios action and see what scenario is selected. To have the transformation use the associated stylesheet via the xml-stylesheet PI you should have either the "xml-stylesheet processing instruction" scenario selected or a scenario that enables the "Use xml-stylesheet declaration" on the XSLT tab.

Best Regards,
George
ychaikin
Posts: 20
Joined: Thu Sep 09, 2004 9:23 pm

Post by ychaikin »

Well, I am doing that. In fact, OxygenXML has this as default, AFAIK. If you bring an XML file into OxygenXML and click on the "VCR Play" button (Apply Transformation Scenario), it will ask you if you want to use the xml-stylesheet PI inside your XML.

When I say "yes" to that, it gives the message I described. Even if I manually configure it to use the xml-stylesheet PI, it still gives me that message.

Note that I have no clue what MyHelper.xsl file is about. I open up tons of different XML files and it gives me that message in all of them. (These files are not related and no where does it reference MyHelper.xsl).

Any ideas?

Thanks,
Yaakov.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Yaakov,

If you can reproduce the problem with a simple xml/xsl please send that to support at oxygenxml.com together with the name of the scenario you are using and with the file you get after Options->Export transformation scenarios.

Best Regards,
George
Post Reply