Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Debug help

From: KevinBurton@-----------.---------.---
To: NULL
Date: 8/1/2008 11:33:00 AM

Through trial and error I think I have narrowed down the problem to the 
following:

Not Merchandised Errors - <xsl:value-of 
select="count(/Envelope/Message[(MessageID = $MessageTestList/root/list/item) 
and 
(bsi:MerchandisedProduct($CatalogConnectionString,Relationship/Relation/SKU))])"/>

May assumption is that

Relationship/Relation/SKU

in the context about is passed to my custom XSL function as a single node. 
Perhaps that assumption is in error. So now this is a query question. The 
format of the XML document looks like:

<Envelope>
  <Message>
    <MessageId>1234</MessageId>
    <Relationship>
         <Relation>
             <SKU>5678</SKU>
         </Relation>
    </Relationship>
  </Message>
</Envelope>

I want to make sure that the MessageID is in the first list (that is an 
XPath expression). Now I want to make sure that each SKU that is a sub set of 
the nodes that match the first XPath to be passed to the custom function. 

Is that confusing enough?

Kevin
"Kevin Burton" wrote:

> I have a transform that works on a large number of files. Every once and a 
> while I get the following exception thrown:
> 
> A first chance exception of type 'System.Xml.Xsl.XslTransformException' 
> occurred in System.Data.SqlXml.dll
> System.Xml.Xsl.XslTransformException: Cannot convert a node-set which 
> contains zero nodes or more than one node to a single node.
>    at System.Xml.Xsl.Runtime.XsltConvert.ToNode(IList`1 listItems)
>    at <xsl:template match="/">(XmlQueryRuntime 
> {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator 
> {urn:schemas-microsoft-com:xslt-debug}current)
>    at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
>    at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
>    at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, 
> XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter 
> results)
>    at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, 
> XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer, 
> Boolean closeWriter)
>    at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, 
> XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results)
>    at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, 
> XmlResolver dataSources, XsltArgumentList argumentList, Stream results)
>    at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, 
> XsltArgumentList arguments, Stream results)
> 
> 
> Any hints on how I might be able to isolate the input that is causing the 
> problem and maybe the line(s) in the stylesheet that are involved?
> 
> Thank you.
> 
> Kevin
> 


transparent
Print
Mail
Like It
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.

.
.

transparent

transparent