aspose file tools*
The moose likes XML and Related Technologies and the fly likes how to migate xmlbased application from j2sdk1.4 to j2sdk1.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "how to migate xmlbased application from j2sdk1.4 to j2sdk1.5" Watch "how to migate xmlbased application from j2sdk1.4 to j2sdk1.5" New topic
Author

how to migate xmlbased application from j2sdk1.4 to j2sdk1.5

Arun Kumar
Ranch Hand

Joined: Jan 21, 2005
Posts: 129

Dear Friends

I have to migrate an application written in ms-xml parser to a java based one .the application uses combination of xml and xslt to produce the html result
the older xslt has got ms-xml:nodeset this i have converted to exsl:nodeset for java, the converion is taking place and i am getting the result also

but when i transfer the application to j2sdk1.5 the application crashes giving this error
'Invalid conversion from 'node-set' to 'com.sun.org.apache.xalan.internal.xsltc.runtime.Node'.'

i use the xalan processor which is inbuilt with jdk

can any body tell me what is the solution to this or how to migate xmlbased application from j2sdk1.4 to j2sdk1.5
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
ms-xsl and exsl I imagine are namespaces.

Could you post what these namespaces are referring to ?
It is possible that the results of the two transformations are different. One returning a DOM Node and the other returning a DOM NodeSet.

You should look into the documentation of each implementation.
Thanks.

- m


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Arun Kumar
Ranch Hand

Joined: Jan 21, 2005
Posts: 129

Thanks for the reply first of all i want to convert an application running on MSXML to XALAN

The msxsl:node-set function enables you to convert a result tree fragment into a node set. The resulting node set always contains a single node and is the root node of the tree.
Namespace is :xmlns:msxsl="urn:schemas-microsoft-com:xslt"

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconsupportformsxslnode-setfunction.asp

The exsl:node-set function returns a node-set from a result tree fragment (which is what you get when you use the content of xsl:variable rather than its select attribute to give a variable value). This enables you to process the XML that you create within a variable, and therefore do multi-step processing.
Namespace is :xmlns:exsl="http://exslt.org/common"

http://www.exslt.org/exsl/functions/node-set/

and I found that exslt is equvalent of msxml nodeset
from this link
http://www.stylusstudio.com/xsllist/200505/post20110.html

and every thing worked fine in j2sdk1.4 but when i changed to j2sdk1.5 i is throwing exception
'Invalid conversion from 'node-set' to 'com.sun.org.apache.xalan.internal.xsltc.runtime.Node'.'

I think the problem is in the xalan implementation in j2sdk1.4 and 1.5 please help
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to migate xmlbased application from j2sdk1.4 to j2sdk1.5