Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The Key of the Keyword is not stored in the link (which really only contains the minimal information needed to look up the Keyword). So you'll have to load the Keyword and read it from there. </p> <p>Yoav showed how to read other items from within your XSLT here:</p> <p><a href="http://yoavniran.wordpress.com/2009/07/11/implementing-the-xslt-mediator-part-1/" rel="nofollow">http://yoavniran.wordpress.com/2009/07/11/implementing-the-xslt-mediator-part-1/</a></p> <p>This snippet seems relevant:</p> <pre><code>&lt;xsl:attribute name="alt"&gt; &lt;xsl:value-of select="document(simple:image/@xlink:href)/tcm:Component/tcm:Data/tcm:Metadata/image:Metadata/image:altText"/&gt; &lt;/xsl:attribute&gt; </code></pre> <p>So the <code>document()</code> call loads the linked item (in this case a multimedia component) and the rest of the <code>select</code> then finds the value they are looking for.</p> <p>A keyword XML looks like this:</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;tcm:Keyword xmlns:transform-ext="urn:tridion:transform-ext" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:tcm="http://www.tridion.com/ContentManager/5.0" IsEditable="false" ID="tcm:1-233-1024"&gt; &lt;tcm:Context&gt; &lt;tcm:Publication xlink:title="000 Parent Publication" xlink:href="tcm:0-1-1" xlink:type="simple"/&gt; &lt;tcm:OrganizationalItem xlink:title="Places" xlink:href="tcm:1-37-512" xlink:type="simple"/&gt; &lt;/tcm:Context&gt; &lt;tcm:Info&gt; &lt;tcm:LocationInfo&gt; &lt;tcm:WebDAVURL&gt;/webdav/000%20Parent%20Publication/Places/New%20Keyword.tkw&lt;/tcm:WebDAVURL&gt; &lt;tcm:Path&gt;\000 Parent Publication\Places&lt;/tcm:Path&gt; &lt;/tcm:LocationInfo&gt; &lt;tcm:BluePrintInfo&gt; &lt;tcm:OwningPublication xlink:title="000 Parent Publication" xlink:href="tcm:0-1-1" xlink:type="simple"/&gt; &lt;tcm:IsShared&gt;false&lt;/tcm:IsShared&gt; &lt;tcm:IsLocalized&gt;false&lt;/tcm:IsLocalized&gt; &lt;/tcm:BluePrintInfo&gt; &lt;tcm:VersionInfo&gt; &lt;tcm:CreationDate&gt;2012-06-11T09:09:03&lt;/tcm:CreationDate&gt; &lt;tcm:RevisionDate&gt;2012-06-11T09:09:03&lt;/tcm:RevisionDate&gt; &lt;tcm:Creator xlink:title="TCMHOSTNAME\Administrator" xlink:href="tcm:0-11-65552" xlink:type="simple"/&gt; &lt;/tcm:VersionInfo&gt; &lt;tcm:AllowedActions&gt; &lt;tcm:Actions Managed="0" Deny="96" Allow="268560384"/&gt; &lt;/tcm:AllowedActions&gt; &lt;/tcm:Info&gt; &lt;tcm:Data&gt; &lt;tcm:Title&gt;New Keyword&lt;/tcm:Title&gt; &lt;tcm:Description&gt;New Keyword&lt;/tcm:Description&gt; &lt;tcm:Key&gt;Key&lt;/tcm:Key&gt; &lt;tcm:IsAbstract&gt;false&lt;/tcm:IsAbstract&gt; &lt;tcm:ParentKeywords/&gt; &lt;tcm:RelatedKeywords/&gt; &lt;tcm:MetadataSchema xlink:title="" xlink:href="tcm:0-0-0" xlink:type="simple"/&gt; &lt;tcm:Metadata/&gt; &lt;tcm:IsRoot&gt;true&lt;/tcm:IsRoot&gt; &lt;/tcm:Data&gt; &lt;/tcm:Keyword&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload