Copied to clipboard

Flag this post as spam?

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


  • tla 35 posts 71 karma points
    Nov 29, 2010 @ 12:46
    tla
    0

    XSLT Namespace declaration

    Hello,

    I installed the RestContour package linked to at this website and proceeded to make an XSLT file.

    The XSLT looks as follows:

     

    <?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: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:umbraco.contour="urn:umbraco.contour" xmlns:rc="urn:cultiv.restcontour"
        exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets umbraco.contour rc ">


    <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:template match="/">

    <xsl:variable name="setFormGuid" select="rc:SetContourGuid('fa563ab7-31e4-4bc4-b848-1d8e41964879')"/>
        <xsl:variable name="formGuid" select="rc:GetContourGuid()"/>

        <form action="" method="post" id="form-{$formGuid}" name="contactForm">
            <textarea title="Besked" name="Message" id="xxx10"></textarea>
            <input type="text" title="Navn" name="Name" id="xxx11" />
            <input type="text" title="E-mail" name="Email" id="xxx12" />
            <input type="text" title="Telefon" name="Phone" id="xxx13" />
            <input type="submit" name="submit" />
        </form>

    <script type="text/javascript">
          <xsl:text>jQuery(document).ready(function () {</xsl:text>
          <xsl:value-of select="rc:BuildForm()"/>
          <xsl:text>});</xsl:text>
        </script>

    </xsl:template>

    </xsl:stylesheet>

     

    But when I try to save the file I get the following error:

     

    Error occured

    System.Xml.Xsl.XslTransformException: Cannot find a script or an extension object associated with namespace 'urn:cultiv.restcontour'.
    at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args)
    at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
    at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
    at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
    at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results)
    at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)
    at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver)
    at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
    at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)

     

    While watching the video on youtube, I saw that an error would occour while trying to save the XSLT file, but as far as I know, it should not be this one.

     

    Where should I start looking?

    Thank you in advance.

  • Emil Rasmussen 67 posts 91 karma points
    Nov 30, 2010 @ 10:52
    Emil Rasmussen
    2

    Could you check that you have added the XsltExtension to xsltExtensions.config?

     

     

       <ext assembly="Cultiv.RestContour" type="Cultiv.RestContour.XsltExtensions" alias="cultiv.restcontour">
        </ext>

     

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Nov 30, 2010 @ 22:52
    Sebastiaan Janssen
    0

    Emil is right, and if you're on a 4.0.x site, the assembly property should be /bin/Cultiv.RestContour

  • tla 35 posts 71 karma points
    Dec 01, 2010 @ 08:03
    tla
    0

    Its a 4.5.2 site.

    Progress has been made and thumbs up for this amazing package! :)

  • Lachlann 344 posts 626 karma points
    Jul 06, 2011 @ 18:11
    Lachlann
    0

    Hey Guys,

     

    I was getting the same issue as described above and I added the xsltExtension but now i get this error

     

    Could not load type Cultiv.RestContour.XsltExtensions (C:\website\Gsa.Umbraco\bin\Cultiv.RestContour.dll) for XSLT extension C:\Gsa.Umbraco\bin\Cultiv.RestContour.dll. Please check config/xsltExentions.config.

    My .dll is definatly in the bin folder. I have tried touching hte web.config etc but no joy.


    Any help would be great.

    L

  • tla 35 posts 71 karma points
    Jul 07, 2011 @ 07:58
    tla
    0

    Check the .config file mentioned I'm not sure if you need to specify the bin folder, too. On a sidenote: shouldn't it say xsltExtentions? At least that's what my config file is called so it might be a case of a simple typo?

  • Lachlann 344 posts 626 karma points
    Jul 07, 2011 @ 09:44
    Lachlann
    0

    hey thanks for your reply, I am running 4.7 so i dont think i need to specifiy the bin folder. And my xsltExtensions config is named correctly etc. Thanks for your suggestions though!

     

    L

  • Lachlann 344 posts 626 karma points
    Jul 07, 2011 @ 10:14
    Lachlann
    0

    Okay figured it out.

    I installed the package from the package page and then downloaded the example zip file.

    BUT the dll in the package download is different (doesnt contain the XSLT Extensions) I have used the package from the example zip and it seems to work now.

    Did i miss that in the documentation?

    Great package by the way!

    L

     

    PS: make sure you dont copy any spaces after your GUID otherwise it wont work (hopefully that will save someone the 10 mins it took me to figure out :)

     

  • tla 35 posts 71 karma points
    Jul 07, 2011 @ 10:18
    tla
    0

    Sounds like the package needs to be reworked and re-released then! Great that you sorted it out,however:)

  • AdrianLove 11 posts 33 karma points
    Mar 02, 2012 @ 01:20
    AdrianLove
    0

    After upgrading from 4.7.0 to 4.7.1 my rest contour forms were not working as expected. 

    Adding the line to xsltExtensions.config did the trick and now my site is working again. 

    Thanks for your help! 

Please Sign in or register to post replies

Write your reply to:

Draft