Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Arun Kumar
Ranch Hand
Posts: 133
Chrome Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Arun Kumar
Ranch Hand
Posts: 133
Chrome Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic