Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Brendan Rice 372 posts 608 karma points
    Jul 15, 2010 @ 12:49
    Brendan Rice
    0

    XSLT Convert Error

    I get the following error when I try to visualise the XSLT pointed at one or two specific nodes, other nodes work.

    Any idea what might be going on here?

    Thanks in advance,

    B

     

    Error parsing the XSLT:

    System.OverflowException: Value was either too large or too small for an Int32. at System.Convert.ToInt32(Double value) at System.Double.System.IConvertible.ToInt32(IFormatProvider provider) at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at System.Xml.Xsl.Runtime.XmlQueryRuntime.ChangeTypeXsltArgument(XmlQueryType xmlType, Object value, Type destinationType) at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args) at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) 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, TextWriter results) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results) at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters) at umbraco.presentation.umbraco.developer.Xslt.xsltVisualize.visualizeDo_Click(Object sender, EventArgs e)

  • David Conlisk 432 posts 1008 karma points
    Jul 15, 2010 @ 15:51
    David Conlisk
    0

    Is your XSLT using the number() function? This could be a data issue, where something non-numeric is fed to the number() function, or something similar. The fact that it's only on a couple of specific nodes would tie in with this. I'd suggest checking those nodes for empty fields or weird data.

  • Warren Buckley 2089 posts 4578 karma points MVP ∞ admin hq c-trib
    Jul 15, 2010 @ 16:08
    Warren Buckley
    0

    That type of error is normally related to that you have not checked that if a certain variable/property is not empty

    So just add a simple <xsl:if> statement around the code that is causing the problem.

    <xsl:if test="$currentPage/myProperty !=''">
    <!-- Now perform code using the myProperty value -->
    </xsl:if>

    If this is not the problem can you post a copy fo your XSLT file on here please, so that we can help you out.

    Warren :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies