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 » XML trasnformation giving Strange Errors

Post new topic  Reply to topic
 XML trasnformation giving Strange Errors « View previous topic :: View next topic » 
Author Message
ravi_ishere
PostPosted: Thu Feb 07, 2008 11:58 pm    Post subject: XML trasnformation giving Strange Errors Reply with quote

Apprentice

Joined: 20 Jan 2008
Posts: 29

Hi All,

Here i am facing the strange error when i am adding the xslt instructions to body for XML Transformation. But i am getting below Errors. I am using XMLNSC domian from start to end and not using XML. Can anyone help me ti resolve it.




Message
Properties
MQMD
XMLNSC
XmlDeclaration
CHARACTER xml-stylesheet = type="text/xml" href="#Testid"
Envelope
CHARACTER soapenv = http://schemas.xmlsoap.org/soap/envelope/
CHARACTER web = http://test.test.test/schema/webservice
CHARACTER arr = http://test.test.test/schema/trans/servicenamet
CHARACTER xsl = http://www.w3.org/1999/XSL/Transform
Header
Body
CHARACTER Id = Body-6d6012b1-c7a8-425f-b3e8-cfcf082a823d
CHARACTER wsu = http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
ArrestReportDocument
stylesheet
CHARACTER id = Testid
CHARACTER version = 1.0
CHARACTER soapenv = http://schemas.xmlsoap.org/soap/envelope/
CHARACTER arr = http://test.test.test/schema/trans/servicename
CHARACTER xsl = http://www.w3.org/1999/XSL/Transform
template

ExceptionList
RecoverableException
CHARACTER File = F:\\build\\S600_P\\src\\DataFlowEngine\\ImbDataFlowNode.cpp
INTEGER Line = 616
CHARACTER Function = ImbDataFlowNode::createExceptionList
CHARACTER Type = ComIbmJniNode
CHARACTER Name = xxxxx/xxxxxxx#FCMComposite_1_15.Validation/Validation#FCMComposite_1_6.Validation/Sub_Validation#FCMComposite_1_9.Validation/XSLT_VALIDATION#FCMComposite_1_1
CHARACTER Label = xxx.xxxxx.xxxxxxx.qwe.SF.cccccc.qwe.SF.XSLT_VALIDATION.XMLTransformation
CHARACTER Catalog = BIPv600
INTEGER Severity = 3
INTEGER Number = 2230
CHARACTER Text = Node throwing exception
RecoverableException
CHARACTER File = XMLTransformNode.java
INTEGER Line = 998
CHARACTER Function = transformData
CHARACTER Type =
CHARACTER Name =
CHARACTER Label =
CHARACTER Catalog = BIPv600
INTEGER Severity = 3
INTEGER Number = 4447
CHARACTER Text = Error during transformation
Insert
Insert
INTEGER Type = 5
CHARACTER Text = Transformation failure when processing Stylesheet #Testid\r\n\r\n; Line#: 5; Column#: 2383\r\njavax.xml.transform.TransformerException: The prefix "xmlns" cannot be bound to any namespace explicitly; neither can the namespace for "xmlns" be bound to any prefix explicitly.\r\n\tat org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerImpl.java:808)\r\n\tat org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:785)\r\n\tat org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1251)\r\n\tat org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1229)\r\n\tat com.ibm.xsl.exmlt.ParseFacilitator.parseXmlStylesheet(ParseFacilitator.java:676)\r\n\tat com.ibm.xsl.exmlt.ParseFacilitator.parse(ParseFacilitator.java:253)\r\n\tat com.ibm.xsl.exmlt.EnhancedXMLTransform.transformWithStylesheet(EnhancedXMLTransform.java:773)\r\n\tat com.ibm.xsl.exmlt.EnhancedXMLTransform.transformDocument(EnhancedXMLTransform.java:706)\r\n\tat com.ibm.xsl.mqsi.XMLTransformData.transformData(XMLTransformData.java:838)\r\n\tat com.ibm.xsl.mqsi.XMLTransformNode.evaluate(XMLTransformNode.java:942)\r\n\tat com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:1298)\r\n





Thanks
R
Back to top
View user's profile Send private message
AJStar
PostPosted: Fri Feb 08, 2008 12:40 am    Post subject: Reply with quote

Acolyte

Joined: 27 Jun 2007
Posts: 64

Looks like there could be some problem with the XSL. Make sure all the namespaces are defined correctly in the XSL. Please see below a sample XSL. Both input and output are XMLNS messages.

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:S7="http://cap.nat.com/xsd/Diagnostics/2007/08/10" xmlns:n2="urn:com.Product2-v6-0" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="n2 xs xsi xsl" xmlns="http://cap.nat.com/xsd/Diagnostics/2007/08/10">
<xsl:namespace-alias stylesheet-prefix="S7" result-prefix="S7"/>
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<xsl:template match="/n2:InputMessageRootElement">
<S7:OutputMessageRootElement>

******** actual transformation ************

</S7:OutputMessageRootElement>
</xsl:template>
</xsl:stylesheet>
_________________
Regards
AJ


Last edited by AJStar on Fri Feb 08, 2008 1:08 am; edited 1 time in total
Back to top
View user's profile Send private message
ravi_ishere
PostPosted: Fri Feb 08, 2008 1:08 am    Post subject: Reply with quote

Apprentice

Joined: 20 Jan 2008
Posts: 29

Hi i have checked the xsl file it is almost look like the sample xsl file provided. The problem is occuring when adding the style sheet dynamically to the Body for transformation. it is adding the correctly to the body and giving the above results. I observed all the peopple in the forum facing the sema problem.

Thanks
R
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Feb 08, 2008 1:36 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

This is valid XML:
Code:
<ns1:element xmlns:ns1="http://myNamespaceURU"/>


This is not valid XML:
Code:
<xmlns:element xmlns:xmlns="http://myNamespaceURU"/>


This is not valid XML:
Code:
<ns1:element xmlns:ns1="xmlns"/>


Your stylesheet appears to be either
a) binding some namespace URI to prefix 'xmlns' or
b) binding some prefix to the URI 'xmlns'
Back to top
View user's profile Send private message
ravi_ishere
PostPosted: Fri Feb 08, 2008 2:23 am    Post subject: Reply with quote

Apprentice

Joined: 20 Jan 2008
Posts: 29

Style sheet is same thing like:

<ns1:element xmlns:ns1="http://myNamespaceURU"/>

Thanks,
R
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 » XML trasnformation giving Strange Errors
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.