<!-- *|IFNOT:ARCHIVE_PAGE|* -->Hi *|FNAME|* this email was sent to *|EMAIL|*. Having trouble viewing it? <a href="*|ARCHIVE|*" class="adminText">View the online version in your web browser</a>.<!-- *|END:IF|* -->
Are you getting the error on save, visualize, or when running the macro?
Couple of things spring instantly to mind, although not immediately connected to the error;
1. I assume that as it's called "Common.xslt" the file you are including should probably not be a problem, but I seem to remember I have had problems with included files using relative paths like that working on the site but not in Visualize or vice versa, which is why I asked where you are getting the error.
2. I notice this: <!-- *|IFNOT:ARCHIVE_PAGE|* --> - I assume this is a command for your mail template - as stands, I'm pretty sure it will not appear in your output HTML, as the XSLT process or will treat it as a comment on the stylesheet - you want <xsl:comment>*|IFNOT:ARCHIVE_PAGE|*</xsl:comment> to generate comments that appear in the output.
Can't see any compile errors straight off if it's not the include issue, however.
Thestatement and various other places use attribute commands which is a bit more readable, but you could shrink that down too with the curly brackets syntax unless I am missing something?
Oh my GOD, I HATE THIS EDITOR. "Thestatement" should be "the xsl:otherwise statement". I'd edit the above post again but it loases the code every time I do that and I just want to get on with my life now.
P.S. Actually, another thing that can give these generic messages is failures on external library calls, so might be worth checking you are both passing in and getting out what you expect to your Foodstuffs library.
Error loading XSLT
Hi,
Still learning stuff from Umbraco.
I'm getting this error on my xslt email template macro.
Error loading XSLT Newsletters/WeeklySpecials2.xslt
XSLT compile error.
at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader, Boolean include)
at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(Uri uri, Boolean include)
at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader, Boolean include)
at System.Xml.Xsl.Xslt.XsltLoader.Load(Compiler compiler, Object stylesheet, XmlResolver xmlResolver)
at System.Xml.Xsl.Xslt.Compiler.Compile(Object stylesheet, XmlResolver xmlResolver, QilExpression& qil)
at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
at umbraco.macro.CreateXsltTransform(XmlTextReader xslReader, Boolean debugMode)
at umbraco.macro.getXslt(String XsltFile)
at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)
Can someone explain what's causing this issue?
Thanks
Not without seeing the source, no :o)
Hi,
This is the code that I got at the moment
Are you getting the error on save, visualize, or when running the macro?
Couple of things spring instantly to mind, although not immediately connected to the error;
1. I assume that as it's called "Common.xslt" the file you are including should probably not be a problem, but I seem to remember I have had problems with included files using relative paths like that working on the site but not in Visualize or vice versa, which is why I asked where you are getting the error.
2. I notice this: <!-- *|IFNOT:ARCHIVE_PAGE|* --> - I assume this is a command for your mail template - as stands, I'm pretty sure it will not appear in your output HTML, as the XSLT process or will treat it as a comment on the stylesheet - you want <xsl:comment>*|IFNOT:ARCHIVE_PAGE|*</xsl:comment> to generate comments that appear in the output.
Can't see any compile errors straight off if it's not the include issue, however.
Okay, Visual Studio reckons no errors once I'd mocked up a fake Common.xslt so I'd have a look at making sure it can find that include first.
Incidentally, was there any reason you went with this:
Rather than:
?
Thestatement and various other places use attribute commands which is a bit more readable, but you could shrink that down too with the curly brackets syntax unless I am missing something?
Oh my GOD, I HATE THIS EDITOR. "Thestatement" should be "the xsl:otherwise statement". I'd edit the above post again but it loases the code every time I do that and I just want to get on with my life now.
P.S. Actually, another thing that can give these generic messages is failures on external library calls, so might be worth checking you are both passing in and getting out what you expect to your Foodstuffs library.
is working on a reply...