Copied to clipboard

Flag this post as spam?

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


  • Biagio Paruolo 1618 posts 1910 karma points c-trib
    Apr 04, 2011 @ 17:12
    Biagio Paruolo
    0

    tagsLib: How to setup without blog package?

    I use tag datatype in my document type and I wish to use cloud function and tagsLib:getAllTagsInGroup,

    but XSLT don't recognize lib. I've changed config file, too.

  • Biagio Paruolo 1618 posts 1910 karma points c-trib
    Apr 04, 2011 @ 17:31
    Biagio Paruolo
    0

    solved

  • BenH 59 posts 199 karma points
    Feb 04, 2015 @ 16:24
    BenH
    0

    What was your solution? 

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 04, 2015 @ 16:40
    Jan Skovgaard
    0

    Hi BenH

    What version of Umbraco are you using? And what is the exact error you're getting? The solution Biagio found 4 years ago may not be the same today nor the issue.

    /Jan

  • BenH 59 posts 199 karma points
    Feb 04, 2015 @ 16:53
    BenH
    0

    Hi Jan, 

    I'm using 6.2.1 (business not Blog4Umbraco) and the exact error is: 

    System.Xml.Xsl.XslLoadException: Prefix 'TagsLib' is not defined. An error occurred at D:\Staging2014\xslt\635586379038769721_temp.xslt(16,1). 
    at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver) 
    at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)

    I've also added the ext line to my config file (found here http://our.umbraco.org/documentation/using-umbraco/backoffice-overview/property-editors/built-in-property-editors/Tags)

    Is it because I'm not using the Blog version? 

    Thanks! 

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 04, 2015 @ 17:17
    Jan Skovgaard
    0

    Hi Ben

    Ok, perhaps you're simply missing a namespace in the XSLT file.

    Could you please post the XSLT code and the content of your /config/XsltExtensions.config file?

    /Jan

  • BenH 59 posts 199 karma points
    Feb 04, 2015 @ 17:30
    BenH
    0
    <?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:Examine="urn:Examine" xmlns:applied="urn:applied" xmlns:umbraco.contour="urn:umbraco.contour" xmlns:ucomponents.cms="urn:ucomponents.cms" xmlns:ucomponents.dates="urn:ucomponents.dates" xmlns:ucomponents.email="urn:ucomponents.email" xmlns:ucomponents.io="urn:ucomponents.io" xmlns:ucomponents.media="urn:ucomponents.media" xmlns:ucomponents.members="urn:ucomponents.members" xmlns:ucomponents.nodes="urn:ucomponents.nodes" xmlns:ucomponents.random="urn:ucomponents.random" xmlns:ucomponents.request="urn:ucomponents.request" xmlns:ucomponents.search="urn:ucomponents.search" xmlns:ucomponents.strings="urn:ucomponents.strings" xmlns:ucomponents.urls="urn:ucomponents.urls" xmlns:ucomponents.xml="urn:ucomponents.xml" 
        exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets Examine applied umbraco.contour ucomponents.cms ucomponents.dates ucomponents.email ucomponents.io ucomponents.media ucomponents.members ucomponents.nodes ucomponents.random ucomponents.request ucomponents.search ucomponents.strings ucomponents.urls ucomponents.xml ">
    
    
    <xsl:output method="xml" omit-xml-declaration="yes"/>
    
    <xsl:param name="currentPage"/>
    
    <xsl:template match="/">
    <xsl:variable name="ResourceTags" select="TagsLib:getAllTagsInGroup('resources')/tags"/>
    <xsl:if test="count($ResourceTags) > 0">   
      <ul>  
        <xsl:for-each select="$ResourceTags/tag">
          <li>
            <xsl:value-of select="current()"/>
          </li>
        </xsl:for-each>
      </ul>    
    </xsl:if>
    
    </xsl:template>
    
    </xsl:stylesheet>

    And the config: 

    <?xml version="1.0" encoding="utf-8" ?>
    <XsltExtensions>
      <!-- This file is used to register 3rd party XSLT extensions (methods you can execute from XSLT, like umbraco.library:NiceUrl) -->
      <!-- <ext assembly="assemblyName" type="assemblyName.namespace.type" alias="custom" /> -->
      <ext assembly="umbraco" type="umbraco.presentation.xslt.Exslt.ExsltCommon" alias="Exslt.ExsltCommon" />
      <ext assembly="umbraco" type="umbraco.presentation.xslt.Exslt.ExsltDatesAndTimes" alias="Exslt.ExsltDatesAndTimes" />
      <ext assembly="umbraco" type="umbraco.presentation.xslt.Exslt.ExsltMath" alias="Exslt.ExsltMath" />
      <ext assembly="umbraco" type="umbraco.presentation.xslt.Exslt.ExsltRegularExpressions" alias="Exslt.ExsltRegularExpressions" />
      <ext assembly="umbraco" type="umbraco.presentation.xslt.Exslt.ExsltStrings" alias="Exslt.ExsltStrings" />
      <ext assembly="umbraco" type="umbraco.presentation.xslt.Exslt.ExsltSets" alias="Exslt.ExsltSets" />
      <ext assembly="UmbracoExamine" type="UmbracoExamine.XsltExtensions" alias="Examine" />
      <ext assembly="Applied" type="Applied.XsltHelpers" alias="applied" />
      <ext assembly="Umbraco.Forms.Core" type="Umbraco.Forms.Library" alias="umbraco.contour">
      <ext assembly="umbraco.editorControls" type="umbraco.editorControls.tags.library" alias="TagsLib" />
      <ext assembly="uComponents.XsltExtensions" type="uComponents.XsltExtensions.Strings" alias="ucomponents.strings" />
      </ext>
    
    </XsltExtensions>
    
    Thanks!
  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 04, 2015 @ 18:32
    Jan Skovgaard
    0

    Hi Ben

    Ok, seems like you need to add a namespace reference in the xslt file in the line where you see the other ones like xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" so you should add xmlns:TagsLib="urn:TagsLib" in that line somewhere as well and in the exclude-result-prefixes attribute you should add TagLib as well.

    Hope this makes sense :)

    /Jan

  • BenH 59 posts 199 karma points
    Feb 04, 2015 @ 20:16
    BenH
    0

    That did something! Got a new error: 

    System.Xml.Xsl.XslTransformException: Cannot find a script or an extension object associated with namespace 'urn:TagsLib'. 
    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 System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer) 
    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)
  • Biagio Paruolo 1618 posts 1910 karma points c-trib
    Feb 04, 2015 @ 20:30
    Biagio Paruolo
    0

    Hi, Ben,

    I'll search into the code of an old website that I port to the last version of U6 branch.

Please Sign in or register to post replies

Write your reply to:

Draft