Currently don't see an issue, except for the 2nd $currentPage, which you should replace with ./data [@alias = $itemContent], (if $itemContent has been defined before of course, can't find it in above snippet)
I have updated the 2nd $CurrentPage as suggested. Do I need to define $itemContent as a variable?
The error I'm getting is this...
System.Xml.Xsl.XslLoadException:
XSLT compile error. An error occurred at (40,89). --->
System.Xml.XmlException: '<', hexadecimal value 0x3C, is an invalid
attribute character. Line 40, position 89.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[]
args)
at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos,
Char quoteChar, NodeData attr)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Xml.Xsl.Xslt.XsltInput.ReadNextSiblingHelper()
at System.Xml.Xsl.Xslt.XsltInput.ReadNextSibling()
at System.Xml.Xsl.Xslt.XsltInput.MoveToFirstChildAny()
at System.Xml.Xsl.Xslt.XsltInput.MoveToFirstChild()
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List`1 content,
InstructionFlags flags)
at System.Xml.Xsl.Xslt.XsltLoader.LoadLiteralResultElement(Boolean
asStylesheet)
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List`1 content,
InstructionFlags flags)
at System.Xml.Xsl.Xslt.XsltLoader.LoadLiteralResultElement(Boolean
asStylesheet)
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List`1 content,
InstructionFlags flags)
at System.Xml.Xsl.Xslt.XsltLoader.XslForEach()
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List`1 content,
InstructionFlags flags)
at System.Xml.Xsl.Xslt.XsltLoader.LoadLiteralResultElement(Boolean
asStylesheet)
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List`1 content,
InstructionFlags flags)
at System.Xml.Xsl.Xslt.XsltLoader.LoadTemplate(NsDecl
stylesheetNsList)
at System.Xml.Xsl.Xslt.XsltLoader.LoadRealStylesheet()
at System.Xml.Xsl.Xslt.XsltLoader.LoadDocument()
at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader,
Boolean include)
--- End of inner exception stack trace ---
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.CompileXsltToQil(Object
stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
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)
Answer to 1st question: Depends, if you *know* the propertyAlias and it will be static, use that one, otherwise if $itemContent is to be dynamic, use a variable.
I've added the double quote and it's cleared the error but now I'm getting 'The variable or parameter 'itemContent' is either not defined or it is out of scope'
I assume this is because I haven't defined $itemContent?
I have 2 aliases that I need to display - itemContent and itemContentImage - each are populated in the child pages that will form the accordian.
Sorry, I'm a bit confused as to what I need to define and where!
Problems Updating XSLT from New Schema to Old Schema
Hi,
I'm using XSLT and JQuery to create an accordian menu using child pages of a node.
The code has previously worked in Umbraco 4.5.2 but I am now trying to get it to work in 4.0.3 but not having much luck!
I have updated the code for the old schema but I think there may be something wrong with my value-of select as it is throwing an error!
Here is my xslt...
Any help appreciated!
Thanks,
Rachel
Rachel,
Currently don't see an issue, except for the 2nd $currentPage, which you should replace with ./data [@alias = $itemContent], (if $itemContent has been defined before of course, can't find it in above snippet)
And more specifically, what error do you get?
Looking forward to your info.
Cheers,
/Dirk
Hi Dirk,
I have updated the 2nd $CurrentPage as suggested. Do I need to define $itemContent as a variable?
The error I'm getting is this...
Thanks,
Rachel
Answer to 1st question: Depends, if you *know* the propertyAlias and it will be static, use that one, otherwise if $itemContent is to be dynamic, use a variable.
Just seen that you've not closed the
<xsl:value-ofselect="$currentPage/data [@alias=$itemContent] />
the select attribute, maybe that's the issue. Can you try adding a closing double quote for the select attribute?
Cheers,
/Dirk
Hi,
I've added the double quote and it's cleared the error but now I'm getting 'The variable or parameter 'itemContent' is either not defined or it is out of scope'
I assume this is because I haven't defined $itemContent?
I have 2 aliases that I need to display - itemContent and itemContentImage - each are populated in the child pages that will form the accordian.
Sorry, I'm a bit confused as to what I need to define and where!
Thanks,
Rachel
yes, indeed, if you haven't defined that one, you need to, unless you can set it static, (which i assume here), so above snippet would be
<xsl:value-of select="./data [@alias='itemContent'] />
Cheers,
/Dirk
Thank you! I now don't get any errors but the xslt isn't generating any output :(
When I use the visualize xslt I get nothing and encode/ decode result just returns <ul id="accordion"></ul>
I've also tried defining a specific node but still no result returned.
Thanks,
Rachel
is working on a reply...