Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Debug help >Thread Next - RE: Debug help RE: Debug helpTo: 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
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
