ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » while using xslt,to group by its generating an exception.

Post new topic  Reply to topic
 while using xslt,to group by its generating an exception. « View previous topic :: View next topic » 
Author Message
sai kumar123
PostPosted: Wed Jan 04, 2017 3:09 am    Post subject: while using xslt,to group by its generating an exception. Reply with quote

Novice

Joined: 16 Dec 2016
Posts: 15

my xml:

Code:
<?xml version="1.0"?>

<root>

<sport rank="2" name="sachin" matches="487" state="MH" type="cricket"/>

<sport rank="3" name="gopichand" matches="453" state="AP" type="badminton"/>

<sport rank="12" name="rahul" matches="345" state="TN" type="tennis"/>

<sport rank="12" name="rushi" matches="98" state="MP" type="football"/>

<sport rank="4" name="saina" matches="56" state="TG" type="badminton"/>

<sport rank="5" name="sehwag" matches="564" state="TG" type="cricket"/>

<sport rank="12" name="chetan" matches="345" state="UP" type="tennis"/>

<sport rank="45" name="anand" matches="78" state="AP" type="football"/>

</root>


xslt:


Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
   <xsl:output method="xml" indent="yes" encoding="UTF-8" omit-xml-declaration="yes" />
   <xsl:key name="type" match="sport" use="@type" />
   <xsl:template match="root">
      <xsl:element name="root">
         <xsl:for-each-group select="*" group-by="@type">
            <xsl:element name="type">
               <xsl:attribute name="value">
                  <xsl:value-of select="@type" />
               </xsl:attribute>
               <xsl:for-each select="current-group()">
                  <xsl:element name="sport">
                     <xsl:element name="rank">
                        <xsl:value-of select="@rank" />
                     </xsl:element>
                     <xsl:element name="name">
                        <xsl:value-of select="@name" />
                     </xsl:element>
                    <xsl:element name="matches">
                        <xsl:value-of select="@matches" />
                     </xsl:element>

                    <xsl:element name="state">
                        <xsl:value-of select="@state" />
                     </xsl:element>
                 </xsl:element>
               </xsl:for-each>
            </xsl:element>
         </xsl:for-each-group>
      </xsl:element>
   </xsl:template>
</xsl:stylesheet>



exception:

Code:
   RecoverableException
         File:CHARACTER:F:\build\slot1\S900_P\src\DataFlowEngine\MessageServices\ImbDataFlowNode.cpp
         Line:INTEGER:1155
         Function:CHARACTER:ImbDataFlowNode::createExceptionList
         Type:CHARACTER:ComIbmMQInputNode
         Name:CHARACTER:dynamic#FCMComposite_1_6
         Label:CHARACTER:dynamic.MQ Input
         Catalog:CHARACTER:BIPmsgs
         Severity:INTEGER:3
         Number:INTEGER:2230
         Text:CHARACTER:Node throwing exception
         Insert
               Type:INTEGER:14
               Text:CHARACTER:dynamic.MQ Input
         RecoverableException
               File:CHARACTER:F:\build\slot1\S900_P\src\DataFlowEngine\PluginInterface\ImbJniNode.cpp
               Line:INTEGER:1304
               Function:CHARACTER:ImbJniNode::evaluate
               Type:CHARACTER:ComIbmXslMqsiNode
               Name:CHARACTER:dynamic#FCMComposite_1_4
               Label:CHARACTER:dynamic.XSL Transform
               Catalog:CHARACTER:BIPmsgs
               Severity:INTEGER:3
               Number:INTEGER:2230
               Text:CHARACTER:Caught exception and rethrowing
               Insert
                     Type:INTEGER:14
                     Text:CHARACTER:dynamic.XSL Transform
               RecoverableException
                     File:CHARACTER:XMLTransformNode.java
                     Line:INTEGER:995
                     Function:CHARACTER:transformData
                     Type:CHARACTER:
                     Name:CHARACTER:
                     Label:CHARACTER:
                     Catalog:CHARACTER:BIPmsgs
                     Severity:INTEGER:3
                     Number:INTEGER:4447
                     Text:CHARACTER:Error during transformation
                     Insert
                           Type:INTEGER:5
                           Text:CHARACTER:XSL Transform
                     Insert
                           Type:INTEGER:5
                           Text:CHARACTER:Transformation failure when processing Stylesheet xslt.xslt
