Skip to Content
avatar image
Former Member

RID/getAccessLink() in WPC of KM link

Hello everybody,

I need to show on a news file the link of a xml file made with WPC to itself.

I used this code, which works perfect:

         <xsl:if test="@type='relatedLinks'">
           	<div>Reed more:<a>
              	  	<xsl:attribute name="href">
              	  		<xsl:value-of disable-output-escaping="yes" select="wpc:getAccessLink(string(@rid), string(/document/@locale))"/>
              	  	</xsl:attribute>
		       <xsl:value-of disable-output-escaping="yes" select="@title"/>
			</a></div>
		    
	    </xsl:if>

And the result is a nice text with this link:

http://xxxxxxx:50000/irj/servlet/prt/portal/prtroot/docs/guid/2052d9da-e059-2b10-1788-c14c4d260688

So, I tought that I could you the same logic for another text, and I wrote this:

		<a>
			<xsl:attribute name="href">
            	<xsl:value-of disable-output-escaping="yes" select="wpc:getAccessLink(string(@rid), string(/document/@locale))"/>
             </xsl:attribute>
			<xsl:value-of disable-output-escaping="yes" select="document/elements/element[@type='title']" />		</a>

		<xsl:if test="document/properties/property[@type='displayNewIcon']/@value='true'">
			<span class="new" valign="top"><xsl:value-of disable-output-escaping="yes" select="wpc:getString('xsl.xmsg.new', string(document/@locale))"/></span>
		</xsl:if>

The problem is that the link is not complete, it shows only the first part, like this:

http://xxxxxxx:50000/irj/servlet/prt/portal/prtroot/ ...????

Both logics are written in the same .xsl file I use for the layout of a Web form I did with [this guide|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2041eb17-6001-2b10-b08d-b95ce55fa9b7]

Could someone please help me?

Thanks!

Demis

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Sep 01, 2008 at 11:43 AM

    Unrelated to your question, but anyway: the use of disable-output-escaping is wrong here, it (may) prevent XSLT from escaping values properly.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 25, 2008 at 03:52 PM

    Hi,

    I've seen your code, and I have copied and tested it.

    Unfortunately my getAccessLink() return me a empty value.

    Do you know why ?

    regards

    Add comment
    10|10000 characters needed characters exceeded