Re: Mapping

#25617

You need to use an extension Xml file to specify the external assembly:
I created this assembly:
namespace Map.ExternalAssembly
{
public class Functions
{
public
static string GetValue(string value)
{
return value;
}
}
}

Create an Xml file called mapextensions.xml:
<ExtensionObjects>
<
ExtensionObject Namespace=urn:external:assembly:functions AssemblyName=Map.ExternalAssembly, Map.ExternalAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8c009a5582cccc7e ClassName=Map.ExternalAssembly.Functions />
</
ExtensionObjects>
In your map click on the grid and set Custom Extension XML property to point at this xml file.

Then in your Xslt template code:

<xsl:template name=”MyTemplate” xmlns:Functions=”urn:external:assembly:functions”>
    <xsl:element name=”ModifiedOutput”>
        <xs:value-of select=”Functions:GetValue(/some/xpath)” />
    </xsl:element>
</xsl:template>

The namespace prefix Functions is used to establish the namespace “urn:external:assembly:functions” which is used to find the class from the extensions xml file. You can chose your own prefix and namespace as long as the namespace matchs between the xslt and the extension xml file.