javax.xml.transform.TransformerException: java.lang.RuntimeException: Unsupported XSL element 'http://www.w3.org/1999/XSL/Transform:for-each-group'
   at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:673)
   at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:314)
   at com.ibm.xsl.exmlt.ParseFacilitator.parseXmlStylesheet(ParseFacilitator.java:274)
   at com.ibm.xsl.exmlt.ParseFacilitator.parse(ParseFacilitator.java:216)
   at com.ibm.xsl.exmlt.EnhancedXMLTransform.transformWithStylesheet(EnhancedXMLTransform.java:672)
   at com.ibm.xsl.exmlt.EnhancedXMLTransform.transformDocument(EnhancedXMLTransform.java:627)
   at com.ibm.xsl.mqsi.XMLTransformData.transformData(XMLTransformData.java:555)
   at com.ibm.xsl.mqsi.XMLTransformNode.evaluate(XMLTransformNode.java:965)
   at com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:1480)
Caused by: java.lang.RuntimeException: Unsupported XSL element 'http://www.w3.org/1999/XSL/Transform:for-each-group'
   at org.apache.xalan.xsltc.runtime.BasisLibrary.runTimeError(BasisLibrary.java:1672)
   at org.apache.xalan.xsltc.runtime.BasisLibrary.runTimeError(BasisLibrary.java:1676)
   at org.apache.xalan.xsltc.runtime.BasisLibrary.unsupported_ElementF(BasisLibrary.java:456)
   at xslt.template$dot$0()
   at xslt.applyTemplates()
   at xslt.applyTemplates()
   at xslt.transform()
   at org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:606)
   at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:660)
   .





Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Jan 04, 2017 4:57 am    Post subject: Re: while using xslt,to group by its generating an exceptio Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

sai kumar123 wrote:
Text:CHARACTER:Transformation failure when processing Stylesheet xslt.xslt
javax.xml.transform.TransformerException: java.lang.RuntimeException: Unsupported XSL element 'http://www.w3.org/1999/XSL/Transform:for-each-group'


Seems reasonably clear. The XSLT you are using has operations that are not supported by the IIB XSLT node.

The resolution is to either use a different XSLT that can be supported, or to use a different transformation node.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
sai kumar123
PostPosted: Wed Jan 04, 2017 5:23 am    Post subject: Reply with quote

Novice

Joined: 16 Dec 2016
Posts: 15

ok thank you....but I have used three different ones...all are resulting in same manner...
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jan 04, 2017 5:41 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Why are you using XSLT in IIB anyway? It has much better transformation options.

sai kumar123 wrote:
I have used three different ones


If all 3 XSLT files contain unsupported operations, why are you surprised you're getting the same error?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Jan 04, 2017 11:42 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Vitor wrote:
Why are you using XSLT in IIB anyway? It has much better transformation options.



however there is a school of thought that says,

Do the transformations with XSLT then we can move it all to Java when we get rid of IIB and do everything for free in Java.

XSLT performance in IIB is horrible (goodness) and some of the bodges I've seen to get round the limitations would make any decent architect/developer cringe with embarrasment. Yes, they are in production (shudder).
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jan 05, 2017 5:43 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

smdavies99 wrote:
however there is a school of thought that says,

Do the transformations with XSLT then we can move it all to Java when we get rid of IIB and do everything for free in Java.


After two years of development that hopefully a) supports new business requirements and b) makes it more flexible to support new business requirements in a shorter time.

Which seems much less likely in Java, from my experience...
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
sai kumar123
PostPosted: Thu Jan 05, 2017 8:27 am    Post subject: Reply with quote

Novice

Joined: 16 Dec 2016
Posts: 15

Thank you for your suggestions... but the thing I went for XSLT in IIB is....we can do grouping,sorting and many other tranformations with one stylesheet..
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jan 05, 2017 8:31 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

sai kumar123 wrote:
Thank you for your suggestions... but the thing I went for XSLT in IIB is....we can do grouping,sorting and many other tranformations with one stylesheet..

Did you possibly confuse the level of XSLT available in your version of IIB?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
sai kumar123
PostPosted: Thu Jan 05, 2017 8:33 am    Post subject: Reply with quote

Novice

Joined: 16 Dec 2016
Posts: 15

yes,IIB might not supporting some operations or keywords in XSLT..
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » while using xslt,to group by its generating an exception.
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.