home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / WindowsServerTrial / server.iso / sources / install.wim / 5 / Windows / System32 / WsmTxt.xsl < prev    next >
Extensible Markup Language  |  2006-09-18  |  2KB  |  60 lines

  1. <?xml version="1.0" ?>
  2. <!--  Copyright (c) Microsoft Corporation.  All rights reserved. -->
  3. <xsl:stylesheet version="1.0" 
  4.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  5.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  6.     xmlns:cim="http://schemas.dmtf.org/wsman/2005/06/base">
  7.     <xsl:output method="text"/>
  8.     
  9.     <xsl:param name="singleIndent" select="'    '"/>    
  10.     <xsl:template name="doIndent">
  11.         <xsl:for-each select="ancestor::*">
  12.             <xsl:value-of select="$singleIndent"/>
  13.         </xsl:for-each>
  14.     </xsl:template>
  15.     
  16.     <xsl:template match="/">
  17.         <xsl:apply-templates/>
  18.     </xsl:template>
  19.     
  20.     <xsl:template match="cim:Location"/>
  21.     
  22.     <xsl:template match="*[text()] | *[@xsi:nil]">
  23.       <xsl:if test="name(preceding-sibling::node()[1]) != name()">
  24.         <xsl:call-template name="doIndent"/>
  25.         <xsl:value-of select="local-name()"/>
  26.         <xsl:if test="@Name">
  27.           <xsl:value-of select="': '"/>
  28.           <xsl:value-of select="@Name"/>
  29.         </xsl:if>
  30.         <xsl:value-of select="' = '"/>
  31.       </xsl:if>
  32.       <xsl:if test="name(preceding-sibling::node()[1]) = name()">
  33.         <xsl:if test="@Name">
  34.           <xsl:value-of select="@Name"/>
  35.           <xsl:value-of select="' = '"/>
  36.         </xsl:if>
  37.       </xsl:if>
  38.  
  39.       <xsl:if test="not(@xsi:nil)"><xsl:value-of select="."/></xsl:if>
  40.       <xsl:if test="@xsi:nil"><xsl:value-of select="'null'"/></xsl:if>
  41.  
  42.       <xsl:if test="@Source='GPO'"><xsl:value-of select="' [Source="GPO"]'"/></xsl:if>
  43.         
  44.       <xsl:if test="name(following-sibling::node()[1]) = name()">, </xsl:if>
  45.       <xsl:if test="name(following-sibling::node()[1]) != name()">
  46.         <xsl:value-of select="' '"/>
  47.       </xsl:if>        
  48.     </xsl:template>
  49.     
  50.     <xsl:template match="*">
  51.         <xsl:call-template name="doIndent"/>
  52.         <xsl:value-of select="local-name()"/>
  53.         <xsl:if test="@Source='GPO'"><xsl:value-of select="' [Source="GPO"]'"/></xsl:if>
  54.         <xsl:value-of select="' '"/>
  55.         <xsl:apply-templates/>
  56.     </xsl:template>
  57.  
  58. </xsl:stylesheet>
  59.  
  60.