Error parsing XSLT file but it's working in another website
Hi,
I am trying to reuse some code from an existing website and put it in another website as, essentially, I am after the same thing. It is basically an image slider as seen here... AGA Living
The XSLT works fine in this site but in the new site I have copied the macro, copied the .js file and recreated the document type but it is still giving me an error. Is there something I'm missing?
and although I am no longer getting an error it is not displaying all of my media items and I can't figure out why. I have checked that all the alias's are correct.
The test page for the image slider is here... Test Page but it should look like this... Working Example
My full code is below... any suggestions as to where I am going wrong would be much appreciated :)
This is the error I'm getting in the xslt visualizer...
Error parsing the XSLT:
System.Xml.Xsl.XslLoadException: The variable or parameter 'media1' is either not defined or it is out of scope. An error occurred at (17,1). at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver) at System.Xml.Xsl.XslCompiledTransform.Load(XmlReader stylesheet, XsltSettings settings, XmlResolver stylesheetResolver) at umbraco.macro.CreateXsltTransform(XmlTextReader xslReader, Boolean debugMode) at umbraco.presentation.umbraco.developer.Xslt.xsltVisualize.visualizeDo_Click(Object sender, EventArgs e)
Error parsing XSLT file but it's working in another website
Hi,
I am trying to reuse some code from an existing website and put it in another website as, essentially, I am after the same thing. It is basically an image slider as seen here... AGA Living
The XSLT works fine in this site but in the new site I have copied the macro, copied the .js file and recreated the document type but it is still giving me an error. Is there something I'm missing?
I have tried disecting the code but the error appears with just a single line,..
Thanks,
Rach
Hey Rach,
If you tick the 'Skip Testing' checkbox does the code still work?
To get rid of the errors you might need to change these lines to
To
Rich
Hi Rich,
I have to tick the 'Skip Testing' checkbox to actually be able to save the code but then I still get the error message :(
Thanks,
Rach
Hi,
I have fixed the error by changing
to
and although I am no longer getting an error it is not displaying all of my media items and I can't figure out why. I have checked that all the alias's are correct.
The test page for the image slider is here... Test Page but it should look like this... Working Example
My full code is below... any suggestions as to where I am going wrong would be much appreciated :)
Thanks,
Rachel
Rachel,
It seems your problems are stemming from the fact that your Umbraco versions are different.
This code is from Umbraco > 4.5
This code is for a < 4.5 version of umbraco
(Unless one site has useLegacyXML set to true)
Is it the same website, or different?
Rich
Hi,
It's a different website and they are on different versions of Umbraco.
I think the main problem is that the images within the if statements are not displaying eg...
So I think there is an issue with $media1 > 0
:(
Thanks,
Rachel
This is the error I'm getting in the xslt visualizer...
Error parsing the XSLT:
System.Xml.Xsl.XslLoadException: The variable or parameter 'media1' is either not defined or it is out of scope. An error occurred at (17,1). at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver) at System.Xml.Xsl.XslCompiledTransform.Load(XmlReader stylesheet, XsltSettings settings, XmlResolver stylesheetResolver) at umbraco.macro.CreateXsltTransform(XmlTextReader xslReader, Boolean debugMode) at umbraco.presentation.umbraco.developer.Xslt.xsltVisualize.visualizeDo_Click(Object sender, EventArgs e)
But surely it's defined as a variable here...
Thanks, Rachel
I know this post is old and didn't know if you had found anything yet.
Try adding /umbracoFile after your ]
Also saw that your xsl if statement has no space between the "iftest=" should be "if test="
Did you find a solution?
is working on a reply...