Copied to clipboard

Flag this post as spam?

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


  • Umbraco 137 posts 294 karma points
    Jul 25, 2012 @ 15:09
    Umbraco
    0

    Changing an XSLT macro has no effect, old code is still used

    Only when I restart the web server is the new XSLT code loaded and parsed. 

    For development I need to be able to 'just refresh' to see changes to my code, how can I enable this?

  • Umbraco 137 posts 294 karma points
    Jul 25, 2012 @ 15:16
    Umbraco
    0

    By the way, the XSLT macro I am changing is imported in another macro through xsl:import. 

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Jul 25, 2012 @ 16:17
    Lee Kelleher
    0

    Hi Michiel,

    Due to the way Umbraco caches the XSLT macro (once it is compiled), the cache is only expired if there is a change to the XSLT file itself. This doesn't apply to any included/imported XSLT files.

    2 options are:

    1. Touch/modify the 'parent' XSLT file - this can be a pain if you are re-using the imported XSLT across many macros.
    2. Use the XSLTouch package - this will auto-touch any XSLT files that use the imported XSLT. (Warning it doesn't work on Medium Trust)

    Cheers, Lee.

  • Umbraco 137 posts 294 karma points
    Jul 25, 2012 @ 17:49
    Umbraco
    0

    Thank you for this information! I'm going to install XLSTouch for development.

    Do you think it makes sense to open a work item for this? Or is it not possible to expire the cache for imported macros?

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Jul 25, 2012 @ 17:59
    Lee Kelleher
    0

    IMHO, it is not worth opening a workitem for this.  The XSLT compiler/transform isn't aware of the includes/imports, treating it as 1 single XSLT file. Umbraco isn't aware when included/imported XSLT files are changed. (Which is the problem XSLTouch solves)

    Also given the focus is gearing towards the Razor implementation - I doubt XSLT will be allocated any TLC in future. (Despite my best efforts) :-(

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies