Copied to clipboard

Flag this post as spam?

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


  • fed 199 posts 70 karma points
    Apr 16, 2009 @ 23:07
    fed
    0

    XSLT nodeset Question

    Hi,

    I will try to explain what I am trying to accomplish, based on multiple querystrings I am trying to filter a set of nodes using multiple templates. That atleast was my initial thought, but I got stuck when trying to pass the filtered nodes on to the next template.

    [code]

    ......
    ......

    [/code]

    I have also tried
    [code][/code]
    and
    [code][/code]

    But I can't really see why nothing seems to work. I guess some of you XSLT-guru's out there can see what I am doing wrong :)

    Any input is appreciated.

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Apr 17, 2009 @ 01:12
    Morten Bock
    0

    I think it has something to do with the conditionals [].

    When you use a condition like that, you no longer have a node set, you have a node-result set (or something). To convert that into a node set again, try surrounding it with msxsl:node-set(). something like:



    I don't remember if you have to add something to the top of the stylesheet to get it working, but this should get you started.

  • Steve Morgan 1349 posts 4458 karma points c-trib
    Apr 18, 2009 @ 13:12
    Steve Morgan
    0

    I've got exactly the same problem...

    When I add this function I get

    System.Xml.Xsl.XslLoadException: Prefix 'msxsl' is not defined. An error occurred at ...

    What do I have to include?



    ]>

    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 ">

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Apr 18, 2009 @ 20:09
    Warren Buckley
    1

    Hiya Cheesey toastie,
    This is to do with the header stuff as you seem to be aware of.

    You need to add this line which adds the namespace so you can use the functions in that.

    [code]
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    [/code]

    Then you need to add msxsl to the line exclude-result-prefixes

    Hey presto all solved !
    Warren

  • fed 199 posts 70 karma points
    Apr 18, 2009 @ 21:08
    fed
    0

    thanks mortenbock! I however ended up using an xsltextension that created the xpath based on multiple querystrings and returned the nodeset.
    The xslt got too messy and hard to follow..

  • Steve Morgan 1349 posts 4458 karma points c-trib
    Apr 20, 2009 @ 10:54
    Steve Morgan
    0

    Thanks Warren, I did get that working but couldn't get the syntax right for the node-set. I switched to calling a template with a

Please Sign in or register to post replies

Write your reply to:

Draft