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)规范化 ...
随机推荐
- STM32F103ZET6 用定时器级联方式输出特定数目的PWM
STM32F103ZET6 用定时器级联方式输出特定数目的PWM STM32F103ZET6里共有8个定时器,其中高级定时器有TIM1-TIM5.TIM8,共6个. 这里需要使用定时器的级联功能,ST ...
- 淘宝接口 TopAPi
演示一下调用淘宝的接口,让大家心里有个数, 很简单,新建一个工程,拖一个IDHttp,Button和Memo到窗体上去 然后在这个Button的OnClick事件中写入如下代码: [delphi] v ...
- msgpack的数据序列和还原
msgpack的数据序列和还原 msgpack不仅可以序列一些常规的数据类型的数据,比如:string.datetime.integer...... 还能序列olevariant.stream 这就非 ...
- Xcode工程文件打不开:cannot be opened because the project file cannot be parsed
svn更新代码后,打开xcode工程文件,会出现 xxx..xcodeproj cannot be opened because the project file cannot be parsed ...
- C#编程(七十二)----------DynamicObject和ExpandoObject
DynamicObject和ExpandoObject 1.ExpandoObject表示一个对象,该对象包含可在运行时动态添加和移除的成员.这个类和动态类型有关,这个类能做些什么? 案例: //Ex ...
- C#编程(十六)----------匿名类型
匿名类型 var和new关键字一起使用,可以创建匿名类型. 匿名类型提供了一种方便的方法,可用来将一组只读属性封装到单个对象中,而无需首先显式定义一个类型. 类型名由编译器生成,并且不能在源代码级使用 ...
- java List转换为字符串并加入分隔符的一些方法总结
方法一: public String listToString(List list, char separator) { StringBuilder sb = new StringBuilder(); ...
- 使用devenv.exe自动编译项目
因为手游项目使用的是cocos2d-x lua进行开发,在打PC版本提交测试时,有一些环境配置的地方需要进行改动,出包的时候比较麻烦,先修改文件再生成.如果能自动打包,每次打包之前将需要修改的文件进行 ...
- ImageView和onTouchListener实现,点击查看图片细节
这是来自疯狂android讲义上的例子,其实没啥意思.就是用监听器获取到手指的坐标,然后根据这个坐标开始绘制一个图片.(这里的绘制方式有些问题,所以凑合看看吧.) 首先,还是布局文件(两个ImageV ...
- 深度学习在推断阶段(inference)的硬件实现方法概述
推断(Inference),就是深度学习把从训练中学习到的能力应用到工作中去. 精心调整权值之后的神经网络基本上就是个笨重.巨大的数据库.为了充分利用训练的结果,完成现实社会的任务,我们需要的是一个能 ...