Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7696625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:49:26+00:00 2026-05-31T21:49:26+00:00

<?xml version=1.0 encoding=UTF-8?> <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp &#x00A0;> ]> <xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform xmlns:msxml=urn:schemas-microsoft-com:xslt

  • 0
    <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:msxml="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="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="MediaNodeId" select="./@id"/>
<!-- Input the documenttype you want here -->
<xsl:variable name="level" select="1"/>

<xsl:template match="/">

<!-- The fun starts here -->
<ul class=" menu nav">
<xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']">
  <li>
    <a href="{umbraco.library:NiceUrl(@id)}">
      <xsl:value-of select="@nodeName"/>
    </a>
    <xsl:if test="count(./child::*[@isDoc and string(umbracoNaviHide) != '1']) &gt; 0">
      <ul>
        <xsl:for-each select="./child::*[@isDoc and string(umbracoNaviHide) != '1']">
          <li>
            <xsl:choose>

                <xsl:when test="name()= 'Link' ">

                <xsl:if test="linkUrl!=''">
                   <a href="{umbraco.library:GetMedia(linkUrl, 0)/umbracoFile}" target="_blank">
                     <xsl:value-of select="@nodeName"/></a>
              </xsl:if>
                </xsl:when>         

               <xsl:otherwise>
                <a href="{umbraco.library:NiceUrl(@id)}">
                <xsl:value-of select="@nodeName"/></a>
              </xsl:otherwise>

           </xsl:choose>   

             <xsl:if test="count(./child::*[@isDoc and string(umbracoNaviHide) != '2']) &gt; 0">
      <ul>
        <xsl:for-each select="./child::*[@isDoc and string(umbracoNaviHide) != '2']">
          <li>
            <a href="{umbraco.library:NiceUrl(@id)}">
              <xsl:value-of select="@nodeName"/>
            </a>
          </li>
        </xsl:for-each>
      </ul>  
    </xsl:if>
          </li>
        </xsl:for-each>
      </ul>  
    </xsl:if>
  </li>
</xsl:for-each>
</ul>
<div id="jflanguageselection"><div class="rawimages"><span id="active_language"><a href="http://www.hooymans-duivensport.nl/nl"><img src="/images/nl.gif" alt="Nederlands (NL-nl)" title="Nederlands (NL-nl)" /></a></span><span><a href="http://www.hooymans-duivensport.nl/en"><img src="/images/en.gif" alt="English (United Kingdom)" title="English (United Kingdom)" /></a></span></div></div>
</xsl:template>

</xsl:stylesheet>

I need to make a link in the menu on the pdf file I get this error.

Error occured

System.OverflowException: Value was either too large or too small for an Int32.
at System.Convert.ToInt32(Double value)
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 System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:49:27+00:00Added an answer on May 31, 2026 at 9:49 pm

    This error is common in Umbraco upon XSLT parsing as the parser assumes that some of your data may be null/empty, when in reality it may be [always] assigned.

    The trick is find the culprit line of code and enclose it a test-for-empty-if-block.

    For example, it may or may not be this line, although it quite commonly occurs with @id and NiceUrl():

    <xsl:otherwise>
        <xsl:if test="@id != ''">
            <a href="{umbraco.library:NiceUrl(@id)}">
                <xsl:value-of select="@nodeName"/>
            </a>
        </xsl:if>
    </xsl:otherwise>
    

    The error is likely to arise from the GetMedia()1 or NiceUrl()2 calls as they require a parameter of type Int32 to be passed, but I can see you’ve already enclosed your GetMedia() call in an if-block.

    1 http://our.umbraco.org/forum/developers/xslt/30131-Loading-Xslt-Value-was-either-too-large-or-too-small-for-an-Int32-

    2 http://our.umbraco.org/forum/developers/xslt/3102-Using-niceurl-Value-was-either-too-large-or-too-small-for-an-Int32-

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<?xml version=1.0 encoding=UTF-8 standalone=no?> <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd> <html xmlns=http://www.w3.org/1999/xhtml> <head>
I have the following simple XSL style sheet: <?xml version=1.0 encoding=windows-1252?> <xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform xmlns=http://www.w3.org/1999/xhtml
I have document <?xml version=1.0 encoding=utf-8 ?> <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd>
I have this html doc: <?xml version=1.0 encoding=utf-8?><!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd>
I have some XML files of this form: <?xml version=1.0 encoding=utf-8?> <?xml-stylesheet type=text/xsl href=biomirror.xsl?>
Here's my glassfish-resources.xml: <?xml version=1.0 encoding=UTF-8?> <!DOCTYPE resources PUBLIC -//GlassFish.org//DTD GlassFish Application Server 3.1
Something's screwy here. I'm trying to parse this XSL file: <?xml version=1.0 encoding=utf-8?> <xsl:stylesheet
What is wrong with my JavaScript? <?xml version = 1.0 encoding =utf-8?> <!DOCTYPE html
I have an XML file that looks like <?xml version='1.0' encoding='UTF-8'?> <root> <node name=foo1
I am trying to parse the following XML with javascript: <?xml version='1.0' encoding='UTF-8'?> <ResultSet>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.