Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How can I render a custom field type with XSLT. I want to render in the same manner like I do with this CAML

<RenderPattern Name="DisplayPattern">
    <Switch>
    <Expr>
        <Column/>
    </Expr>
    <Case Value="" />
    <Default>
        <Column SubColumnNumber="0" HTMLEncode="TRUE"/>
        <HTML><![CDATA[, nr.&nbsp;]]></HTML>
        <Column SubColumnNumber="1" HTMLEncode="TRUE"/>
        <HTML><![CDATA[<br/>Bloc&nbsp;]]></HTML>
        <Column SubColumnNumber="2" HTMLEncode="TRUE"/>
        <HTML><![CDATA[,&nbsp;Etaj&nbsp;]]></HTML>
        <Column SubColumnNumber="3" HTMLEncode="TRUE"/>
        <HTML><![CDATA[,&nbsp;Sc.&nbsp;]]></HTML>
        <Column SubColumnNumber="4" HTMLEncode="TRUE"/>
        <HTML><![CDATA[,&nbsp;Ap.&nbsp;]]></HTML>
        <Column SubColumnNumber="5" HTMLEncode="TRUE"/>
        <HTML><![CDATA[<br/>]]></HTML>
        <Column SubColumnNumber="6" HTMLEncode="TRUE"/>
        <HTML><![CDATA[,&nbsp;Jud/Sec&nbsp;]]></HTML>
        <Column SubColumnNumber="7" HTMLEncode="TRUE"/>
        <HTML><![CDATA[&nbsp;]]></HTML>
        <Column SubColumnNumber="8" HTMLEncode="TRUE"/>
    </Default>
  </Switch>
</RenderPattern>

I've tried with an XSL file like this

<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" 
            xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" 
            version="1.0"
            exclude-result-prefixes="xsl msxsl ddwrt" 
            xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
            xmlns:asp="http://schemas.microsoft.com/ASPNET/20" 
            xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer"
            xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
            xmlns:msxsl="urn:schemas-microsoft-com:xslt"
            xmlns:SharePoint="Microsoft.SharePoint.WebControls" 
            xmlns:ddwrt2="urn:frontpage:internal" ddwrt:oob="true">
<xsl:output method="html" indent="no"/>
<xsl:template match="FieldRef[@FieldType='AdresaField']" mode="Note_body">
<xsl:param name="thisNode" select="." />
<xsl:variable name="curElement" select="current()" />
<xsl:variable name="fldVal">
  <xsl:value-of select="$thisNode/@*[name()=$curElement/@Name]"/>
</xsl:variable>
<xsl:value-of select="substring($fldVal, 1, 3)"/> - Just to show it's working. Here I don't know how to do
</xsl:template>
</xsl:stylesheet>

Thank's

share|improve this question

1 Answer 1

up vote 1 down vote accepted

is the following link useful for you? http://www.intheknow.it/customxsltfieldrendering.ashx

share|improve this answer
    
Whilst this may theoretically answer the question, we prefer inclusion of the essential parts of the answer here, and to provide the link for reference. –  Alex Angas Jul 10 '11 at 0:08
    
This is the link which I read before posting here. –  user3145 Jul 11 '11 at 11:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.