In one of my xsl transformations i needed to import a generic xsl from the mds store.
For this i created a new jdeveloper application with a soa sar deployment descriptor and jar descriptor in it.
Contents of the jar :
[sourcecode language=”xml”]
SharedMDSResources/generic.xsl
[/sourcecode]
When i browse the mds repository i see the SharedMDSResources folder in the root of the tree (instead of in the apps folder).
For testing i deployed the jar manually in the EM.
In my xsl i use the next import :
[sourcecode language=”xml”]
[/sourcecode]
Resulting in the next stacktrace :
[sourcecode language=”xml”]
The following exception occurred while attempting to execute operation copy at line 389
This page contains the following errors:
Below is a rendering of the page up to the first error.
An error occurs while processing the XPath expression; the expression is ora:doXSLTransformForDoc(‘xsl/format_dates.xsl’, $csvXml).
The XPath expression failed to execute; the reason was: XML-22000: (Fatal Error) Error while parsing XSL file (oramds:/deployed-composites/default/mycomposite_rev1.0/xsl/my_process.xsl
Check the detailed root cause described in the exception message text and verify that the XPath query is correct.
[/sourcecode]
Problem
Since i deployed the jar manually from within the EM the SharedMDSResources folder will not be created in the apps-dir but in the root of the tree.
The oramds imports can only import from within the apps folder structure.
Solution
When manually creating the jar archive make sure the contributor has the apps-directory already in the path
Path : d:\SharedMDS\apps\SharedMDSResources\
After the import the mds repository will contain the path ‘oramds:/apps/SharedMDSResources/generic.xsl’
Or keep the jar as it was (folder/file structure = SharedMDSResources/generic.xsl) and use the scripts from for example Edwin and setup the ‘mds.reposistory’ correctly (ending with the apps-directory in it).
example topfragment of a xslt we currently use (this is not the xslt mentioned in the blog, but just a working example with oramds import)
[sourcecode language=”xml”]
[/sourcecode]
5 Responses to “Oracle SOA Suite : import in xsl from mds location”
Hi Eric,
Did you manage to deploy xsl which includes xsl from oramds? Can you send me an example?
Many thanks,
Yuke
Hi Yuke,
Yes we do that in some of our composites and they deploy just fine.
I added this part “topfragment of the xslt” in the blog.
Hi Eric,
Thanks for your prompt response.
I also manage to get it working now, following your instructions. However, I wonder if you encountered the following issue with included XSL template being copied into the project when switched to design view.
https://community.oracle.com/thread/3520665
If that’s a Jdeveloper feature, wonder if there is a way to turn it off.
Many thanks,
Yuke
Hi Yuke,
What’s the filelocation of the xsl in which you do the oramds import ? Is this xsl in the soa content folder ?
I mostly use xmlspy to do my xslt testing and when it’s all done i change it to oramds imports
Hi Eric,
No, it isn’t. The XSL’s are in a different project. If you do your XSLT development in XMLSpy, then it would not be a problem. It will only become an issue when you view your XSL in design view in Jdeveloper, as described in the Oracle thread. It’s just bizzare.
Anyway, thanks for your help.
Cheers,
Yuke