Here is my XSLT and this works for all of my node when I Virsualize XSLT except for one and gives me this error:
Please help driving me crazy
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 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)
Hmmmmm...i looked over your XSLT and can't seem to find anything. If it is just happening for one node, i would try to figure why that node is different (is it different in the heirachy, or possibly some of its properties). For example maybe the featuredSpeakers is empty on that one node and it is giving the error at maybe this when it tries to split it: <xsl:variable name="speakers" select="umbraco.library:Split($featuredSpeakers, ',')" /> and you want to check to make sure that featuredSpeakers is not empty before splitting it and putting it into the variable speakers.
Error parsing the XSLT
Umbraco 4.0.1
ASP.NET 2.0
Windows 2008 and IIS7
Here is my XSLT and this works for all of my node when I Virsualize XSLT except for one and gives me this error:
Please help driving me crazy
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 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)
MY XSLT:
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
exclude-result-prefixes="msxsl msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:variable name="featuredSpeakers" select="$currentPage/data [@alias = 'TopicFeaturedSpeakers']"/>
<xsl:variable name="speakers" select="umbraco.library:Split($featuredSpeakers, ',')" />
<xsl:template match="/">
<xsl:choose>
<xsl:when test="count($speakers/value) > 0 and $speakers/value != ''">
<xsl:for-each select="$speakers/value">
<xsl:if test="string(.) != ''">
<xsl:variable name="speaker" select="umbraco.library:GetXmlNodeById(.)"/>
<xsl:variable name="p" select="position()"/>
<xsl:choose>
<xsl:when test="$p = 1">
<a class="featured_speaker" href="{umbraco.library:NiceUrl($speaker/@id)}">
<xsl:call-template name="teaser">
<xsl:with-param name="speaker" select="$speaker"/>
</xsl:call-template>
</a>
</xsl:when>
<xsl:otherwise>
<a class="featured_speaker" style="display:none" href="{umbraco.library:NiceUrl($speaker/@id)}">
<xsl:call-template name="teaser">
<xsl:with-param name="speaker" select="$speaker"/>
</xsl:call-template>
</a>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="speakers" select="$currentPage/ancestor-or-self::root//node[@nodeTypeAlias='Speaker']"/>
<xsl:for-each select="$speakers">
<xsl:variable name="speaker" select="current()"/>
<xsl:variable name="relTopics" select="$speaker/data [@alias = 'Topics']"/>
<xsl:variable name="topics" select="umbraco.library:Split($relTopics, ',')" />
<xsl:for-each select="$topics/value">
<xsl:if test="$currentPage/@id = .">
<a class="featured_speaker" style="display:none" href="{umbraco.library:NiceUrl($speaker/@id)}">
<xsl:call-template name="teaser">
<xsl:with-param name="speaker" select="$speaker"/>
</xsl:call-template>
</a>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="teaser">
<xsl:param name="speaker"/>
<div class="speaker_img"><img src="{$speaker/data [@alias = 'SpeakerPhoto']}" class="photo"/></div>
<div class="intro">
<h3 title="{$speaker/data [@alias = 'speakerFirst']} {$speaker/data [@alias = 'speakerLast']}"> <xsl:value-of select="$speaker/data [@alias = 'speakerFirst']"/> <xsl:value-of select="$speaker/data [@alias = 'speakerLast']"/> </h3>
<xsl:variable name="bio" select="$speaker/descendant::node[@nodeTypeAlias = 'Speaker Bio']"/>
<xsl:value-of select="$bio/data [@alias = 'speakerBioTeaser']" disable-output-escaping="yes"/> </div>
<span class="btn"><img src="/images/pixel.gif"/></span>
<div class="clear"><img src="/images/pixel.gif"/></div>
</xsl:template>
</xsl:stylesheet>
Gerald
Hmmmmm...i looked over your XSLT and can't seem to find anything. If it is just happening for one node, i would try to figure why that node is different (is it different in the heirachy, or possibly some of its properties). For example maybe the featuredSpeakers is empty on that one node and it is giving the error at maybe this when it tries to split it: <xsl:variable name="speakers" select="umbraco.library:Split($featuredSpeakers, ',')" /> and you want to check to make sure that featuredSpeakers is not empty before splitting it and putting it into the variable speakers.
It was data error. One of the node was not published and thats why it was giving the error....Thanks
is working on a reply...