Get file extention in XSLT
When working with data view web parts or data form web parts in SharePoint, you might want to use some conditional formatting or branching logic, based on the file extention of your SharePoint item.
This xsl template returns the file extention from an URL:
|
<!-- Determine File Extention template --> <xsl:template <xsl:param <xsl:choose> <xsl:when <xsl:call-template <xsl:with-param </xsl:call-template> </xsl:when> <xsl:when <xsl:call-template <xsl:with-param </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of </xsl:otherwise> </xsl:choose> </xsl:template> |
It runs recursively through the parameter "path" and returns the extention.
You can call and use it like this:
|
<xsl:variable <xsl:call-template <xsl:with-param </xsl:call-template> </xsl:variable> <!-- example use in branching logic --> <xsl:choose> <xsl:when <!-- add your logic --> </xsl:when> </xsl:choose> |
From: http://morg.nl/2012/02/get-file-extention-in-xslt/
Get file extention in XSLT的更多相关文章
- 十三、File Translator怎么写
---恢复内容开始--- 1. File Translator可以将信息从maya中导入和导出. 2. 创建一个file translator需要从MPxFileTranslator继承. 3. 函数 ...
- xslt 和一个demo
https://www.w3.org/1999/XSL/Transform Specifications The XSLT language has three versions which are ...
- xslt转换xml
实现json--> xml --(xlst)--> xml pom依赖 <dependency> <groupId>net.sf.json-lib</grou ...
- Using XSLT and Open XML to Create a Word 2007 Document
Summary: Learn how to transform XML data into a Word 2007 document by starting with an existing docu ...
- 类handler
/** The handler class is the interface for dynamically loadable storage engines. Do not add ifdefs a ...
- 最佳vim技巧
最佳vim技巧----------------------------------------# 信息来源----------------------------------------www.vim ...
- IOS UTI统一类型标识符:判断文件类型通过后缀
今天在学习文档和数据共享中,首先讲的处理统一类型标识符UTI.第一次见,所以记下来以备之用,首先了解UTI和MIME的概念 1.同一类型标识符(Uniform Type Identifier,UTI) ...
- 经典弹出层Colorbox - a jQuery lightbox
Colorbox - a jQuery lightbox A lightweight customizable lightbox plugin for jQuery Fork me on GitHub ...
- [Node.js]Path模块
摘要 path模块提供了一些处理文件路径问题的工具. path模块 引入模块 var path=require("path"); 方法 1 path.normalize(p)规范化 ...
随机推荐
- http://www.liangxiansen.cn/2017/04/06/consul/
Consul 使用手册 | 一个梦 http://www.liangxiansen.cn/2017/04/06/consul/ 基于Consul的分布式锁实现 https://mp.weixin.qq ...
- ubuntu下msmtp+mutt的安装和配置
1.mutt+msmtp的安装 默认情况下smokeping发送邮件使用sendmail,但是sendmail配置起来真心不是一般的麻烦,而且也没有必要,完全大材小用了,所以我就想用mutt+msmt ...
- ArcGIS Desktop水文计算
根据DEM数据,可以做流域.流向.等级河流划分. 网络资源的方位位置: , Click here to visit. 一.一些概念 二.水文分析工具集概念
- ibatis.net:第六天,QueryForList
xml <statement id="FindOrdersByCustomer" parameterClass="string" resultClass= ...
- python测试开发django-39.xadmin详情页面布局form_layout
前言 xadmin的详情页面默认是一行展示一个字段,可以使用form_layout对详情页面的布局重新设计. 可以设置必填和非必填字段,也可以设置不显示,不可以编辑的字段. models模块 先在mo ...
- UITextField的简易封装
UITextField的简易封装 效果 源码 https://github.com/YouXianMing/UI-Component-Collection 中的 UITextFieldView // ...
- Android工具类 DateUtil,可以用它方便的进行日期的操作
本文转载自:http://blog.csdn.net/xuduzhoud/article/details/27526177 全部代码如下: DateUtil.java package com.exam ...
- [转]你如何面对—LNMP高并发时502
From : http://www.topthink.com/topic/5683.html 之前php-fpm配置: 单个php-fpm实例,使用socket方式,内存8G 静态方式,启动php-f ...
- [转]五种常见的 PHP 设计模式
FROM : http://www.ibm.com/developerworks/cn/opensource/os-php-designptrns/ 设计模式 一书将设计模式引入软件社区,该书的作者是 ...
- img设置默认图片最简单的解决方法
<img src='图片的路径' onerror='this.src="如果图片不存在,则使用该图片"' 这个解决方法除了简单外,还有一个优点. 就是当你不知道图片是否存在, ...