Copied to clipboard

Flag this post as spam?

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


  • Jacques S. 5 posts 25 karma points
    May 31, 2010 @ 15:34
    Jacques S.
    0

    recursive nice URL

    I'm pretty new to xslt and I'm trying to get the "NiceUrl" from a node, defined on a parent page. Here's how I thought doing it:

    1. To get a reference to the link on the parent page, one would use:
      <xsl:variable name="homelink" select="$currentPage/ancestor-or-self::node [string(data[@alias='homelink'])!=''] [position()=1] /data[@alias='homelink']"/>
    2. To convert a link from a "content picker" datatype to a real link, one would use:
      <xsl:variable name="whatlink" select="umbraco.library:NiceUrl($currentPage/data[@alias='whatlink'])"/>
    3. Now I want to combine both: get the real URL pointing to a "content-picker" datatype from a parent page. Hence I thought combining both items above into the following:
      <xsl:variable name="testlink" select="umbraco.library:NiceUrl($currentPage/ancestor-or-self::node [string(data[@alias='homelink'])!=''] [position()=1] /data[@alias='homelink'])"/>

    When trying to save this last "testlink" I only get the following error messages:

    (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, Boolean closeWriter)
    at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results)
    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)

     

    Wha

  • Jacques S. 5 posts 25 karma points
    May 31, 2010 @ 15:46
  • 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