Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Van Oort 110 posts 371 karma points
    Sep 17, 2018 @ 17:56
    Chris Van Oort
    0

    Umbraco Upgrade 7.3.8 to 7.7.13 "Error parsing XSLT file"

    Hello! I'm back with another Umbraco upgrade issue in my journey from 7.2.8 to 7.12.2. Today I'm working on going from 7.3.8 to 7.7.13, but running into a snag where our (old) XSLT macros are not rendering on the masterpage.

    2018-09-17 12:43:36,430 [11] WARN  umbraco.macro - Error parsing XSLT file. Exception: System.TypeLoadException: Could not load type 'umbraco.presentation.umbracobase.RestExtension' from assembly 'umbraco, Version=1.0.6628.38731, Culture=neutral, PublicKeyToken=null'.
       at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
       at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
       at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
       at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
       at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
       at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
       at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
       at System.Attribute.GetCustomAttributes(MemberInfo element, Type type, Boolean inherit)
       at System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType, Boolean inherit)
       at System.Reflection.CustomAttributeExtensions.GetCustomAttribute[T](MemberInfo element)
       at Umbraco.Core.TypeFinder.<>c__DisplayClass23_0.<GetClassesWithAttribute>b__0(Type x)
       at System.Linq.Enumerable.WhereArrayIterator`1.MoveNext()
       at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
       at Umbraco.Core.TypeFinder.GetClassesWithAttribute(Type attributeType, IEnumerable`1 assemblies, Boolean onlyConcreteClasses)
       at Umbraco.Core.TypeFinder.FindClassesWithAttribute[T](IEnumerable`1 assemblies, Boolean onlyConcreteClasses)
       at Umbraco.Core.TypeFinder.FindClassesWithAttribute[T](IEnumerable`1 assemblies)
       at Umbraco.Core.PluginManager.<>c__DisplayClass53_0`1.<ResolveAttributedTypes>b__0()
       at Umbraco.Core.PluginManager.ResolveTypesInternalLocked(Type baseType, Type attributeType, Func`1 finder, Boolean cache)
       at Umbraco.Core.PluginManager.ResolveTypesInternal(Type baseType, Type attributeType, Func`1 finder, Boolean cache)
       at Umbraco.Core.PluginManager.ResolveAttributedTypes[TAttribute](Boolean cache, IEnumerable`1 specificAssemblies)
       at Umbraco.Web.WebBootManager.<InitializeResolvers>b__17_1()
       at Umbraco.Core.ObjectResolution.LazyManyObjectsResolverBase`2.<>c.<Initialize>b__17_2(Func`1 x)
       at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
       at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
       at Umbraco.Core.ObjectResolution.LazyManyObjectsResolverBase`2.<Initialize>b__17_0()
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at System.Lazy`1.get_Value()
       at Umbraco.Core.ObjectResolution.LazyManyObjectsResolverBase`2.get_InstanceTypes()
       at Umbraco.Core.Macros.XsltExtensionsResolver.CreateInstances()
       at Umbraco.Core.ObjectResolution.ManyObjectsResolverBase`2.<InitializeAppInstances>b__14_0()
       at System.Lazy`1.CreateValue()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Lazy`1.get_Value()
       at Umbraco.Core.ObjectResolution.ManyObjectsResolverBase`2.get_Values()
       at umbraco.macro.GetXsltExtensions()
       at umbraco.macro.AddMacroXsltExtensions()
       at umbraco.macro.GetXsltTransformResult(XmlDocument macroXml, XslCompiledTransform xslt, Dictionary`2 parameters)
       at umbraco.macro.LoadMacroXslt(macro macro, MacroModel model, Hashtable pageElements, Boolean throwError)
    

    Any ideas how to solve this? Does 7.7.13 (and up to 7.12.2) still support XSLT macros?

    Also: I did see this note on the upgrade guide, would this be the culprit?

    Version 7.7.2 no longer ships with the CookComputing.XmlRpcV2 assembly so if you reference this assembly or have a package that requires this assembly, you may need to copy it back into your website from the backup you've taken before you began the 7.7.2 upgrade. via: https://our.umbraco.com/documentation/getting-started/setup/upgrading/version-specific

    Best,

    Chris

  • Chris Van Oort 110 posts 371 karma points
    Sep 18, 2018 @ 17:17
    Chris Van Oort
    0

    Some gracious folks have helped move the ball forward on twitter: https://twitter.com/chrisvanoort/status/1041746393029910528

    Per their recommendations, I changed the reference in XSLT but have a new runtime exception. Any ideas?

    I changed umbraco.library to Umbraco.Web.BaseRest I also tried changing umbraco.library to Umbraco.Web.UmbracoHelpers (I think this is correct as it's shown in API docs https://our.umbraco.com/apidocs/csharp/api/Umbraco.Web.UmbracoHelper.html?q=MemberIslogg) Then I changed IsLoggedOn() to MemberIsLoggedOn()

    One of the XSLT files I'm trying to get working (really simple one):

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [
      <!ENTITY nbsp "&#x00A0;">
    ]>
    <xsl:stylesheet
      version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:msxml="urn:schemas-microsoft-com:xslt"
      xmlns:msxsl="urn:schemas-microsoft-com:xslt"
      xmlns:umbraco.library="urn:Umbraco.Web.UmbracoHelper" 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" xmlns:ucomponents.xml="urn:ucomponents.xml"
      exclude-result-prefixes="msxml
     msxsl umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes 
    Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings 
    Exslt.ExsltSets ucomponents.xml ">
      <xsl:output method="xml" omit-xml-declaration="yes"/>
      <xsl:variable name="redirectURL">
        <xsl:value-of select="concat('/logout?redirect=', umbraco.library:RequestServerVariables('URL'))"/>
      </xsl:variable>
      <xsl:template match="/">
        <xsl:choose>
          <xsl:when test="umbraco.library:MemberIsLoggedOn() = true()">
            <xsl:variable name="redirectURL">
              <xsl:value-of select="concat('/logout?redirect=', umbraco.library:RequestServerVariables('URL'))"/>
            </xsl:variable>
            <a href="{$redirectURL}" class="btn btn-primary" style="padding: 2px 5px 2px 5px; float:right;">
              <i class="fa fa-sign-out">&nbsp;</i>Logout
            </a>
            <a href="/account" class="btn btn-info" style="padding: 2px 5px 2px 5px; float:right; margin-right:10px;">
              <i class="fa fa-cog">&nbsp;</i>Account Manager
            </a>
            <a href="/account/event/new" class="btn palette-BC-burntorange hidden-phone" style="padding: 2px 5px 2px 5px; float:right; margin-right:10px;">
              <i class="fa fa-plus">&nbsp;</i>Add an Event
            </a>
            <a href="/account/classified/new" class="btn palette-BC-gold hidden-phone" style="padding: 2px 5px 2px 5px; float:right; margin-right:10px;">
              <i class="fa fa-plus">&nbsp;</i>Post a Classified
            </a>
          </xsl:when>
          <xsl:otherwise>
            <xsl:variable name="redirectURL">
              <xsl:value-of select="concat('/login?redirect=', umbraco.library:RequestServerVariables('URL'))"/>
            </xsl:variable>
              <a href="/login" class="btn btn-primary" style="padding: 2px 5px 2px 5px; float:right;">
                 Login
              </a>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:template>
    </xsl:stylesheet>
    

    The new exception I'm getting: enter image description here

    I suspect it's some sort of old DLL problem but I've build-->clean --> build and also removed old stuff floating around in there such as uGoLive (per here: https://issues.umbraco.org/issue/U4-5220 ) but no luck.

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Sep 18, 2018 @ 18:23
    Chriztian Steinmeier
    0

    Hi Chris,

    You definitely shouldn't change the definition of an existing namespace like umbraco.library. Instead, define another and use that prefix where you need to call those specific methods.

    But I don't think you can "just" add UmbracoHelper - it needs to be "prepped" somehow for adding as an extension to use from XSLT (e.g. I'm pretty sure it needs to be a static class with static methods - but I'm in no way qualified for anything complicated C#-wise, so... :-)

    I'll need to read up on your original problem before I can give any real help though, so I'll just do that and return...

    /Chriztian

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Sep 18, 2018 @ 18:45
    Chriztian Steinmeier
    1

    OK, so I'd recommend you try this:

    Change the stylesheet element to this simple version without all the other unnecessary namespaces:

    <xsl:stylesheet
      version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:umbraco.library="urn:umbraco.library"
      exclude-result-prefixes="umbraco.library"
    >
    

    and then change the line where you call the MemberIsLoggedOn() method to just bypass that, e.g.:

    <xsl:when test="true()">
    

    If this works, you can go on and add the helper reference like this:

    <xsl:stylesheet
      version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:umbraco.library="urn:umbraco.library"
      xmlns:helper="urn:Umbraco.Web.UmbracoHelper"
      exclude-result-prefixes="umbraco.library helper"
    >
    

    and see if it works by using it like this:

    <xsl:when test="helper:MemberIsLoggedOn()">
    

    ...

    But I'm pretty sure it's all the references that UmbracoHelper has itself that are problematic...

    To "fix" that, you could create your own helper library and create a MemberIsLoggedOn() method inside of that, something like this:

    // Misc. using statements...

    namespace chris {
    
        [XsltExtension("chris.helpers")]
        public class Helpers {
    
            public Helpers() {}
    
            // This could be called from XSLT with `chris.helpers:MemberIsLoggedOn()`
            private static bool MemberIsLoggedOn() {
                return true; // Needs more garlic here, obviously :)
            }
        }
    }
    

    You can just put that in the App_Code/ folder to quickly try it out...

    /Chriztian

  • Chris Van Oort 110 posts 371 karma points
    Sep 24, 2018 @ 20:23
    Chris Van Oort
    0

    Hi Chriztian,

    Thank you for your help! No doubt that looks like it'd work; I just spent a bit today and refactored my tiny chunk of xslt I needed into a macro script as it seemed easier that way.

    I think the issue is something underlying with a dll or something within my project. I have a larger xslt file and it's got the same problem without any references to UmbracoHelper.

    I did try your namespace fix above and got the same error (with the 'weather' xslt file I have):

    2018-09-24 15:11:11,537 [14] WARN  umbraco.macro - Error parsing XSLT file. Exception: System.TypeLoadException: Could not load type 'umbraco.cms.businesslogic.datatype.ClientDependencyAttribute' from assembly 'cms, Version=1.0.6628.38729, Culture=neutral, PublicKeyToken=null'.
       at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
       at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
       at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
       at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
       at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
       at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
       at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
       at System.Attribute.GetCustomAttributes(MemberInfo element, Type type, Boolean inherit)
       at System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType, Boolean inherit)
       at System.Reflection.CustomAttributeExtensions.GetCustomAttribute[T](MemberInfo element)
       at Umbraco.Core.TypeFinder.<>c__DisplayClass23_0.<GetClassesWithAttribute>b__0(Type x)
       at System.Linq.Enumerable.WhereArrayIterator`1.MoveNext()
       at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
       at Umbraco.Core.TypeFinder.GetClassesWithAttribute(Type attributeType, IEnumerable`1 assemblies, Boolean onlyConcreteClasses)
       at Umbraco.Core.TypeFinder.FindClassesWithAttribute[T](IEnumerable`1 assemblies, Boolean onlyConcreteClasses)
       at Umbraco.Core.TypeFinder.FindClassesWithAttribute[T](IEnumerable`1 assemblies)
       at Umbraco.Core.PluginManager.<>c__DisplayClass53_0`1.<ResolveAttributedTypes>b__0()
       at Umbraco.Core.PluginManager.ResolveTypesInternalLocked(Type baseType, Type attributeType, Func`1 finder, Boolean cache)
       at Umbraco.Core.PluginManager.ResolveTypesInternal(Type baseType, Type attributeType, Func`1 finder, Boolean cache)
       at Umbraco.Core.PluginManager.ResolveAttributedTypes[TAttribute](Boolean cache, IEnumerable`1 specificAssemblies)
       at Umbraco.Web.WebBootManager.<InitializeResolvers>b__17_1()
       at Umbraco.Core.ObjectResolution.LazyManyObjectsResolverBase`2.<>c.<Initialize>b__17_2(Func`1 x)
       at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
       at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
       at Umbraco.Core.ObjectResolution.LazyManyObjectsResolverBase`2.<Initialize>b__17_0()
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at System.Lazy`1.get_Value()
       at Umbraco.Core.ObjectResolution.LazyManyObjectsResolverBase`2.get_InstanceTypes()
       at Umbraco.Core.Macros.XsltExtensionsResolver.CreateInstances()
       at Umbraco.Core.ObjectResolution.ManyObjectsResolverBase`2.<InitializeAppInstances>b__14_0()
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at System.Lazy`1.get_Value()
       at Umbraco.Core.ObjectResolution.ManyObjectsResolverBase`2.get_Values()
       at umbraco.macro.GetXsltExtensions()
       at umbraco.macro.AddMacroXsltExtensions()
       at umbraco.macro.GetXsltTransformResult(XmlDocument macroXml, XslCompiledTransform xslt, Dictionary`2 parameters)
       at umbraco.macro.LoadMacroXslt(macro macro, MacroModel model, Hashtable pageElements, Boolean throwError)
    

    Weather xslt file:

        <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [
      <!ENTITY nbsp "&#x00A0;">
    ]>
    <!--<xsl:stylesheet
      version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:msxml="urn:schemas-microsoft-com:xslt"
      xmlns:msxsl="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" xmlns:ucomponents.xml="urn:ucomponents.xml"
      exclude-result-prefixes="msxml
     msxsl umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes 
    Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings 
    Exslt.ExsltSets ucomponents.xml ">-->
    <xsl:stylesheet
      version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:umbraco.library="urn:umbraco.library"
      exclude-result-prefixes="umbraco.library"
    >
    
    
      <xsl:output method="xml" omit-xml-declaration="yes"/>
    
      <xsl:param name="currentPage"/>
    
      <xsl:template match="/">
    
        <xsl:variable name="weather" select="document('../App_Data/FeedCache/GetWeatherRSS.xml')" />
        <a href="/weather" class="blackLink">
        <div class="wdayContainer" id="today">
          <p class="wdayTitle" id="textToday">Today</p>
          <xsl:choose>
            <xsl:when test="$weather/data/current_condition/weatherCode = 113">
              <span w-icon="B"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 116">
              <span w-icon="H"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 119">
              <span w-icon="N"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 122">
              <span w-icon="Y"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 143">
              <span w-icon="L"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 176">
              <span w-icon="Q"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 179">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 182">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 185">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 200">
              <span w-icon="O"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 227">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 230">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 248">
              <span w-icon="A"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 260">
              <span w-icon="L"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 263">
              <span w-icon="T"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 266">
              <span w-icon="T"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 281">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 284">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 293">
              <span w-icon="T"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 296">
              <span w-icon="Q"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 299">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 302">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 305">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 308">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 311">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 314">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 317">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 320">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 323">
              <span w-icon="V"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 326">
              <span w-icon="V"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 329">
              <span w-icon="V"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 332">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 335">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 338">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 350">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 353">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 356">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 359">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 362">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 365">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 368">
              <span w-icon="V"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 371">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 374">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 377">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 386">
              <span w-icon="O"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 389">
              <span w-icon="O"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 392">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/current_condition/weatherCode = 395">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:otherwise>
              <span w-icon="H"></span>
            </xsl:otherwise>
          </xsl:choose>
          <p class="smallFont clearMargin">
            Hi: <xsl:copy-of select="$weather/data/weather[1]/maxtempF"/>°F
            Lo: <xsl:copy-of select="$weather/data/weather[1]/mintempF"/>°F
          </p>
          <p class="smallFont clearMargin">
            Now: <xsl:copy-of select="$weather/data/current_condition/temp_F"/>°F, <xsl:copy-of select="$weather/data/current_condition/windspeedMiles"/>mph
          </p>
        </div>
        </a>
        <a href="/weather" class="blackLink">
        <div class="wdayContainer" id="tomorrow">
          <p class="wdayTitle" id="textTomorrow">Tomorrow</p>
          <xsl:choose>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 113">
              <span w-icon="B"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 116">
              <span w-icon="H"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 119">
              <span w-icon="N"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 122">
              <span w-icon="Y"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 143">
              <span w-icon="L"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 176">
              <span w-icon="Q"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 179">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 182">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 185">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 200">
              <span w-icon="O"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 227">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 230">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 248">
              <span w-icon="A"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 260">
              <span w-icon="L"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 263">
              <span w-icon="T"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 266">
              <span w-icon="T"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 281">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 284">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 293">
              <span w-icon="T"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 296">
              <span w-icon="Q"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 299">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 302">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 305">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 308">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 311">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 314">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 317">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 320">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 323">
              <span w-icon="V"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 326">
              <span w-icon="V"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 329">
              <span w-icon="V"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 332">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 335">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 338">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 350">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 353">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 356">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 359">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 362">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 365">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 368">
              <span w-icon="V"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 371">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 374">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 377">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 386">
              <span w-icon="O"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 389">
              <span w-icon="O"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 392">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[2]/hourly[5]/weatherCode = 395">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:otherwise>
              <span w-icon="H"></span>
            </xsl:otherwise>
          </xsl:choose>
          <p class="smallFont clearMargin">
            Hi: <xsl:copy-of select="$weather/data/weather[2]/maxtempF"/>°F
            Lo: <xsl:copy-of select="$weather/data/weather[2]/mintempF"/>°F
          </p>
        </div>
        </a>
        <a href="/weather" class="blackLink">
        <div class="wdayContainer" id="thenextday">
          <p class="wdayTitle" id="textTND">The Next Day</p>
          <xsl:choose>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 113">
              <span w-icon="B"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 116">
              <span w-icon="H"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 119">
              <span w-icon="N"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 122">
              <span w-icon="Y"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 143">
              <span w-icon="L"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 176">
              <span w-icon="Q"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 179">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 182">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 185">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 200">
              <span w-icon="O"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 227">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 230">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 248">
              <span w-icon="A"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 260">
              <span w-icon="L"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 263">
              <span w-icon="T"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 266">
              <span w-icon="T"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 281">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 284">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 293">
              <span w-icon="T"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 296">
              <span w-icon="Q"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 299">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 302">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 305">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 308">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 311">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 314">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 317">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 320">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 323">
              <span w-icon="V"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 326">
              <span w-icon="V"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 329">
              <span w-icon="V"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 332">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 335">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 338">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 350">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 353">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 356">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 359">
              <span w-icon="R"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 362">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 365">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 368">
              <span w-icon="V"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 371">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 374">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 377">
              <span w-icon="X"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 386">
              <span w-icon="O"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 389">
              <span w-icon="O"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 392">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:when test="$weather/data/weather[3]/hourly[5]/weatherCode = 395">
              <span w-icon="W"></span>
            </xsl:when>
            <xsl:otherwise>
              <span w-icon="H"></span>
            </xsl:otherwise>
          </xsl:choose>
          <p class="smallFont clearMargin">
            Hi: <xsl:copy-of select="$weather/data/weather[3]/maxtempF"/>°F
            Lo: <xsl:copy-of select="$weather/data/weather[3]/mintempF"/>°F
          </p>
        </div>
        </a>
      </xsl:template>
    
    </xsl:stylesheet>
    
Please Sign in or register to post replies

Write your reply to:

Draft