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 member1(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) at
System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input,
XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver)
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)
But after i mark the "Skip testing (ignore errors)" checkbox. I can save it and i get following output:
accessing member details
I have a document property named "articleAuthor" mapped to type "Member Picker".
Now i want to access member details thru xslt.
Using below code i just get the member id. How can i get further details like loginname, email and other custom fields associated with that user.
<xsl:variable name="propertyAlias" select="string('articleAuthor')"/>
<xsl:variable name="memberno" select="$currentPage/* [name() = $propertyAlias]"/>
following is not working for me:
Hi Pinal
what do you get returned if you make a xsl:copy-of on your $member1 variable?
like...
<textarea>
<xsl:copy-of select="$member1" />
</textarea>
/Jan
First of all, Thanks Jan for the reply.
I am getting following error while saving following code:
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 member1(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)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver)
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)
But after i mark the "Skip testing (ignore errors)" checkbox. I can save it and i get following output:
<node id="1124" version="19bef398-11a1-45ce-b95a-b774c082bf39" parentID="-1" level="1" writerID="0" nodeType="1123" template="0" sortOrder="60" createDate="2010-11-21T07:41:46" updateDate="2010-11-21T07:41:46" nodeName="Pinal Bhatt (Author)" urlName="pinalbhatt(author)" writerName="Administrator" nodeTypeAlias="ContentWriter" path="-1,1124" loginName="pinalbhattauthor" email="[email protected]"><authorsName>Pinal Bhatt</authorsName><authorsEmail>[email protected]</authorsEmail><authorsWebsiteUrl>http:/www.P-Bhatt.com</authorsWebsiteUrl><authorsPicUrl /></node>
Which is very much valid and expected output. Now how can i get individual piece of data from this?
Thanks & Regards
Pinal Bhatt
Hi Pinal
you're welcome, that's what we're here for, right? :-)
Now you should be able to fetch the data you want by getting the content from the <authorsName> and <authorsEmail> elements...
You can do that by writing
Name: <xsl:value-of select="$member1/authorName" /><br />
E-mail: <xsl:value-of select="$member1/authoerEmail" />
This should work.
/Jan
Nops.. sorry but thats not working: ( you can have a look at http://pbdesk.com/tech-news-articles/articles/umbraco/test-article.aspx )
Following is the xslt code:
<textarea>
<xsl:copy-of select="$member1" />
</textarea>
Name: <xsl:value-of select="$member1/authorsName" /><br />
E-mail: <xsl:value-of select="$member1/authorsEmail" />
Putting // works.
All of these works:
Name: <xsl:value-of select="$member1//authorsName" /><br />
E-mail: <xsl:value-of select="$member1/node/authorsEmail" /><br/>
Excellent, helped me out too!
Why do you need the double slash?
Anyone knows?
is working on a reply...