It throws an error (See below).. How completely stupid GRRRRRRRRRR - Can anyone help please.
Error occured
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, 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, TextWriter results)
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)
Is that the _only_ code in your xslt? I would think that it is not the variable assignment itself, but rather the usage of it later on that might create the problem. Could you post the entire xslt file?
LOL... Sorry, please ignore this *Need a symbol for emarrassed here* ... I left some test code in the bottom that was causing the error, ALTHOUGH still completely stupid how it only threw an error when I changed the C to capital!! Damn stupid XSLT :P
Actually my XSLT still isn't working? Could you offer a suggestion - I'm trying to check if the documentType is a certain type, if so write out some HTML
This Is Why I Hate XSLT
Having the most infuriating problem with a Macro - I am trying to check if a page is a Certain DocType
The doc type alias is DirectoryCategory
Now I am trying to put this name in a variable - But it won't let me use a capital C!!! What the heck?? So if I put this
It works fine... But I try to actually put the real alias in like so with a capital C
It throws an error (See below).. How completely stupid GRRRRRRRRRR - Can anyone help please.
Is that the _only_ code in your xslt? I would think that it is not the variable assignment itself, but rather the usage of it later on that might create the problem. Could you post the entire xslt file?
LOL... Sorry, please ignore this *Need a symbol for emarrassed here* ... I left some test code in the bottom that was causing the error, ALTHOUGH still completely stupid how it only threw an error when I changed the C to capital!! Damn stupid XSLT :P
Actually my XSLT still isn't working? Could you offer a suggestion - I'm trying to check if the documentType is a certain type, if so write out some HTML
For some reason its showing for every DocType and its not appending the current node ID at the end of the link {@id} ?? Any ideas??
Well, the complete xslt would help here.
Are you doing this inside a loop?
If you are trying to test it for the page that is currently beign viewed, then you need to change your code to:
if you are trying to test it for the page that your are currently looping through, then you need:
Could you post the complete xslt, or describe a bit more about what you are trying to do?
Awesome you're a legend - thanks!!
P.S:That was all the XSLT above (Apart from the normal stuff you usually get with any XSLT file).
is working on a reply...