Altova Mailing List Archives


Re: [xsl] The data at the root level is invalid+xslt

From: David Carlisle <davidc@---.--.-->
To: xsl-list@-----.------------.---
Date: 2/22/2012 12:41:00 AM
On 21/02/2012 22:49, ram wrote:
> Guys, Without compilation and running the program, how can i say
> that there is problem with my xsl, Rather than arguing the syntax
> errors you can look at the real problem too

As Michael said, how can we know what the real problem is if the code
you post clearly isn't generating the error message that you give
(since the original version would not have run at all and this version
runs without error producing the result below on your given input)


 > (I know its not job of yours and
> your experts and helping hands for new guys.) I have corrected the
> request and code multiple times and round and round coming to the
> same point syntax problem blah blah.

You seem to be trivialising the fact that we pointed out that the code
you posted was incapable of producing any output?



Your corrected stylesheet produces this result on the posted xml
(using saxon6 as a reference xslt 1 implementation)

<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:tri="http://abc.com/WebServices.Common" 
xmlns:ns="http://abc.com/Case/471" xmlns:con="http://xyz.com/eb/context" 
xmlns:head="http://xyz.com/eb/header">
     <soapenv:Header><ActivityId 
xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics" 
CorrelationId="">?</ActivityId><wsse:Security 
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:UsernameToken><wsse:Username/><wsse:Password>1</wsse:Password></wsse:UsernameToken></wsse:Security></soapenv:Header>
     <soapenv:Body>
         <ns:Search>
             <ns:request>
                 <tri:SessionId>?</tri:SessionId>
                 <ns:Member>
                     <ns:MemberId>?</ns:MemberId>
                     <ns:SystemId>?</ns:SystemId>
                 </ns:Member>
                 <ns:Pagination>
                     <ns:CurrentPageNumber>?</ns:CurrentPageNumber>
                   </ns:Pagination>

             </ns:request>
         </ns:Search>
     </soapenv:Body>
</soapenv:Envelope>




which is well formed XML but without any schema or dtd reference
so the following message is to be expected, and not necessarily
an error:

> When i do the validation
> for the generated xml in xmlspy i got the following error.
>
>
> Unable to locate a reference to a supported schema type (DTD, W3C
> Schema) within this document instance.

On the other hand this is clearly an error:


 > The error that I am getting when i hit the backend service provider
 > is
 >
 > <s:Body><s:Fault><faultcode
 >
xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:DeserializationFailed</faultcode><faultstring
 > xml:lang="en-US">The formatter threw an exception while trying to
 > deserialize the message: Error in deserializing body of request
 > message for operation 'Search'. The data at the root level is
 > invalid. Line 69, position 4.</faultstring


but presumably related to the details of the way you are calling your 
stylesheet which we don't know (and is probably more related to the 
programing language used in your calling framework than xslt) since the 
xslt runs without error when applied directly.

David





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@l...>
--~--

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.