RE: Transformation Problem

Larry Trammell <[email protected]>
Newsgroups gmane.text.xml.xalan.java.user
Message-ID <[email protected]>
Are you getting a valid XML document, or did your example accidentally drop
some lines? I don't see any terminations for 
   <SOAP-ENV:Body> 
or
  <ns:getReportResponse   xmlns:ns="http://www.companyName.com/company/">.


-----Original Message-----
From: NOEL ALEX MAKUMULI [mailto:[email protected]]
Sent: Tuesday, April 28, 2009 1:29 PM
To: [email protected]
Subject: Transformation Problem


Hello
I am kind of new on working with XML and XSL transformation..
however i have worked with XSL transformation for a short time only..

i have a small problem which i am facing and i do not really understand what
is causing although i think the problem has something to do with the
namespace..

i try to transform a SOAP_Message XML file to a normal XML file and i can
get the values below the Header..meaning inside the the body element...

my XSL transformation looks like below...
<xsl:template match="/">
<Root>
<xsl:value-of select="SOAP-ENV:Envelope/soapenv:Header/cmn:timeStamp"/>
<xsl:value-of
select="SOAP-ENV:Envelope/soapenv:Header/ns:getReportResponse/response/compa
nyResponse/responseHeader/cmn:languageCode" />
<xsl:value-of
select="SOAP-ENV:Envelope/soapenv:Header/ns:getReportResponse/response/compa
nyResponse/responseHeader/cmn:responseStatus" />
</Root>

the timeStamp can be retrieved easily but however the field responseStatus
can not be retrieved..i get an empty element..

can someone please tell me what i am doing wrong??

i have tried to search for a nice reason and people have just hinted the
namespace issue and i have not managed to clear reason like what is the
cause exactly...

my sample XML message is below::
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<cmn:timeStamp
xmlns:cmn="http://www.companyName.com/XMLSchema/compMain.xsd">123445+0001</c
mn:timeStamp>
</soapenv:Header>
<SOAP-ENV:Body>
<ns:getReportResponse xmlns:ns="http://www.companyName.com/company/">
<response xmlns:fs="http://www.companyName.com/XMLSchema/Company_4.xsd"
xmlns:cmn="http://www.companyName.com/XMLSchema/compMain.xsd"
xmlns:pr="http://www.companyName.com/XMLSchema/details.xsd"
xmlns="http://www.companyName.com/XMLSchema/compMain3.xsd"
xsi:SchemaLocation="http://www.companyName.com/XMLSchema/compMain3.xsd">
<companyResponse>
<responseHeader>
<cmn:languageCode
xmlns:cmn="http://www.companyName.com/XMLSchema/compMain.xsd">com</cmn:langu
ageCode>
<cmn:state
xmlns:cmn="http://www.companyName.com/XMLSchema/compMain.xsd">1</cmn:state>
</responseHeader>
</companyResponse>
</response>

thanks for help in advance
proby



check out the rest of the Windows Live(tm). More than mail-Windows Live(tm)
goes way beyond your inbox. More than messages
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.