Copied to clipboard

Flag this post as spam?

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


  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 7x admin c-trib
    Mar 06, 2010 @ 22:35
    Chriztian Steinmeier
    2

    Question regarding Umbraco's EXSLT implementation

    Does anybody know why the namespaces for EXSLT functions in Umbraco are different from the 'official' EXSLT namespaces?

    The main point of EXSLT is to help create portable stylesheets by providing a common set of extension-functions. Take for example the node-set() function, which is very useful; It's located in the EXSLT Common module, which has the official namespace URI "http://exslt.org/common". To use node-set() in a stylesheet, I just need to assign a prefix to that namespace URI and I'm good to go, if the processor implements the EXSLT extensions. And if I ever need to use the stylesheet in another application, which also implements these extensions, I wouldn't need to change anything in my stylesheet... but the way EXSLT is implemented in Umbraco, I'll have to change the namespace URI from "http://exslt.org/common" to "urn:Exslt.ExsltCommon" which of course isn't as portable as was the intention of using EXSLT in the first place. But it gets even worse...

    If I were to use the day-in-week() function of the "EXSLT Dates and Times" module, I'd be even more detached from the EXSLT outset, because not only would I have to change the namespace URI from the original "http://exslt.org/dates-and-times" to "urn:Exslt.ExsltDatesAndTimes" but I'd also have to change the actual function name from "day-in-week()" to "dayinweek()", which definitely defeats the purpose of using a common set of extension functions.

    Anyway, I'm just curious as to what the reason for this mismatch is.

    /Chriztian 

  • Jesper Hauge 298 posts 487 karma points c-trib
    Mar 06, 2010 @ 22:53
    Jesper Hauge
    2

    I find this a bit odd as well - more so since the msdn documentation on exslt doesn't provide documentation on the methods themselves, but contains a link to exslt.org, that documents as day-in-week instead of dayinweek.

    Also day-in-week is more akin to standard xslt/xpath syntax like substring-before() and generate-id() than dayinweek.

    .Hauge

Please Sign in or register to post replies

Write your reply to:

Draft