Edit C:\Windows\Microsoft.NET\Framework\v3.5\zh-CHS\Microsoft.Build.Tasks.v3.5.resources.dll
MZ? ?? ? @ ? ? ? ?!?L?!This program cannot be run in DOS mode. $ PE L D?Q ? ! 0 ^B ` @ ? >? @ B K ` ? ? H .text d" 0 `.rsrc ? ` @ @ @.reloc ? P @ B @B H \= ? P ? ?< ? * <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" xmlns:b="http://schemas.microsoft.com/developer/2004/01/bootstrapper" version="1.0"> <xsl:variable name="newline"> <xsl:text>%NEWLINE%</xsl:text> </xsl:variable> <xsl:output method="text"/> <xsl:template match="Configuration"> <xsl:apply-templates/> </xsl:template> <xsl:template match="b:Package"> <xsl:call-template name="object"> <xsl:with-param name="name" select="local-name()"/> <xsl:with-param name="attributes" select="@*[local-name()='Name' or local-name()='LicenseAgreement' or local-name()='PackageCode']"/> </xsl:call-template> </xsl:template> <xsl:template match="*"> <xsl:param name="indent"/> <xsl:call-template name="object"> <xsl:with-param name="name" select="local-name()"/> <xsl:with-param name="attributes" select="@*"/> <xsl:with-param name="indent" select="$indent"/> </xsl:call-template> </xsl:template> <xsl:template match="b:PackageFile"> <xsl:param name="indent"/> <xsl:call-template name="object"> <xsl:with-param name="name" select="local-name()"/> <xsl:with-param name="attributes" select="@*[local-name()='Name' or local-name()='Size' or local-name()='Hash' or local-name()='HomeSite' or local-name()='PublicKey']"/> <xsl:with-param name="indent" select="$indent"/> </xsl:call-template> </xsl:template> <xsl:template match="b:Dependencies"/> <xsl:template match="b:Overrides"/> <xsl:template name="object"> <xsl:param name="name"/> <xsl:param name="attributes"/> <xsl:param name="indent"/> <xsl:value-of select="$indent"/> <xsl:text>Begin </xsl:text> <xsl:value-of select="$name"/> <xsl:value-of select="$newline"/> <xsl:apply-templates select="$attributes"><xsl:with-param name="indent" select="concat($indent, '	')"/></xsl:apply-templates> <xsl:apply-templates select="child::*"><xsl:with-param name="indent" select="concat($indent, '	')"/></xsl:apply-templates> <xsl:value-of select="$indent"/> <xsl:text>End </xsl:text> <xsl:value-of select="$name"/> <xsl:value-of select="$newline"/> </xsl:template> <xsl:template match="@*"> <xsl:param name="indent"/> <xsl:value-of select="$indent"/> <xsl:value-of select="local-name()"/> <xsl:text>="</xsl:text> <xsl:value-of select="."/> <xsl:text>"</xsl:text> <xsl:value-of select="$newline"/> </xsl:template> </xsl:stylesheet>A <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" version="1.0"> <xsl:output method="xml" encoding="utf-8" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:param name="trust-file"/> <xsl:variable name="trust" select="document($trust-file)"/> <xsl:template match="AssemblyManifest"> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" > <xsl:apply-templates select="AssemblyIdentity" mode="v1"/> <xsl:call-template name="assembly-manifest"/> <xsl:apply-templates select="AssemblyReferences/AssemblyReference"/> <xsl:apply-templates select="FileReferences/FileReference"/> <xsl:apply-templates select="ExternalProxyStubs/ProxyStub" mode="external"/> </assembly> </xsl:template> <xsl:template match="ApplicationManifest[@IsClickOnceManifest='false']"> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" > <xsl:apply-templates select="AssemblyIdentity" mode="v1"/> <xsl:call-template name="assembly-manifest"/> <!-- Application Trust --> <xsl:if test="$trust"> <xsl:copy-of select="$trust"/> </xsl:if> <xsl:apply-templates select="AssemblyReferences/AssemblyReference"/> <xsl:apply-templates select="FileReferences/FileReference"/> <xsl:apply-templates select="ExternalProxyStubs/ProxyStub" mode="external"/> </assembly> </xsl:template> <xsl:template match="ApplicationManifest[@IsClickOnceManifest='true']"> <asmv1:assembly xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" > <xsl:apply-templates select="AssemblyIdentity" mode="winxp-hack"/> <xsl:call-template name="application-manifest"/> <xsl:apply-templates select="AssemblyReferences/AssemblyReference"/> <xsl:apply-templates select="FileReferences/FileReference"/> <xsl:apply-templates select="FileAssociations/FileAssociation"/> <xsl:apply-templates select="ExternalProxyStubs/ProxyStub" mode="external"/> </asmv1:assembly> </xsl:template> <xsl:template match="DeployManifest"> <asmv1:assembly xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" > <xsl:apply-templates select="AssemblyIdentity" mode="v1"/> <xsl:call-template name="deploy-manifest"/> <xsl:for-each select="AssemblyReferences/AssemblyReference"> <!-- expecting only one match --> <xsl:call-template name="application-reference"/> </xsl:for-each> <xsl:apply-templates select="FileReferences/FileReference"/> </asmv1:assembly> </xsl:template> <xsl:attribute-set name="identity-attributes"> <xsl:attribute name="name"><xsl:value-of select="@Name"/></xsl:attribute> <xsl:attribute name="version"><xsl:value-of select="@Version"/></xsl:attribute> <xsl:attribute name="publicKeyToken"><xsl:value-of select="@PublicKeyToken"/></xsl:attribute> <xsl:attribute name="language"><xsl:value-of select="@Culture"/></xsl:attribute> <xsl:attribute name="processorArchitecture"><xsl:value-of select="@ProcessorArchitecture"/></xsl:attribute> <xsl:attribute name="type"><xsl:value-of select="@Type"/></xsl:attribute> </xsl:attribute-set> <!-- WinXP & Win2K3 requires this element to be declared with the asmv1 qualifier. Setting the default namespace will not work! This is a quirk of the native loader on downlevel OS. --> <xsl:template match="AssemblyIdentity" mode="winxp-hack"> <xsl:element name="asmv1:assemblyIdentity" use-attribute-sets="identity-attributes"/> </xsl:template> <xsl:template match="AssemblyIdentity" mode="v1"> <xsl:element name="assemblyIdentity" use-attribute-sets="identity-attributes" namespace="urn:schemas-microsoft-com:asm.v1"/> </xsl:template> <xsl:template match="AssemblyIdentity" mode="v2"> <xsl:element name="assemblyIdentity" use-attribute-sets="identity-attributes" namespace="urn:schemas-microsoft-com:asm.v2"/> </xsl:template> <xsl:template match="EntryPointIdentity"> <xsl:element name="assemblyIdentity" use-attribute-sets="identity-attributes" namespace="urn:schemas-microsoft-com:asm.v2"/> </xsl:template> <xsl:template name="assembly-manifest"> <xsl:if test="string-length(@Description)>0"> <description> <xsl:value-of select="@Description"/> </description> </xsl:if> </xsl:template> <xsl:template name="application-manifest"> <!-- Description --> <xsl:if test="string-length(@Description)>0 or string-length(@IconFile)>0 or string-length(@Publisher)>0 or string-length(@Product)>0 or string-length(@SupportUrl)>0 or string-length(@SuiteName)>0 or string-length(@ErrorReportUrl)>0"> <description asmv2:iconFile="{@IconFile}" asmv2:publisher="{@Publisher}" co.v1:suiteName="{@SuiteName}" asmv2:product="{@Product}" asmv2:supportUrl="{@SupportUrl}" co.v1:errorReportUrl="{@ErrorReportUrl}"> <xsl:value-of select="@Description"/> </description> </xsl:if> <application xmlns="urn:schemas-microsoft-com:asm.v2"/> <!-- Application Startup --> <xsl:choose> <xsl:when test="EntryPointIdentity"> <entryPoint xmlns="urn:schemas-microsoft-com:asm.v2"> <xsl:apply-templates select="EntryPointIdentity"/> <commandLine file="{@EntryPointPath}" parameters="{@EntryPointParameters}" /> <xsl:if test="@HostInBrowser='true'"> <hostInBrowser xmlns="urn:schemas-microsoft-com:asm.v3"/> </xsl:if> </entryPoint> </xsl:when> <xsl:when test="@HostInBrowser='true'"> <entryPoint xmlns="urn:schemas-microsoft-com:asm.v2"> <xsl:if test="@HostInBrowser='true'"> <hostInBrowser xmlns="urn:schemas-microsoft-com:asm.v3"/> </xsl:if> </entryPoint> </xsl:when> <xsl:otherwise> <entryPoint xmlns="urn:schemas-microsoft-com:asm.v2"> <co.v1:customHostSpecified /> </entryPoint> </xsl:otherwise> </xsl:choose> <!-- Manifest Trust --> <xsl:if test="@UseApplicationTrust='true'"> <co.v1:useManifestForTrust /> </xsl:if> <!-- Application Trust --> <xsl:if test="$trust"> <xsl:copy-of select="$trust"/> </xsl:if> <!-- OS dependency --> <xsl:if test="string-length(@OSMajor)>0"> <dependency xmlns="urn:schemas-microsoft-com:asm.v2"> <dependentOS supportUrl="{@OSSupportUrl}" description="{@OSDescription}"> <osVersionInfo> <os majorVersion="{@OSMajor}" minorVersion="{@OSMinor}" buildNumber="{@OSBuild}" servicePackMajor="{@OSRevision}"/> </osVersionInfo> </dependentOS> </dependency> </xsl:if> </xsl:template> <xsl:template name="deploy-manifest"> <!-- Description --> <description xmlns="urn:schemas-microsoft-com:asm.v1" asmv2:publisher="{@Publisher}" co.v1:suiteName="{@SuiteName}" asmv2:product="{@Product}" asmv2:supportUrl="{@SupportUrl}" co.v1:errorReportUrl="{@ErrorReportUrl}" > <xsl:value-of select="@Description"/> </description> <!-- Application Updates --> <deployment xmlns="urn:schemas-microsoft-com:asm.v2" install="{@Install}" disallowUrlActivation="{@DisallowUrlActivation}" mapFileExtensions="{@MapFileExtensions}" minimumRequiredVersion="{@MinimumRequiredVersion}" trustURLParameters="{@TrustUrlParameters}" co.v1:createDesktopShortcut="{@CreateDesktopShortcut}" > <xsl:if test="@Install='true' and @UpdateEnabled='true'"> <subscription> <update> <xsl:choose> <xsl:when test="@UpdateMode='Foreground'"> <beforeApplicationStartup/> </xsl:when> <xsl:otherwise> <expiration maximumAge="{@UpdateInterval}" unit="{@UpdateUnit}"/> </xsl:otherwise> </xsl:choose> </update> </subscription> </xsl:if> <xsl:if test="string-length(@DeploymentUrl)>0"> <deploymentProvider codebase="{@DeploymentUrl}"/> </xsl:if> </deployment> </xsl:template> <!-- This is the <dependency> element for referencing the ApplicationManifest (.exe.manifest) from the DeployManifest (.application) --> <xsl:template name="application-reference"> <dependency xmlns="urn:schemas-microsoft-com:asm.v2"> <dependentAssembly dependencyType="install" codebase="{@Path}" size="{@Size}" > <xsl:apply-templates select="AssemblyIdentity" mode="v2"/> <xsl:call-template name="hash"> <xsl:with-param name="value"><xsl:value-of select="@Hash"/></xsl:with-param> </xsl:call-template> </dependentAssembly> </dependency> </xsl:template> <!-- Must put native <dependency> elements in the asmv1 namespace --> <xsl:template match="AssemblyReference[@IsNative='true' and @IsPrerequisite='false']"> <dependency optional="{@IsOptional}" xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly asmv2:dependencyType="install" asmv2:codebase="{@Path}" asmv2:size="{@Size}" asmv2:group="{@Group}" > <xsl:apply-templates select="AssemblyIdentity" mode="v1"/> <xsl:call-template name="hash"> <xsl:with-param name="value"><xsl:value-of select="@Hash"/></xsl:with-param> </xsl:call-template> </dependentAssembly> </dependency> </xsl:template> <xsl:template match="AssemblyReference[@IsNative='true' and @IsPrerequisite='true']"> <dependency xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly asmv2:dependencyType="preRequisite" > <xsl:apply-templates select="AssemblyIdentity" mode="v1"/> </dependentAssembly> </dependency> </xsl:template> <!-- Other <dependency> elements go in the asmv2 namespace --> <xsl:template match="AssemblyReference[@IsNative='false' and @IsPrerequisite='false']"> <dependency optional="{@IsOptional}" xmlns="urn:schemas-microsoft-com:asm.v2"> <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="{@Path}" size="{@Size}" group="{@Group}" > <xsl:apply-templates select="AssemblyIdentity" mode="v2"/> <xsl:call-template name="hash"> <xsl:with-param name="value"><xsl:value-of select="@Hash"/></xsl:with-param> </xsl:call-template> </dependentAssembly> </dependency> </xsl:template> <xsl:template match="AssemblyReference[@IsNative='false' and @IsPrerequisite='true']"> <dependency xmlns="urn:schemas-microsoft-com:asm.v2"> <dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true" > <xsl:apply-templates select="AssemblyIdentity" mode="v2"/> </dependentAssembly> </dependency> </xsl:template> <xsl:template match="FileReference[not(ComClasses or WindowClasses)]"> <file xmlns="urn:schemas-microsoft-com:asm.v2" name="{@Path}" size="{@Size}" group="{@Group}" optional="{@IsOptional}" writeableType="{@WriteableType}" > <xsl:call-template name="hash"> <xsl:with-param name="value"><xsl:value-of select="@Hash"/></xsl:with-param> </xsl:call-template> </file> </xsl:template> <xsl:template match="FileReference[ComClasses or WindowClasses]"> <file xmlns="urn:schemas-microsoft-com:asm.v1" name="{@Path}" asmv2:size="{@Size}" asmv2:group="{@Group}" asmv2:optional="{@IsOptional}" asmv2:writeableType="{@WriteableType}" > <xsl:call-template name="hash"> <xsl:with-param name="value"><xsl:value-of select="@Hash"/></xsl:with-param> </xsl:call-template> <xsl:call-template name="isolation"/> </file> </xsl:template> <xsl:template name="hash"> <xsl:param name="value"/> <xsl:if test="$value and string-length($value)>0"> <hash xmlns="urn:schemas-microsoft-com:asm.v2"> <dsig:Transforms> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"/> </dsig:Transforms> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <dsig:DigestValue><xsl:value-of select="$value"/></dsig:DigestValue> </hash> </xsl:if> </xsl:template> <xsl:template name="isolation"> <xsl:apply-templates select="TypeLibs/TypeLib"/> <xsl:apply-templates select="ComClasses/ComClass"/> <xsl:apply-templates select="WindowClasses/WindowClass"/> <xsl:apply-templates select="ProxyStubs/ProxyStub" mode="internal"/> </xsl:template> <xsl:template match="TypeLib"> <typelib xmlns="urn:schemas-microsoft-com:asm.v1" tlbid="{@Tlbid}" version="{@Version}" helpdir="{@HelpDir}" resourceid="{@ResourceId}" flags="{@Flags}"/> </xsl:template> <xsl:template match="ComClass"> <comClass xmlns="urn:schemas-microsoft-com:asm.v1" clsid="{@Clsid}" threadingModel="{@ThreadingModel}" tlbid="{@Tlbid}" progid="{@Progid}" description="{@Description}"/> </xsl:template> <xsl:template match="WindowClass"> <windowClass xmlns="urn:schemas-microsoft-com:asm.v1" versioned="{@Versioned}" > <xsl:value-of select="@Name"/> </windowClass> </xsl:template> <xsl:template match="ProxyStub" mode="internal"> <comInterfaceProxyStub xmlns="urn:schemas-microsoft-com:asm.v1" name="{@Name}" iid="{@Iid}" numMethods="{@NumMethods}" baseInterface="{@BaseInterface}" tlbid="{@Tlbid}"/> </xsl:template> <xsl:template match="ProxyStub" mode="external"> <comInterfaceExternalProxyStub xmlns="urn:schemas-microsoft-com:asm.v1" name="{@Name}" iid="{@Iid}" numMethods="{@NumMethods}" baseInterface="{@BaseInterface}" tlbid="{@Tlbid}"/> </xsl:template> <xsl:template match="FileAssociation"> <fileAssociation xmlns="urn:schemas-microsoft-com:clickonce.v1" extension="{@Extension}" description="{@Description}" progid="{@Progid}" defaultIcon="{@DefaultIcon}"/> </xsl:template> </xsl:stylesheet> ? <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="urn:schemas-microsoft-com:asm.v2" version="1.0"> <xsl:output method="xml" encoding="utf-8" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:param name="defaultRequestedPrivileges"/> <xsl:variable name="requestedPrivileges" select="document($defaultRequestedPrivileges)" /> <xsl:template match="asmv2:PermissionSet" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2"> <trustInfo> <security> <applicationRequestMinimum> <xsl:copy-of select="."/> <defaultAssemblyRequest permissionSetReference="{@ID}" /> </applicationRequestMinimum> <xsl:if test="$requestedPrivileges"> <xsl:copy-of select="$requestedPrivileges"/> </xsl:if> </security> </trustInfo> </xsl:template> </xsl:stylesheet> ? <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" exclude-result-prefixes="asmv1 asmv2" version="1.0"> <xsl:output method="xml" encoding="utf-8" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:param name="manifest-type"/> <!-- DeployManifest Attributes --> <xsl:attribute-set name="deploy-manifest-attributes"> <xsl:attribute name="Publisher"> <xsl:value-of select="asmv1:description/@asmv2:publisher"/> </xsl:attribute> <xsl:attribute name="Product"> <xsl:value-of select="asmv1:description/@asmv2:product"/> </xsl:attribute> <xsl:attribute name="SuiteName"> <xsl:value-of select="asmv1:description/@co.v1:suiteName"/> </xsl:attribute> <xsl:attribute name="SupportUrl"> <xsl:value-of select="asmv1:description/@asmv2:supportUrl"/> </xsl:attribute> <xsl:attribute name="ErrorReportUrl"> <xsl:value-of select="asmv1:description/@co.v1:errorReportUrl"/> </xsl:attribute> <xsl:attribute name="Description"> <xsl:value-of select="asmv1:description/text()"/> </xsl:attribute> <xsl:attribute name="MinimumRequiredVersion"> <xsl:value-of select="asmv2:deployment/@minimumRequiredVersion"/> </xsl:attribute> <xsl:attribute name="Install"> <xsl:value-of select="asmv2:deployment/@install"/> </xsl:attribute> <xsl:attribute name="CreateDesktopShortcut"> <xsl:value-of select="asmv2:deployment/@co.v1:createDesktopShortcut"/> </xsl:attribute> <xsl:attribute name="DisallowUrlActivation"> <xsl:value-of select="asmv2:deployment/@disallowUrlActivation"/> </xsl:attribute> <xsl:attribute name="MapFileExtensions"> <xsl:value-of select="asmv2:deployment/@mapFileExtensions"/> </xsl:attribute> <xsl:attribute name="TrustUrlParameters"> <xsl:value-of select="asmv2:deployment/@trustURLParameters"/> </xsl:attribute> <xsl:attribute name="UpdateEnabled"> <xsl:value-of select="boolean(asmv2:deployment/asmv2:subscription/asmv2:update)"/> </xsl:attribute> <xsl:attribute name="UpdateMode"> <xsl:choose> <xsl:when test="asmv2:deployment/asmv2:subscription/asmv2:update/asmv2:beforeApplicationStartup"> <xsl:text>Foreground</xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>Background</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="UpdateInterval"> <xsl:value-of select="asmv2:deployment/asmv2:subscription/asmv2:update/asmv2:expiration/@maximumAge"/> </xsl:attribute> <xsl:attribute name="UpdateUnit"> <xsl:value-of select="asmv2:deployment/asmv2:subscription/asmv2:update/asmv2:expiration/@unit"/> </xsl:attribute> <xsl:attribute name="DeploymentUrl"> <xsl:value-of select="asmv2:deployment/asmv2:deploymentProvider/@codebase"/> </xsl:attribute> </xsl:attribute-set> <!-- ApplicationManifest Attributes --> <xsl:attribute-set name="application-manifest-attributes"> <xsl:attribute name="Description"> <xsl:value-of select="asmv1:description/text()"/> </xsl:attribute> <xsl:attribute name="EntryPointParameters"> <xsl:value-of select="asmv2:entryPoint/asmv2:commandLine/@parameters"/> </xsl:attribute> <xsl:attribute name="EntryPointPath"> <xsl:value-of select="asmv2:entryPoint/asmv2:commandLine/@file"/> </xsl:attribute> <xsl:attribute name="ErrorReportUrl"> <xsl:value-of select="asmv1:description/@co.v1:errorReportUrl"/> </xsl:attribute> <xsl:attribute name="HostInBrowser"> <xsl:choose> <xsl:when test="asmv2:entryPoint/asmv3:hostInBrowser"> <xsl:text>true</xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>false</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="IconFile"> <xsl:value-of select="asmv1:description/@asmv2:iconFile"/> </xsl:attribute> <xsl:attribute name="OSMajor"> <xsl:value-of select="asmv1:dependency/asmv2:dependentOS/asmv2:osVersionInfo/asmv2:os/@majorVersion|asmv2:dependency/asmv2:dependentOS/asmv2:osVersionInfo/asmv2:os/@majorVersion"/> </xsl:attribute> <xsl:attribute name="OSMinor"> <xsl:value-of select="asmv1:dependency/asmv2:dependentOS/asmv2:osVersionInfo/asmv2:os/@minorVersion|asmv2:dependency/asmv2:dependentOS/asmv2:osVersionInfo/asmv2:os/@minorVersion"/> </xsl:attribute> <xsl:attribute name="OSBuild"> <xsl:value-of select="asmv1:dependency/asmv2:dependentOS/asmv2:osVersionInfo/asmv2:os/@buildNumber|asmv2:dependency/asmv2:dependentOS/asmv2:osVersionInfo/asmv2:os/@buildNumber"/> </xsl:attribute> <xsl:attribute name="OSRevision"> <xsl:value-of select="asmv1:dependency/asmv2:dependentOS/asmv2:osVersionInfo/asmv2:os/@servicePackMajor|asmv2:dependency/asmv2:dependentOS/asmv2:osVersionInfo/asmv2:os/@servicePackMajor"/> </xsl:attribute> <xsl:attribute name="OSSupportUrl"> <xsl:value-of select="asmv1:dependency/asmv2:dependentOS/@supportUrl|asmv2:dependency/asmv2:dependentOS/@supportUrl"/> </xsl:attribute> <xsl:attribute name="OSDescription"> <xsl:value-of select="asmv1:dependency/asmv2:dependentOS/@description|asmv2:dependency/asmv2:dependentOS/@description"/> </xsl:attribute> <xsl:attribute name="Product"> <xsl:value-of select="asmv1:description/@asmv2:product"/> </xsl:attribute> <xsl:attribute name="Publisher"> <xsl:value-of select="asmv1:description/@asmv2:publisher"/> </xsl:attribute> <xsl:attribute name="SuiteName"> <xsl:value-of select="asmv1:description/@co.v1:suiteName"/> </xsl:attribute> <xsl:attribute name="SupportUrl"> <xsl:value-of select="asmv1:description/@asmv2:supportUrl"/> </xsl:attribute> <xsl:attribute name="UseApplicationTrust"> <xsl:choose> <xsl:when test="co.v1:useManifestForTrust"> <xsl:text>true</xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>false</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:attribute> </xsl:attribute-set> <!-- AssemblyManifest Attributes --> <xsl:attribute-set name="assembly-manifest-attributes"> <xsl:attribute name="Description"> <xsl:value-of select="asmv1:description/text()"/> </xsl:attribute> </xsl:attribute-set> <!-- Manifest Type --> <xsl:template match="asmv1:assembly"> <xsl:choose> <!-- DeployManifest if document has a <deployment> element --> <xsl:when test="$manifest-type='DeployManifest' or count(asmv2:deployment)>0"> <xsl:element name="DeployManifest" use-attribute-sets="deploy-manifest-attributes" namespace=""> <xsl:call-template name="base-assembly"/> <xsl:call-template name="trust-licenses"/> <xsl:call-template name="public-key"/> </xsl:element> </xsl:when> <!-- ApplicationManifest if document has a <application> element --> <xsl:when test="$manifest-type='ApplicationManifest' or count(asmv2:application)>0"> <xsl:element name="ApplicationManifest" use-attribute-sets="application-manifest-attributes" namespace=""> <xsl:call-template name="base-assembly"/> <xsl:if test="asmv2:entryPoint/asmv2:assemblyIdentity|asmv2:entryPoint/asmv1:assemblyIdentity"> <xsl:apply-templates select="asmv2:entryPoint/asmv2:assemblyIdentity|asmv2:entryPoint/asmv1:assemblyIdentity"/> </xsl:if> <xsl:call-template name="external-proxy-stubs"/> <xsl:if test="count(co.v1:fileAssociation)>0"> <xsl:element name="FileAssociations" namespace=""> <xsl:apply-templates select="co.v1:fileAssociation"/> </xsl:element> </xsl:if> </xsl:element> </xsl:when> <!-- AssemblyManifest if document does not have any of the above --> <xsl:otherwise> <xsl:element name="AssemblyManifest" use-attribute-sets="assembly-manifest-attributes" namespace=""> <xsl:call-template name="base-assembly"/> <xsl:call-template name="external-proxy-stubs"/> </xsl:element> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="asmv2:entryPoint/asmv2:assemblyIdentity|asmv2:entryPoint/asmv1:assemblyIdentity"> <xsl:call-template name="assembly-identity"> <xsl:with-param name="class">EntryPointIdentity</xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template name="base-assembly"> <xsl:apply-templates select="asmv1:assemblyIdentity|asmv2:assemblyIdentity"/> <xsl:if test="count(asmv1:dependency[asmv1:dependentAssembly]|asmv1:dependency[asmv2:dependentAssembly]|asmv2:dependency[asmv1:dependentAssembly]|asmv2:dependency[asmv2:dependentAssembly])>0"> <xsl:element name="AssemblyReferences" namespace=""> <xsl:apply-templates select="asmv1:dependency[asmv1:dependentAssembly]|asmv1:dependency[asmv2:dependentAssembly]|asmv2:dependency[asmv1:dependentAssembly]|asmv2:dependency[asmv2:dependentAssembly]"/> </xsl:element> </xsl:if> <xsl:if test="count(asmv1:file|asmv2:file)>0"> <xsl:element name="FileReferences" namespace=""> <xsl:apply-templates select="asmv1:file|asmv2:file"/> </xsl:element> </xsl:if> </xsl:template> <xsl:template name="external-proxy-stubs"> <xsl:if test="count(asmv1:comInterfaceExternalProxyStub)"> <xsl:element name="ExternalProxyStubs" namespace=""> <xsl:apply-templates select="asmv1:comInterfaceExternalProxyStub"/> </xsl:element> </xsl:if> </xsl:template> <xsl:template match="asmv1:assemblyIdentity|asmv2:assemblyIdentity"> <xsl:call-template name="assembly-identity"> <xsl:with-param name="class">AssemblyIdentity</xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="asmv1:dependency"> <xsl:element name="AssemblyReference" namespace=""> <xsl:attribute name="IsNative">true</xsl:attribute> <xsl:apply-templates select="asmv1:dependentAssembly|asmv2:dependentAssembly"/> <xsl:apply-templates select="asmv1:dependentAssembly/asmv1:assemblyIdentity|asmv1:dependentAssembly/asmv2:assemblyIdentity|asmv2:dependentAssembly/asmv1:assemblyIdentity|asmv2:dependentAssembly/asmv2:assemblyIdentity"/> </xsl:element> </xsl:template> <xsl:template match="asmv2:dependency"> <xsl:element name="AssemblyReference" namespace=""> <xsl:attribute name="IsNative">false</xsl:attribute> <xsl:apply-templates select="asmv1:dependentAssembly|asmv2:dependentAssembly"/> <xsl:apply-templates select="asmv1:dependentAssembly/asmv1:assemblyIdentity|asmv1:dependentAssembly/asmv2:assemblyIdentity|asmv2:dependentAssembly/asmv1:assemblyIdentity|asmv2:dependentAssembly/asmv2:assemblyIdentity"/> </xsl:element> </xsl:template> <xsl:template match="asmv1:dependentAssembly"> <xsl:if test="@asmv2:dependencyType='preRequisite'"> <xsl:attribute name="IsPrerequisite">true</xsl:attribute> </xsl:if> <xsl:if test="string-length(@asmv2:codebase)>0"> <xsl:attribute name="Path"> <xsl:value-of select="@asmv2:codebase"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(@asmv2:size)>0"> <xsl:attribute name="Size"> <xsl:value-of select="@asmv2:size"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(asmv2:hash/dsig:DigestValue)>0"> <xsl:attribute name="Hash"> <xsl:value-of select="asmv2:hash/dsig:DigestValue"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(@asmv2:group)>0"> <xsl:attribute name="Group"> <xsl:value-of select="@asmv2:group"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(parent::node()/@asmv2:optional)>0"> <xsl:attribute name="IsOptional"> <xsl:value-of select="parent::node()/@asmv2:optional"/> </xsl:attribute> </xsl:if> </xsl:template> <xsl:template match="asmv2:dependentAssembly"> <xsl:if test="@dependencyType='preRequisite'"> <xsl:attribute name="IsPrerequisite">true</xsl:attribute> </xsl:if> <xsl:if test="string-length(@codebase)>0"> <xsl:attribute name="Path"> <xsl:value-of select="@codebase"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(@size)>0"> <xsl:attribute name="Size"> <xsl:value-of select="@size"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(asmv2:hash/dsig:DigestValue)>0"> <xsl:attribute name="Hash"> <xsl:value-of select="asmv2:hash/dsig:DigestValue"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(@group)>0"> <xsl:attribute name="Group"> <xsl:value-of select="@group"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(parent::node()/@optional)>0"> <xsl:attribute name="IsOptional"> <xsl:value-of select="parent::node()/@optional"/> </xsl:attribute> </xsl:if> </xsl:template> <xsl:template match="asmv1:dependentAssembly/asmv1:assemblyIdentity|asmv1:dependentAssembly/asmv2:assemblyIdentity|asmv2:dependentAssembly/asmv1:assemblyIdentity|asmv2:dependentAssembly/asmv2:assemblyIdentity"> <xsl:call-template name="assembly-identity"> <xsl:with-param name="class">AssemblyIdentity</xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="asmv1:file"> <xsl:element name="FileReference" namespace=""> <xsl:attribute name="Path"> <xsl:value-of select="@name"/> </xsl:attribute> <xsl:if test="string-length(@size)>0"> <xsl:attribute name="Size"> <xsl:value-of select="@size"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(asmv2:hash/dsig:DigestValue)>0"> <xsl:attribute name="Hash"> <xsl:value-of select="asmv2:hash/dsig:DigestValue"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(@asmv2:group)>0"> <xsl:attribute name="Group"> <xsl:value-of select="@asmv2:group"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(@asmv2:optional)>0"> <xsl:attribute name="IsOptional"> <xsl:value-of select="@asmv2:optional"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(@asmv2:writeableType)>0"> <xsl:attribute name="WriteableType"> <xsl:value-of select="@asmv2:writeableType"/> </xsl:attribute> </xsl:if> <xsl:if test="count(asmv1:comClass)>0"> <xsl:element name="ComClasses" namespace=""> <xsl:apply-templates select="asmv1:comClass"/> </xsl:element> </xsl:if> <xsl:if test="count(asmv1:typelib)>0"> <xsl:element name="TypeLibs" namespace=""> <xsl:apply-templates select="asmv1:typelib"/> </xsl:element> </xsl:if> <xsl:if test="count(asmv1:comInterfaceProxyStub)>0"> <xsl:element name="ProxyStubs" namespace=""> <xsl:apply-templates select="asmv1:comInterfaceProxyStub"/> </xsl:element> </xsl:if> </xsl:element> </xsl:template> <xsl:template match="asmv2:file"> <xsl:element name="FileReference" namespace=""> <xsl:attribute name="Path"> <xsl:value-of select="@name"/> </xsl:attribute> <xsl:if test="string-length(@size)>0"> <xsl:attribute name="Size"> <xsl:value-of select="@size"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(asmv2:hash/dsig:DigestValue)>0"> <xsl:attribute name="Hash"> <xsl:value-of select="asmv2:hash/dsig:DigestValue"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(@group)>0"> <xsl:attribute name="Group"> <xsl:value-of select="@group"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(@optional)>0"> <xsl:attribute name="IsOptional"> <xsl:value-of select="@optional"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(@writeableType)>0"> <xsl:attribute name="WriteableType"> <xsl:value-of select="@writeableType"/> </xsl:attribute> </xsl:if> <xsl:if test="count(asmv1:comClass)>0"> <xsl:element name="ComClasses" namespace=""> <xsl:apply-templates select="asmv1:comClass"/> </xsl:element> </xsl:if> <xsl:if test="count(asmv1:typelib)>0"> <xsl:element name="TypeLibs" namespace=""> <xsl:apply-templates select="asmv1:typelib"/> </xsl:element> </xsl:if> <xsl:if test="count(asmv1:comInterfaceProxyStub)>0"> <xsl:element name="ProxyStubs" namespace=""> <xsl:apply-templates select="asmv1:comInterfaceProxyStub"/> </xsl:element> </xsl:if> </xsl:element> </xsl:template> <xsl:template match="asmv1:comClass"> <xsl:element name="ComClass" namespace=""> <xsl:attribute name="Clsid"> <xsl:value-of select="@clsid"/> </xsl:attribute> <xsl:attribute name="Progid"> <xsl:value-of select="@progid"/> </xsl:attribute> <xsl:attribute name="ThreadingModel"> <xsl:value-of select="@threadingModel"/> </xsl:attribute> <xsl:attribute name="Tlbid"> <xsl:value-of select="@tlbid"/> </xsl:attribute> <xsl:attribute name="Description"> <xsl:value-of select="@description"/> </xsl:attribute> </xsl:element> </xsl:template> <xsl:template match="asmv1:typelib"> <xsl:element name="TypeLib" namespace=""> <xsl:attribute name="Tlbid"> <xsl:value-of select="@tlbid"/> </xsl:attribute> <xsl:attribute name="Version"> <xsl:value-of select="@version"/> </xsl:attribute> <xsl:attribute name="HelpDir"> <xsl:value-of select="@helpdir"/> </xsl:attribute> <xsl:attribute name="ResourceId"> <xsl:value-of select="@resourceid"/> </xsl:attribute> <xsl:attribute name="Flags"> <xsl:value-of select="@flags"/> </xsl:attribute> </xsl:element> </xsl:template> <xsl:template match="asmv1:comInterfaceProxyStub|asmv1:comInterfaceExternalProxyStub"> <xsl:element name="ProxyStub" namespace=""> <xsl:attribute name="Iid"> <xsl:value-of select="@iid"/> </xsl:attribute> <xsl:attribute name="ProxyStubClsid32"> <xsl:value-of select="@proxyStubClsid32"/> </xsl:attribute> <xsl:attribute name="File"> <xsl:value-of select="@file"/> </xsl:attribute> <xsl:attribute name="BaseInterface"> <xsl:value-of select="@baseInterface"/> </xsl:attribute> <xsl:attribute name="NumMethods"> <xsl:value-of select="@numMethods"/> </xsl:attribute> <xsl:attribute name="name"> <xsl:value-of select="@name"/> </xsl:attribute> <xsl:attribute name="tlbid"> <xsl:value-of select="@tlbid"/> </xsl:attribute> </xsl:element> </xsl:template> <xsl:template name="assembly-identity"> <xsl:param name="class"/> <xsl:element name="{$class}" namespace=""> <xsl:if test="string-length(@name)>0"> <xsl:attribute name="Name"> <xsl:value-of select="@name"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(@version)>0"> <xsl:attribute name="Version"> <xsl:value-of select="@version"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(@publicKeyToken)>0"> <xsl:attribute name="PublicKeyToken"> <xsl:value-of select="@publicKeyToken"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(@language)>0"> <xsl:attribute name="Culture"> <xsl:value-of select="@language"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(@processorArchitecture)>0"> <xsl:attribute name="ProcessorArchitecture"> <xsl:value-of select="@processorArchitecture"/> </xsl:attribute> </xsl:if> <xsl:if test="string-length(@type)>0"> <xsl:attribute name="Type"> <xsl:value-of select="@type"/> </xsl:attribute> </xsl:if> </xsl:element> </xsl:template> <xsl:template match="asmv2:trustInfo"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:copy-of select="child::*"/> </xsl:copy> </xsl:template> <xsl:template name="trust-licenses"> <xsl:if test="count(/asmv1:assembly/asmv2:licensing/asmv2:xrmlLicenseInfo/xrml:licenseGroup/xrml:license)>0"> <xsl:element name="TrustLicenses" namespace=""> <xsl:apply-templates select="/asmv1:assembly/asmv2:licensing/asmv2:xrmlLicenseInfo" mode="tlic"/> </xsl:element> </xsl:if> </xsl:template> <xsl:template match="xrml:licenseGroup" mode="tlic"> <xsl:for-each select="xrml:license"> <xsl:element name="XmlDocument" namespace=""> <xsl:copy-of select="."/> </xsl:element> </xsl:for-each> </xsl:template> <xsl:template name="public-key"> <xsl:element name="PublicKey" namespace=""> <xsl:copy-of select="//asmv1:assembly/dsig:Signature/dsig:KeyInfo"/> </xsl:element> </xsl:template> <xsl:template match="co.v1:fileAssociation"> <xsl:element name="FileAssociation" namespace=""> <xsl:attribute name="Extension"> <xsl:value-of select="@extension"/> </xsl:attribute> <xsl:attribute name="Description"> <xsl:value-of select="@description"/> </xsl:attribute> <xsl:attribute name="Progid"> <xsl:value-of select="@progid"/> </xsl:attribute> <xsl:attribute name="DefaultIcon"> <xsl:value-of select="@defaultIcon"/> </xsl:attribute> </xsl:element> </xsl:template> </xsl:stylesheet> $ <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" exclude-result-prefixes="asmv1 asmv2 asmv3 co.v1" version="1.0"> <xsl:output method="xml" encoding="utf-8" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:param name="base-file"/> <xsl:variable name="app" select="/asmv1:assembly/asmv1:application|asmv2:application"/> <xsl:variable name="base" select="document($base-file)"/> <!-- Defined set of standard elements that can be merged between input document and base document --> <xsl:template match="/asmv1:assembly"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly"/></xsl:call-template></xsl:template> <xsl:template match="/asmv1:assembly/asmv1:assemblyIdentity"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly/asmv1:assemblyIdentity"/></xsl:call-template></xsl:template> <xsl:template match="/asmv1:assembly/asmv1:description"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly/asmv1:description"/></xsl:call-template></xsl:template> <xsl:template match="/asmv1:assembly/asmv2:assemblyIdentity"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly/asmv2:assemblyIdentity"/></xsl:call-template></xsl:template> <xsl:template match="/asmv1:assembly/asmv2:configuration"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly/asmv2:configuration"/></xsl:call-template></xsl:template> <xsl:template match="/asmv1:assembly/asmv2:deployment"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly/asmv2:deployment"/></xsl:call-template></xsl:template> <xsl:template match="/asmv1:assembly/asmv2:deployment/asmv2:subscription"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly/asmv2:deployment/asmv2:subscription"/></xsl:call-template></xsl:template> <xsl:template match="/asmv1:assembly/asmv2:deployment/asmv2:subscription/asmv2:update"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly/asmv2:deployment/asmv2:subscription/asmv2:update"/></xsl:call-template></xsl:template> <xsl:template match="/asmv1:assembly/asmv2:deployment/asmv2:subscription/asmv2:update/asmv2:expiration"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly/asmv2:deployment/asmv2:subscription/asmv2:update/asmv2:expiration"/></xsl:call-template></xsl:template> <xsl:template match="/asmv1:assembly/asmv2:deployment/asmv2:deploymentProvider"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly/asmv2:deployment/asmv2:deploymentProvider"/></xsl:call-template></xsl:template> <xsl:template match="/asmv1:assembly/asmv2:entryPoint"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly/asmv2:entryPoint"/></xsl:call-template></xsl:template> <xsl:template match="/asmv1:assembly/asmv2:entryPoint/asmv2:assemblyIdentity"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly/asmv2:entryPoint/asmv2:assemblyIdentity"/></xsl:call-template></xsl:template> <xsl:template match="/asmv1:assembly/asmv2:entryPoint/asmv2:commandLine"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly/asmv2:entryPoint/asmv2:commandLine"/></xsl:call-template></xsl:template> <xsl:template match="/asmv1:assembly/asmv2:trustInfo"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly/asmv2:trustInfo"/></xsl:call-template></xsl:template> <xsl:template match="/asmv1:assembly/asmv2:trustInfo/asmv2:security"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly/asmv2:trustInfo/asmv2:security"/></xsl:call-template></xsl:template> <xsl:template match="/asmv1:assembly/asmv2:trustInfo/asmv2:security/asmv3:requestedPrivileges"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly/asmv2:trustInfo/asmv2:security/asmv3:requestedPrivileges"/></xsl:call-template></xsl:template> <xsl:template match="/asmv1:assembly/asmv2:trustInfo/asmv2:security/asmv3:requestedPrivileges/asmv3:requestedExecutionLevel"><xsl:call-template name="merge-element"><xsl:with-param name="base-element" select="$base/asmv1:assembly/asmv2:trustInfo/asmv2:security/asmv3:requestedPrivileges/asmv3:requestedExecutionLevel"/></xsl:call-template></xsl:template> <!-- All other matches (i.e. file, dependency) will be copied directly from input document, base document will have no impact --> <xsl:template match="*"><xsl:copy-of select="."/></xsl:template> <!-- Defined set of standard elements from base document --> <xsl:template match="asmv2:application" mode="base"/> <xsl:template match="asmv1:assemblyIdentity" mode="base"/> <xsl:template match="asmv1:dependency" mode="base"/> <xsl:template match="asmv1:description" mode="base"/> <xsl:template match="asmv1:file" mode="base"/> <xsl:template match="asmv2:applicationRequestMinimum" mode="base"/> <xsl:template match="asmv2:assemblyIdentity" mode="base"/> <xsl:template match="asmv2:beforeApplicationStartup" mode="base"/> <xsl:template match="asmv2:commandLine" mode="base"/> <xsl:template match="asmv2:configuration" mode="base"/> <xsl:template match="asmv2:dependency" mode="base"/> <xsl:template match="asmv2:deployment" mode="base"/> <xsl:template match="asmv2:deploymentProvider" mode="base"/> <xsl:template match="asmv2:entryPoint" mode="base"/> <xsl:template match="asmv2:expiration" mode="base"/> <xsl:template match="asmv2:file" mode="base"/> <xsl:template match="asmv2:licensing" mode="base"/> <xsl:template match="asmv2:subscription" mode="base"/> <xsl:template match="asmv2:update" mode="base"/> <xsl:template match="asmv3:hostInBrowser" mode="base"/> <xsl:template match="asmv2:trustInfo" mode="base"/> <xsl:template match="asmv2:security" mode="base"/> <xsl:template match="asmv3:requestedPrivileges" mode="base"/> <xsl:template match="asmv3:requestedExecutionLevel" mode="base"/> <xsl:template match="dsig:Signature" mode="base"/> <xsl:template match="co.v1:customHostSpecified" mode="base"/> <xsl:template match="co.v1:useManifestForTrust" mode="base"/> <xsl:template match="co.v1:fileAssociation" mode="base"/> <!-- All other matches are non-standard elements from base document --> <xsl:template match="*" mode="base"> <xsl:copy-of select="."/> </xsl:template> <xsl:template name="merge-element"> <xsl:param name="base-element"/> <!-- import comment from base if present --> <xsl:if test="preceding-sibling::comment()"> <xsl:copy-of select="preceding-sibling::comment()"/> </xsl:if> <xsl:if test="$base-element/preceding-sibling::comment() and $base-element/preceding-sibling::comment()!=preceding-sibling::comment()"> <xsl:copy-of select="$base-element/preceding-sibling::comment()"/> </xsl:if> <!-- copy current node and import attributes and sub-elements from base --> <xsl:copy> <xsl:call-template name="merge-attributes"> <xsl:with-param name="base-attributes" select="$base-element/@*"/> <xsl:with-param name="app-attributes" select="@*"/> </xsl:call-template> <!-- Process all child elements from primary input document --> <xsl:apply-templates select="child::*"/> <!-- Import non-standard elements from base document --> <xsl:apply-templates select="$base-element/child::*" mode="base"/> <xsl:choose> <xsl:when test="./text()"> <xsl:copy-of select="./text()"/> </xsl:when> <xsl:when test="$base-element/text()"> <xsl:copy-of select="$base-element/text()"/> </xsl:when> </xsl:choose> </xsl:copy> </xsl:template> <xsl:template name="merge-attributes"> <xsl:param name="base-attributes"/> <xsl:param name="app-attributes"/> <!-- Import attributes from base document --> <xsl:for-each select="$base-attributes"> <xsl:attribute name="{name()}"><xsl:value-of select="current()"/></xsl:attribute> </xsl:for-each> <!-- Import attributes from app document --> <xsl:for-each select="$app-attributes"> <xsl:attribute name="{name()}"><xsl:value-of select="current()"/></xsl:attribute> </xsl:for-each> </xsl:template> </xsl:stylesheet> ? <?xml version="1.0" encoding="utf-8"?> <asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1"> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> <security> <applicationRequestMinimum> </applicationRequestMinimum> </security> </trustInfo> </asmv1:assembly> N>