The problem is that I got stuck trying to reproduce this issue. It just occurs randomly more likely when user was inactive for some time.
It is not a critical issue but still I would be thankful for any helpful thoughts.
Thanks.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp " ">
]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">
<xsl:output method="xml" omit-xml-declaration="yes" />
<xsl:param name="currentPage" select="/.."/>
<!-- Input the documenttype you want here -->
<!-- Typically '1' for topnavigtaion and '2' for 2nd level -->
<!-- Use div elements around this macro combined with css -->
<!-- for styling the navigation -->
<xsl:variable name="level" select="1"/>
<xsl:template match="/">
<!-- The fun starts here -->
<ul>
<xsl:for-each select="$currentPage/ancestor-or-self::* [@isDoc and @level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']">
<li >
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:if test="$currentPage/ancestor-or-self::*/@id = current()/@id">
<!-- we're under the item - you can do your own styling here -->
<xsl:attribute name="class">selected</xsl:attribute>
</xsl:if>
<xsl:value-of select="@nodeName"/>
</a>
</li>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>
Yes, that seems a bit cleaner code, you are right. But both conditions seem to be working well enough, so I feel that this is not a source of the problem, do you agree with me? Thanks for the feedback anyway.
Error parsing xslt file happens periodically umbraco 4.7.2.
Hello,
We have a simple navigation menu on our portal. 99% of the time it works perfect but sometimes it causes:
'Error parsing XSLT file: \xslt\HomePageNavigation.xslt'.
The problem is that I got stuck trying to reproduce this issue. It just occurs randomly more likely when user was inactive for some time.
It is not a critical issue but still I would be thankful for any helpful thoughts.
Thanks.
Can you try chaning your for each to
Yes, that seems a bit cleaner code, you are right. But both conditions seem to be working well enough, so I feel that this is not a source of the problem, do you agree with me? Thanks for the feedback anyway.
Yes i do agree with you but give this a try, might be some issues with the code as well.
is working on a reply...