Page 1 of 1

Using Oracle XDK for transformation

Posted: Sun Nov 13, 2005 6:53 am
by nmshah
I'm trying to use Oracle XDK for JAXP transformation.

1) I copied xmlparserv2.jar into the lib directory of the plugin
2) I set the propery javax.xml.transform.TransformerFactory to oracle.xml.jaxp.JXSAXTransformerFactory
3 I added <library name="lib/xmlparserv2.jar"/> into plugin.xml runtime section as I'm using the Eclipse plugin and did eclipse -clean restart

When I run the transformation, I get the following error in the Problems pan
"Severity Description Resource In Folder Location Creation Time Id
2 org.apache.xerces.parsers.SAXParser my.xsl sample November 12, 2005 7:18:18 PM 50"

what am I missing?

Thanks

Posted: Tue Nov 15, 2005 4:57 pm
by sorin_ristache
Hello,

The problem with the XSLT transformer included in the Oracle XDK kit is that it cannot work as a standard JAXP transformer because it expects that the XML parser used to parse the input is an Oracle parser no matter what is the class name set in the system property for JAXP parser factory. When the input source of the transformer is created with other XML parser than the Oracle one the transform operation ends with a ClassCast exception because the class of the parser is not loaded from the Oracle jar file. If I parse the input source with the Oracle XML parser the transformation works OK. That means the Oracle XSLT transformer cannot be configured as JAXP transformer in the current version of <oXygen/>.

We will look into the possibility of allowing the configuration of an Oracle parser in <oXygen/> when the Oracle transformer is set as JAXP transformer but it will not be implemented in the short term (3 months).

I hope it helps,
Sorin

Posted: Tue Nov 15, 2005 7:33 pm
by nmshah
Hello Sorin,

Thanks for the follow up and explanation. I really appreciate it. I like oxygen and look forward to be able to work with Oracle XDK in future

One way this can be managed is through the use of "command" scripts that XDK comes with for both windows and *nix. I have sen other commercial IDEs (Stylus Studio and XML Spy) make use of those with setting the path and classpath instead of direct JAXP integration - that way of integration even works with Saxon

Regards
Nilesh

Posted: Tue Nov 15, 2005 8:36 pm
by george
Hi Nilesh,

That kind of integration also works from oXygen. Have a look at the external tools support. You can use a number of macros to refer to the current file, current file directory, etc.

Best Regards,
George