Author |
Message
|
AgentSmith |
Posted: Sat Jan 17, 2004 3:49 am Post subject: Apply XSL to XML - urgent. |
|
|
 Novice
Joined: 19 Nov 2003 Posts: 19
|
Hi,
I want to apply XSL to input XML and transform to output XML of required format in my message flow.
Is there an easy way of doing it?
I downloaded the CSIJava node SupportPac and installed the node. But the user manual says "Also Download the LotusXSL/Xalan implementation of the XSL processor from alphaWorks (http://www.alphaworks.ibm.com). Set the CLASSPATH environment variable appropriately".
I dunno what to download.
I also wondered if i cud use an API in a custom node java class to apply the XSL and get required output. But, I need to find out how to convert a Message element to String XML element and vice versa for the conversion.
Anybody Please suggest at the earliest.
Regards,
AgentSmith |
|
Back to top |
|
 |
AgentSmith |
Posted: Sun Jan 18, 2004 3:08 am Post subject: |
|
|
 Novice
Joined: 19 Nov 2003 Posts: 19
|
Hi,
I need to find some way to apply XSL to transform XML to required format.
Has anybody done that?
Pleease reply ASAP.
Regards,
AgentSmith |
|
Back to top |
|
 |
Tibor |
Posted: Tue Jan 20, 2004 6:57 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
|
Back to top |
|
 |
wooda |
Posted: Tue Jan 20, 2004 7:06 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
Are you on V2.1 or V5.0.
In V5.0 there is a built in node, XMLTransformation node which does exactly that. It allows you to specify the location of the stylesheet in the node or dynamically in the incoming message. |
|
Back to top |
|
 |
Missam |
Posted: Tue Jan 20, 2004 11:16 am Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
|
Back to top |
|
 |
AgentSmith |
Posted: Sat Jan 24, 2004 3:51 am Post subject: |
|
|
 Novice
Joined: 19 Nov 2003 Posts: 19
|
Hi IamSam,
As u suggested, I downoladed the XML transf node (IA0G) from IBM and installed it.
But, the installation manual and the help page for the node do not explain clearly how to use the node.
e.g., it suggests to use BLOB parser in MQInput node. But after input XML passes thru XML Transf node, i only encounter the output BLOB "Unknown PArser Name : MQSTR ".
What configurations shud i give to apply a XSLT to format XML data?
Can u please mail me the steps to make the node work?
sorry for the trouble.
I am awaiting ur response.
Thx n Regards,
AgentSmith. |
|
Back to top |
|
 |
Missam |
Posted: Sat Jan 24, 2004 5:57 pm Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
Hi,
Before going the message into XML Transaformation node convert into bitstream and send to the input terminal .on Properties sheet specify the location and file name of XSL you want to appy and the output will also come as bitstream which needs to be again converted to XML by providing RCD. |
|
Back to top |
|
 |
AgentSmith |
Posted: Tue Jan 27, 2004 3:23 am Post subject: |
|
|
 Novice
Joined: 19 Nov 2003 Posts: 19
|
Hi,
As u said, I used two RCDs - one b4 the XMLTransf node that converts input XML to BLOB and one after the node that converts output BLOB to XML.
IT WORKED !!!
Thx a lot.
But, I still have one more query.
The XSL File that I use to apply to the input XML, IMPORTS 4 more XSL files.
Although all XSLs are in the same path, the XML Transf node doesnot lookup those imported XSL files and throws the input to failure terminal.
How can i use multiple XSL files in the same XML Transformation node?
Please reply ASAP.
Regards,
AgentSmith |
|
Back to top |
|
 |
Missam |
Posted: Tue Jan 27, 2004 8:01 am Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
Hi
If you want to apply more than one XSL's use XMLTransformation node's for each XSL you want to apply in sequence.In your requirement use 4 transformation nodes for 4 XSL's. thats what we do. |
|
Back to top |
|
 |
Missam |
Posted: Tue Jan 27, 2004 2:54 pm Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
Hi
Just For Curiosity,can you tell me which version of mqsi are you using |
|
Back to top |
|
 |
AgentSmith |
Posted: Tue Jan 27, 2004 9:05 pm Post subject: |
|
|
 Novice
Joined: 19 Nov 2003 Posts: 19
|
Hi,
Thx for the idea.
I'm using WMQI 2.1
Regards,
AgentSmith |
|
Back to top |
|
 |
Missam |
Posted: Wed Jan 28, 2004 7:01 am Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
What level of CSD you are working on |
|
Back to top |
|
 |
waugh |
Posted: Mon May 10, 2004 7:21 am Post subject: were you able to apply xsl's dynamically? |
|
|
 Master
Joined: 19 Feb 2004 Posts: 225
|
Agent Smith,
The XML Transformation Node worked fine if i do it from node configuration properties. How do we do that dynamically?
Documentation says you need to set value to ComXmlxsltStylesheet element in OutputLocalEnvironment tree using a compute node before this node...
say the file name is in my incoming XML in an elemnt called myxsl.
<myxsl>hello.xsl</myxsl>
how do i assign this value to the ComXmlxslstylesheet element in outputenvironment tree?
Thanks in advance... |
|
Back to top |
|
 |
|