Im new to umbraco and xslt, but i have an error coming up with the DAMP picker. My xslt has the following errors, but being new to xslt, i aint sure what it means.
Ive followed the video tutorial from the DAMP site and evertthing seems to be the same.
Im also getting an error displayed within the html
Any help would be great
Thanks
Martin
HTML
Error parsing XSLT file: \xslt\DAMP.xslt
XSLT
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)
<xsl:output method="html" omit-xml-declaration="yes" indent="yes"/> <xsl:param name="currentPage"/> <xsl:template match="/"> <!--In "classic" only 1 id can be stored.--> Classic:<br/><br/> <img src="{umbraco.library:GetMedia($currentPage/classic, 0)/umbracoFile}" height="329px;" /> <br/><br/> <!--In "new" multiple media items can be stored with the full media xml.--> New:<br/><br/> <xsl:for-each select="$currentPage/new/DAMP[@fullMedia]/mediaItem/Image"> <img src="{umbracoFile}" height="329px;"/> <br/> <br/> </xsl:for-each> </xsl:template> </xsl:stylesheet>
<xsl:template match="/">
<!--In "classic" only 1 id can be stored.-->
Classic:<br/><br/>
<xsl:apply-templates select="$currentPage/classic[normalize-space()]" />
<br/><br/>
<!--In "new" multiple media items can be stored with the full media xml.-->
New:<br/><br/>
<xsl:for-each select="$currentPage/new/DAMP[@fullMedia]/mediaItem/Image">
<img src="{umbracoFile}" height="329px;"/>
<br/>
<br/>
</xsl:for-each>
</xsl:template>
<xsl:template match="classic">
<img src="{umbraco.library:GetMedia(classic, 0)/umbracoFile}" height="329px;" />
</xsl:template>
This way GetMedia is only called if classic has any data.
<xsl:templatematch="/"> <!--In "classic" only 1 id can be stored.--> Classic:<br/><br/> <xsl:apply-templatesselect="$currentPage/classic[normalize-space()]"/> <br/><br/> <!--In "new" multiple media items can be stored with the full media xml.--> New:<br/><br/> <xsl:for-eachselect="$currentPage/new/DAMP[@fullMedia]/mediaItem/Image"> <imgsrc="{umbracoFile}"height="329px;"/> <br/> <br/> </xsl:for-each> </xsl:template>
It doesn't embed quicktime movies out of the box, but with DAMP you can select a file from the media section which stores the movie. Than in xslt you can get the path to that movie, but you'll need to build your own player to load the movie into. DAMP is a media picker, but like other media pickers from Umbraco it just let's you select stuff. The rest you need to do yourself.
DAMP Media Picker
Hi all,
Im new to umbraco and xslt, but i have an error coming up with the DAMP picker.
My xslt has the following errors, but being new to xslt, i aint sure what it means.
Ive followed the video tutorial from the DAMP site and evertthing seems to be the same.
Im also getting an error displayed within the html
Any help would be great
Thanks
Martin
HTML
Error parsing XSLT file: \xslt\DAMP.xslt
XSLT
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)
Try doing like this instead
<xsl:template match="/"> <!--In "classic" only 1 id can be stored.--> Classic:<br/><br/> <xsl:apply-templates select="$currentPage/classic[normalize-space()]" /> <br/><br/> <!--In "new" multiple media items can be stored with the full media xml.--> New:<br/><br/> <xsl:for-each select="$currentPage/new/DAMP[@fullMedia]/mediaItem/Image"> <img src="{umbracoFile}" height="329px;"/> <br/> <br/> </xsl:for-each> </xsl:template> <xsl:template match="classic"> <img src="{umbraco.library:GetMedia(classic, 0)/umbracoFile}" height="329px;" /> </xsl:template>
This way GetMedia is only called if classic has any data.
Sorry ... like this:
<xsl:template match="/">
<!--In "classic" only 1 id can be stored.-->
Classic:<br/><br/>
<xsl:apply-templates select="$currentPage/classic[normalize-space()]" />
<br/><br/>
<!--In "new" multiple media items can be stored with the full media xml.-->
New:<br/><br/>
<xsl:for-each select="$currentPage/new/DAMP[@fullMedia]/mediaItem/Image">
<img src="{umbracoFile}" height="329px;"/>
<br/>
<br/>
</xsl:for-each>
</xsl:template>
<xsl:template match="classic">
<img src="{umbraco.library:GetMedia(., 0)/umbracoFile}" height="329px;" />
</xsl:template>
Thanks Sebastian,
That's solved it.
I was refered to the DAMP picker from another forum post.
I was looking to embed quicktime .mov files & im not too sure if it does.
Can anyone clarify if they have embedded a .mov with DAMP
Thanks
It doesn't embed quicktime movies out of the box, but with DAMP you can select a file from the media section which stores the movie. Than in xslt you can get the path to that movie, but you'll need to build your own player to load the movie into. DAMP is a media picker, but like other media pickers from Umbraco it just let's you select stuff. The rest you need to do yourself.
Jeroen
You could try this one: http://videojs.com/
Remember to pick a solution ... :)
Perhaps this is the package that you might need instead of DAMP: http://our.umbraco.org/projects/website-utilities/html5-video
Jeroen
is working on a reply...