wix xslt for adding node
Using xslt to add new node item to wix source code.
Original wix code:
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Component Guid="*" Id="Test.txt">
<File KeyPath="yes" Source="$(var.TestFolder)\Test.txt" Id="Test.txt" />
</Component>
</DirectoryRef>
</Fragment>
Add <CopyFile /> node inside <File> node, the expected wix code would be:
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Component Guid="*" Id="Test.txt">
<File KeyPath="yes" Source="$(var.TestFolder)\Test.txt" Id="Test.txt" >
<CopyFile Id ="Test.txt" DestinationProperty="BinFolder" DestinationName="test.txt" />
</File>
</Component>
</DirectoryRef>
</Fragment>
Pass this xslt to heat.exe with -t option should do the work:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wi="http://schemas.microsoft.com/wix/2006/wi" exclude-result-prefixes="wi">
<xsl:output method="xml" indent="yes"/> <xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template> <xsl:template match="wi:File">
<xsl:copy>
<xsl:variable name="leadingSpace" select="preceding-sibling::text()[1]" />
<xsl:apply-templates select="@*"/>
<!-- Add linebreak and indentation, as requested in the comments -->
<xsl:value-of select="concat($leadingSpace, ' ')" />
<CopyFile xmlns="http://schemas.microsoft.com/wix/2006/wi" Id="Test.txt" DestinationProperty="BinFolder" DestinationName="test.txt"/>
<!-- Linebreak and indentation -->
<xsl:value-of select="$leadingSpace"/>
</xsl:copy>
</xsl:template> </xsl:stylesheet>
wix xslt for adding node的更多相关文章
- 在openshift上自定义node.js的版本
https://github.com/ramr/nodejs-custom-version-openshift 由于是线上服务器,一步一步来: 先把上面的工程拉下来,覆盖到初始化的工程里,提交,让服务 ...
- 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 ...
- redis 学习笔记(6)-cluster集群搭建
上次写redis的学习笔记还是2014年,一转眼已经快2年过去了,在段时间里,redis最大的变化之一就是cluster功能的正式发布,以前要搞redis集群,得借助一致性hash来自己搞shardi ...
- Redis集群研究和实践(基于redis 3.0.5)
前言 redis 是我们目前大规模使用的缓存中间件,由于它强大高效而又便捷的功能,得到了广泛的使用.现在的2.x的稳定版本是2.8.19,也是我们项目中普遍用到的版本. redis在年初发布了3.0. ...
- 分布式缓存技术redis学习系列(四)——redis高级应用(集群搭建、集群分区原理、集群操作)
本文是redis学习系列的第四篇,前面我们学习了redis的数据结构和一些高级特性,点击下面链接可回看 <详细讲解redis数据结构(内存模型)以及常用命令> <redis高级应用( ...
- ocfs2: 搭建环境
OCFS2是基于共享磁盘的集群文件系统,它在一块共享磁盘上创建OCFS2文件系统,让集群中的其它节点可以对磁盘进行读写操作.OCFS2由两部分内容构成,一部分实现文件系统功能,位于VFS之下和Ext4 ...
- redis集群配置
客户端分片 程序端实现 代理proxy,访问proxy,proxy指定redis保存位置. Twemproxy Redis cluster ,会造成一部分数据丢失,无中心化1.将数据自动切分(spli ...
- memcache的一致性hash算法使用
一.概述 1.我们的memcache客户端(这里我看的spymemcache的源码),使用了一致性hash算法ketama进行数据存储节点的选择.与常规的hash算法思路不同,只是对我们要存储数据的k ...
- redis3.0 集群实战2 - 集群功能实战
1 集群基本操作 1.1 查看当前集群状态 使用redis-trib.rb check功能查看对应的节点的状态: [root@bogon bin]# ./redis-trib.rb check 1 ...
随机推荐
- MySQL优化---DBA对MySQL优化的一些总结
非原创, 来自梦嘉朋友, 非常好的总结, 一起学习. ------------------------------------------------- 1. 要确保有足够的内存数据库能够高效的运 ...
- Ubantu下FTP服务器资源进行控制
在FTP服务器的管理中无论对本地用户还是匿名用户,对于FTP服务器资源的使用都需要进行控控制, 避免由于负担过大造成FTP服务器运行异常, 可以添加以下配置项对FTP客户机使用FTP服务器资源进行控制 ...
- 海量数据处理算法—Bit-Map
原文:http://blog.csdn.net/hguisu/article/details/7880288 1. Bit Map算法简介 来自于<编程珠玑>.所谓的Bit-map就是用一 ...
- 关于Android中TextView显示多个空格
一.直接填写文字,输入多少,显示多少,如下: android:text="AAA AAA" ————————>显示:AAA AAA 二.通过设置str ...
- Python Counter()计数工具
Table of Contents 1. class collections.Counter([iterable-or-mapping]) 1.1. 例子 1.2. 使用实例 2. To Be Con ...
- Ultra Edit常用正则表达式
一.怎样可以删除包含特殊字符的行? 你可以用正则表示式全部替换命令替换行中包含的字符.要执行这个操作,你应该先进行查找: 查找: %*YOUR STRING*^p 替换为: (随便什么文字) 帮助文件 ...
- [课程相关]homework-06
一.c++11 lambda /* * File: main.cpp * Author: liangjie * * Created on 2013年11月23日, 下午12:02 */ #includ ...
- oracle-SQL语言基础-事务控制命令命令
事务控制命令命令 COMMITROLLBACKSAVEPOINTSET TRANSACTION 当第一条可执行的SQL语句开始执行,数据库事务就开始.随着下面任一事件发生,数据库事务结束:执行COMM ...
- oracle查看允许的最大连接数和当前连接数等信息
目前总结的语句,在查看数据的连接情况很有用 ,写完程序一边测试代码一边查看数据库连接的释放情况有助于分析优化出一个健壮的系统程序来. 1.Sql代码1.select count(*) from v$p ...
- SSH客户端
Windows: winSCP SecureCRT Ubuntu: SecureCRT:安装方法http://www.phperstar.com/post/323