使用 xslt 将 XML 转换为 HTML 并将行交换为列

Convert XML to HTML and swap rows to columns using xslt

我一直在使用此脚本将 XML 以下转换为 HTML,它工作正常......我遇到的问题是我需要将列转换为行,这就是我被卡住了的地方.. 已经为此花费了很多时间,我的大脑现在似乎很模糊......非常感谢一些帮助......谢谢

<root>
    <FormData>
        <PowerOn_Compute.Name />
        <PowerOn_Compute.BorisID>19001</PowerOn_Compute.BorisID>
        <PowerOn_Compute.UnityNumber>19001</PowerOn_Compute.UnityNumber>
        <PowerOn_Compute.BusinessNameSearch>EYELINE AUSTRALIA</PowerOn_Compute.BusinessNameSearch>
        <PowerOn_Compute.BusinessName />
        <PowerOn_Compute.ShortBusinessName>eyeline</PowerOn_Compute.ShortBusinessName>
        <PowerOn_Compute.PortalURL>eyeline</PowerOn_Compute.PortalURL>
        <PowerOn_Compute.ExistingCustomer>Yes</PowerOn_Compute.ExistingCustomer>
        <PowerOn_Compute.ConnectivityRequired>Yes</PowerOn_Compute.ConnectivityRequired>
        <PowerOn_Compute.CustomerAccess>IP VPN</PowerOn_Compute.CustomerAccess>
        <PowerOn_Compute.FirewallMethod>PowerOn Firewalls</PowerOn_Compute.FirewallMethod>
        <PowerOn_BoardContacts-1.Role>IT Manager</PowerOn_BoardContacts-1.Role>
        <PowerOn_BoardContacts-1.Name>Maggie Hu</PowerOn_BoardContacts-1.Name>
        <PowerOn_BoardContacts-1.Phone>613 96513771</PowerOn_BoardContacts-1.Phone>
        <PowerOn_BoardContacts-1.Email>mhu@eyeline.com.au</PowerOn_BoardContacts-1.Email>
        <PowerOn_Requestors-1.Role />
        <PowerOn_Requestors-1.Name>Justine Remedios</PowerOn_Requestors-1.Name>
        <PowerOn_Requestors-1.Phone>613 96513771</PowerOn_Requestors-1.Phone>
        <PowerOn_Requestors-1.Email>jremedios@eyeline.com.au</PowerOn_Requestors-1.Email>
        <PowerOn_EscalationContacts-1.Role>IT Manager</PowerOn_EscalationContacts-1.Role>
        <PowerOn_EscalationContacts-1.Name>Maggie Hu</PowerOn_EscalationContacts-1.Name>
        <PowerOn_EscalationContacts-1.Phone>613 96513771</PowerOn_EscalationContacts-1.Phone>
        <PowerOn_EscalationContacts-1.Email>mhu@eyeline.com.au</PowerOn_EscalationContacts-1.Email>
        <PowerOn_EscalationContacts-1.Availability>24 Hrs</PowerOn_EscalationContacts-1.Availability>
        <PowerOn_EscalationContacts-1.PreferredContact>Email</PowerOn_EscalationContacts-1.PreferredContact>
        <PowerOn_NoOfBladesSydney.Name />
        <PowerOn_NoOfBladesSydney.NoOfBladesSydney>0</PowerOn_NoOfBladesSydney.NoOfBladesSydney>
        <PowerOn_NoOfBladesSydney.NoOfVMsESXiHostsSydney>0</PowerOn_NoOfBladesSydney.NoOfVMsESXiHostsSydney>
        <PowerOn_BladesAndServerSydney-1.Name />
        <PowerOn_BladesAndServerSydney-1.BladesPerSpec>Total Number of Blades Per Spec that will be managed Non-ESXi Servers</PowerOn_BladesAndServerSydney-1.BladesPerSpec>
        <PowerOn_BladesAndServerSydney-1.ESXiHostsSyd />
        <PowerOn_BladesAndServerSydney-1.NonESXiServersSyd />
        <PowerOn_BladesAndServerSydney-1.Type1Syd />
        <PowerOn_BladesAndServerSydney-1.Type2Syd />
        <PowerOn_BladesAndServerSydney-1.Type3Syd />
        <PowerOn_NoOfBladesMelbourne.NoOfBladesMelbourne>2</PowerOn_NoOfBladesMelbourne.NoOfBladesMelbourne>
        <PowerOn_NoOfBladesMelbourne.NoOfVMsESXiHostsMelbourne>4</PowerOn_NoOfBladesMelbourne.NoOfVMsESXiHostsMelbourne>
        <PowerOn_NoOfBladesMelbourne.Name />
        <PowerOn_BladesAndServerMelbourne-1.Name />
        <PowerOn_BladesAndServerMelbourne-1.BladesPerSpec>Total Number of Blades Per Spec that will be managed Non-ESXi Servers</PowerOn_BladesAndServerMelbourne-1.BladesPerSpec>
        <PowerOn_BladesAndServerMelbourne-1.ESXiHostsMel />
        <PowerOn_BladesAndServerMelbourne-1.NonESXiServersMel>0</PowerOn_BladesAndServerMelbourne-1.NonESXiServersMel>
        <PowerOn_BladesAndServerMelbourne-1.Type1Mel />
        <PowerOn_BladesAndServerMelbourne-1.Type2Mel />
        <PowerOn_BladesAndServerMelbourne-1.Type3Mel />
        <PowerOn_BladesAndServerMelbourne-2.Name />
        <PowerOn_BladesAndServerMelbourne-2.BladesPerSpec>Total Number of Blades Per Spec that will be managed ESXi Hosts</PowerOn_BladesAndServerMelbourne-2.BladesPerSpec>
        <PowerOn_BladesAndServerMelbourne-2.ESXiHostsMel>2</PowerOn_BladesAndServerMelbourne-2.ESXiHostsMel>
        <PowerOn_BladesAndServerMelbourne-2.NonESXiServersMel />
        <PowerOn_BladesAndServerMelbourne-2.Type1Mel>2</PowerOn_BladesAndServerMelbourne-2.Type1Mel>
        <PowerOn_BladesAndServerMelbourne-2.Type2Mel />
        <PowerOn_BladesAndServerMelbourne-2.Type3Mel />
        <PowerOn_BladesAndServerMelbourne-3.Name />
        <PowerOn_BladesAndServerMelbourne-3.BladesPerSpec>Total Number of Blades Per Spec that will be Un-managed Non-ESXi Servers</PowerOn_BladesAndServerMelbourne-3.BladesPerSpec>
        <PowerOn_BladesAndServerMelbourne-3.ESXiHostsMel />
        <PowerOn_BladesAndServerMelbourne-3.NonESXiServersMel>0</PowerOn_BladesAndServerMelbourne-3.NonESXiServersMel>
        <PowerOn_BladesAndServerMelbourne-3.Type1Mel />
        <PowerOn_BladesAndServerMelbourne-3.Type2Mel />
        <PowerOn_BladesAndServerMelbourne-3.Type3Mel />
        <PowerOn_BladesAndServerMelbourne-4.Name />
        <PowerOn_BladesAndServerMelbourne-4.BladesPerSpec>Total Number of Blades Per Spec that will be Un-managed ESXi Hosts</PowerOn_BladesAndServerMelbourne-4.BladesPerSpec>
        <PowerOn_BladesAndServerMelbourne-4.ESXiHostsMel>0</PowerOn_BladesAndServerMelbourne-4.ESXiHostsMel>
        <PowerOn_BladesAndServerMelbourne-4.NonESXiServersMel />
        <PowerOn_BladesAndServerMelbourne-4.Type1Mel />
        <PowerOn_BladesAndServerMelbourne-4.Type2Mel />
        <PowerOn_BladesAndServerMelbourne-4.Type3Mel />
        <PowerOn_VMsAndServers.Name />
        <PowerOn_VMsAndServers.DataProtectionServers />
        <PowerOn_VMsAndServers.VMWareLicenseInformation>Perpetual (Customer Supplied)</PowerOn_VMsAndServers.VMWareLicenseInformation>
        <PowerOn_StorageAmounts-1.Name />
        <PowerOn_StorageAmounts-1.TypeOfStorage>Total Perfomance Storage in GB (Syd)</PowerOn_StorageAmounts-1.TypeOfStorage>
        <PowerOn_StorageAmounts-1.TotalAllocatedInServerSyd>0</PowerOn_StorageAmounts-1.TotalAllocatedInServerSyd>
        <PowerOn_StorageAmounts-1.TotalAmountInGBsSyd>0</PowerOn_StorageAmounts-1.TotalAmountInGBsSyd>
        <PowerOn_StorageAmounts-1.AllocatedServerESXiStorageSyd>0</PowerOn_StorageAmounts-1.AllocatedServerESXiStorageSyd>
        <PowerOn_StorageAmounts-1.AmountForVMsinGBESXiStorageSyd>0</PowerOn_StorageAmounts-1.AmountForVMsinGBESXiStorageSyd>
        <PowerOn_StorageAmounts-1.AllocatedServerNESXiStorageSyd>0</PowerOn_StorageAmounts-1.AllocatedServerNESXiStorageSyd>
        <PowerOn_StorageAmounts-1.AmountNoESXiSerNESXiStorageSyd />
        <PowerOn_StorageAmounts-1.PlannedGrowthInPercentageSyd />
        <PowerOn_StorageAmounts-2.Name />
        <PowerOn_StorageAmounts-2.TypeOfStorage>Total Standard Storage in GB (Syd)</PowerOn_StorageAmounts-2.TypeOfStorage>
        <PowerOn_StorageAmounts-2.TotalAllocatedInServerSyd>0</PowerOn_StorageAmounts-2.TotalAllocatedInServerSyd>
        <PowerOn_StorageAmounts-2.TotalAmountInGBsSyd>0</PowerOn_StorageAmounts-2.TotalAmountInGBsSyd>
        <PowerOn_StorageAmounts-2.AllocatedServerESXiStorageSyd>0</PowerOn_StorageAmounts-2.AllocatedServerESXiStorageSyd>
        <PowerOn_StorageAmounts-2.AmountForVMsinGBESXiStorageSyd>0</PowerOn_StorageAmounts-2.AmountForVMsinGBESXiStorageSyd>
        <PowerOn_StorageAmounts-2.AllocatedServerNESXiStorageSyd>0</PowerOn_StorageAmounts-2.AllocatedServerNESXiStorageSyd>
        <PowerOn_StorageAmounts-2.AmountNoESXiSerNESXiStorageSyd />
        <PowerOn_StorageAmounts-2.PlannedGrowthInPercentageSyd />
        <PowerOn_StorageAmounts-3.Name />
        <PowerOn_StorageAmounts-3.TypeOfStorage>Total Perfomance Storage in GB (Melb)</PowerOn_StorageAmounts-3.TypeOfStorage>
        <PowerOn_StorageAmounts-3.TotalAllocatedInServerSyd>0</PowerOn_StorageAmounts-3.TotalAllocatedInServerSyd>
        <PowerOn_StorageAmounts-3.TotalAmountInGBsSyd>0</PowerOn_StorageAmounts-3.TotalAmountInGBsSyd>
        <PowerOn_StorageAmounts-3.AllocatedServerESXiStorageSyd>0</PowerOn_StorageAmounts-3.AllocatedServerESXiStorageSyd>
        <PowerOn_NewDataCenterMelbourne-4.ConnectToExistingNetworkMel>Yes</PowerOn_NewDataCenterMelbourne-4.ConnectToExistingNetworkMel>
        <PowerOn_NewDataCenterMelbourne-5.Name />
        <PowerOn_NewDataCenterMelbourne-5.NoPrivateNetworkMel>PN5</PowerOn_NewDataCenterMelbourne-5.NoPrivateNetworkMel>
        <PowerOn_NewDataCenterMelbourne-5.NewPrivateNetworkNameMel>DR_Internet</PowerOn_NewDataCenterMelbourne-5.NewPrivateNetworkNameMel>
        <PowerOn_NewDataCenterMelbourne-5.NetworkAddressOrMaskMel>172.16.6.0/24</PowerOn_NewDataCenterMelbourne-5.NetworkAddressOrMaskMel>
        <PowerOn_NewDataCenterMelbourne-5.RoutedViaCustomerAccessMel>No</PowerOn_NewDataCenterMelbourne-5.RoutedViaCustomerAccessMel>
        <PowerOn_NewDataCenterMelbourne-5.RoutedWithinPowerOnPlatformMel>Yes</PowerOn_NewDataCenterMelbourne-5.RoutedWithinPowerOnPlatformMel>
        <PowerOn_NewDataCenterMelbourne-5.RouterHSRPAddressMel>172.16.6.1</PowerOn_NewDataCenterMelbourne-5.RouterHSRPAddressMel>
        <PowerOn_NewDataCenterMelbourne-5.PrimaryRouterAddressMel>172.16.6.2</PowerOn_NewDataCenterMelbourne-5.PrimaryRouterAddressMel>
        <PowerOn_NewDataCenterMelbourne-5.SecondaryRouterAddressMel>172.16.6.3</PowerOn_NewDataCenterMelbourne-5.SecondaryRouterAddressMel>
        <PowerOn_NewDataCenterMelbourne-5.PrimaryDNSMel />
        <PowerOn_NewDataCenterMelbourne-5.SecondaryDNSMel />
        <PowerOn_NewDataCenterMelbourne-5.TertiaryDNSMel />
        <PowerOn_NewDataCenterMelbourne-5.ConnectToExistingNetworkMel>Yes</PowerOn_NewDataCenterMelbourne-5.ConnectToExistingNetworkMel>
        <PowerOn_CommentsBladeDesign.Name />
        <PowerOn_CommentsBladeDesign.Comments>&lt;span class="help"&gt;The number of Blades, Non-ESXi Servers, ESXi Servers and managed and Unmanaged Servers must equal the amounts entered in Question 9&lt;br/&gt;The number of Storage selected in question 10 must total the amount used below.&lt;/span&gt;.</PowerOn_CommentsBladeDesign.Comments>
        <PowerOn_ESXiBladeInformation1-1.Name />
        <PowerOn_ESXiBladeInformation1-1.HostLocation>MELBOURNE</PowerOn_ESXiBladeInformation1-1.HostLocation>
        <PowerOn_ESXiBladeInformation1-1.ESXiHostName>ESC-DR-ESX01</PowerOn_ESXiBladeInformation1-1.ESXiHostName>
        <PowerOn_ESXiBladeInformation1-1.ManagedOrUnManaged>Managed</PowerOn_ESXiBladeInformation1-1.ManagedOrUnManaged>
        <PowerOn_ESXiBladeInformation1-1.BladeType>1</PowerOn_ESXiBladeInformation1-1.BladeType>
        <PowerOn_ESXiBladeInformation1-1.VirtualDataCenterName>ESC-DR</PowerOn_ESXiBladeInformation1-1.VirtualDataCenterName>
        <PowerOn_ESXiBladeInformation1-1.ClusterName>DR-Cluster</PowerOn_ESXiBladeInformation1-1.ClusterName>
        <PowerOn_ESXiBladeInformation1-1.vSphereVersion>5.1</PowerOn_ESXiBladeInformation1-1.vSphereVersion>
        <PowerOn_ESXiBladeInformation1-1.vSphereBuildVersion>latest</PowerOn_ESXiBladeInformation1-1.vSphereBuildVersion>
        <PowerOn_ESXiBladeInformation1-1.PoolNames />
        <PowerOn_ESXiBladeInformation1-1.ESXiBootPartitionSize>10</PowerOn_ESXiBladeInformation1-1.ESXiBootPartitionSize>
        <PowerOn_ESXiBladeInformation1-1.DRSSettings />
        <PowerOn_ESXiBladeInformation1-1.HASettings />
        <PowerOn_ESXiBladeInformation1-1.AffinitySettings />
        <PowerOn_ESXiBladeInformation1-1.EVCSettings />
        <PowerOn_ESXiBladeInformation1-1.Uplinks />
        <PowerOn_ESXiBladeInformation1-1.vSwitchName />
        <PowerOn_ESXiBladeInformation1-1.Security>Yes</PowerOn_ESXiBladeInformation1-1.Security>
        <PowerOn_ESXiBladeInformation1-1.TrafficShaping />
        <PowerOn_ESXiBladeInformation1-1.NICTeaming>Yes</PowerOn_ESXiBladeInformation1-1.NICTeaming>
        <PowerOn_ESXiBladeInformation1-2.Name />
        <PowerOn_ESXiBladeInformation1-2.HostLocation>MELBOURNE</PowerOn_ESXiBladeInformation1-2.HostLocation>
        <PowerOn_ESXiBladeInformation1-2.ESXiHostName>ESC-DR-ESX02</PowerOn_ESXiBladeInformation1-2.ESXiHostName>
        <PowerOn_ESXiBladeInformation1-2.ManagedOrUnManaged>Managed</PowerOn_ESXiBladeInformation1-2.ManagedOrUnManaged>
        <PowerOn_ESXiBladeInformation1-2.BladeType>1</PowerOn_ESXiBladeInformation1-2.BladeType>
        <PowerOn_ESXiBladeInformation1-2.VirtualDataCenterName>ESC-DR</PowerOn_ESXiBladeInformation1-2.VirtualDataCenterName>
        <PowerOn_ESXiBladeInformation1-2.ClusterName>DR-Cluster</PowerOn_ESXiBladeInformation1-2.ClusterName>
        <PowerOn_ESXiBladeInformation1-2.vSphereVersion>5.1</PowerOn_ESXiBladeInformation1-2.vSphereVersion>
        <PowerOn_ESXiBladeInformation1-2.vSphereBuildVersion>latest</PowerOn_ESXiBladeInformation1-2.vSphereBuildVersion>
        <PowerOn_ESXiBladeInformation1-2.PoolNames />
        <PowerOn_ESXiBladeInformation1-2.ESXiBootPartitionSize>10</PowerOn_ESXiBladeInformation1-2.ESXiBootPartitionSize>
        <PowerOn_ESXiBladeInformation1-2.DRSSettings />
        <PowerOn_ESXiBladeInformation1-2.HASettings />
        <PowerOn_ESXiBladeInformation1-2.AffinitySettings />
        <PowerOn_ESXiBladeInformation1-2.EVCSettings />
        <PowerOn_ESXiBladeInformation1-2.Uplinks />
        <PowerOn_ESXiBladeInformation1-2.vSwitchName />
        <PowerOn_ESXiBladeInformation1-2.Security>Yes</PowerOn_ESXiBladeInformation1-2.Security>
        <PowerOn_ESXiBladeInformation1-2.TrafficShaping />
        <PowerOn_ESXiBladeInformation1-2.NICTeaming>Yes</PowerOn_ESXiBladeInformation1-2.NICTeaming>
        <PowerOn_ESXiBladeManagementPortGroup-1.Name />
        <PowerOn_ESXiBladeManagementPortGroup-1.HostLocation>MELBOURNE</PowerOn_ESXiBladeManagementPortGroup-1.HostLocation>
        <PowerOn_ESXiBladeManagementPortGroup-1.ESXiHostName>ESC-DR-ESX01</PowerOn_ESXiBladeManagementPortGroup-1.ESXiHostName>
        <PowerOn_ESXiBladeManagementPortGroup-1.ManagedOrUnManaged>Managed</PowerOn_ESXiBladeManagementPortGroup-1.ManagedOrUnManaged>
        <PowerOn_ESXiBladeManagementPortGroup-1.ManagementPNNetworkName>ESX_MANAGEMENT</PowerOn_ESXiBladeManagementPortGroup-1.ManagementPNNetworkName>
        <PowerOn_ESXiBladeManagementPortGroup-1.ManagementIPAddress>172.16.3.21</PowerOn_ESXiBladeManagementPortGroup-1.ManagementIPAddress>
        <PowerOn_ESXiBladeManagementPortGroup-1.ManagementSubnetMask>255.255.255.0</PowerOn_ESXiBladeManagementPortGroup-1.ManagementSubnetMask>
        <PowerOn_ESXiBladeManagementPortGroup-1.DefaultGatewayOrHSRPAddress>172.16.3.1</PowerOn_ESXiBladeManagementPortGroup-1.DefaultGatewayOrHSRPAddress>
        <PowerOn_ESXiBladeManagementPortGroup-1.ManagementSecurity>Yes</PowerOn_ESXiBladeManagementPortGroup-1.ManagementSecurity>
        <PowerOn_ESXiBladeManagementPortGroup-1.ManagementTrafficShaping>Yes</PowerOn_ESXiBladeManagementPortGroup-1.ManagementTrafficShaping>
        <PowerOn_ESXiBladeManagementPortGroup-1.ManagementNICTeaming>Yes</PowerOn_ESXiBladeManagementPortGroup-1.ManagementNICTeaming>
        <PowerOn_ESXiBladeManagementPortGroup-2.Name />
        <PowerOn_ESXiBladeManagementPortGroup-2.HostLocation>MELBOURNE</PowerOn_ESXiBladeManagementPortGroup-2.HostLocation>
        <PowerOn_ESXiBladeManagementPortGroup-2.ESXiHostName>ESC-DR-ESX02</PowerOn_ESXiBladeManagementPortGroup-2.ESXiHostName>
        <PowerOn_ESXiBladeManagementPortGroup-2.ManagedOrUnManaged>Managed</PowerOn_ESXiBladeManagementPortGroup-2.ManagedOrUnManaged>
        <PowerOn_ESXiBladeManagementPortGroup-2.ManagementPNNetworkName>ESX_MANAGEMENT</PowerOn_ESXiBladeManagementPortGroup-2.ManagementPNNetworkName>
        <PowerOn_ESXiBladeManagementPortGroup-2.ManagementIPAddress>172.16.3.22</PowerOn_ESXiBladeManagementPortGroup-2.ManagementIPAddress>
        <PowerOn_ESXiBladeManagementPortGroup-2.ManagementSubnetMask>255.255.255.0</PowerOn_ESXiBladeManagementPortGroup-2.ManagementSubnetMask>
        <PowerOn_ESXiBladeManagementPortGroup-2.DefaultGatewayOrHSRPAddress>172.16.3.1</PowerOn_ESXiBladeManagementPortGroup-2.DefaultGatewayOrHSRPAddress>
        <PowerOn_ESXiBladeManagementPortGroup-2.ManagementSecurity>Yes</PowerOn_ESXiBladeManagementPortGroup-2.ManagementSecurity>
        <PowerOn_ESXiBladeManagementPortGroup-2.ManagementTrafficShaping>Yes</PowerOn_ESXiBladeManagementPortGroup-2.ManagementTrafficShaping>
        <PowerOn_ESXiBladeManagementPortGroup-2.ManagementNICTeaming>Yes</PowerOn_ESXiBladeManagementPortGroup-2.ManagementNICTeaming>
        <PowerOn_ESXiBladevMotionPortGroup-1.Name />
        <PowerOn_ESXiBladevMotionPortGroup-1.HostLocation>MELBOURNE</PowerOn_ESXiBladevMotionPortGroup-1.HostLocation>
        <PowerOn_ESXiBladevMotionPortGroup-1.ESXiHostName>ESC-DR-ESX01</PowerOn_ESXiBladevMotionPortGroup-1.ESXiHostName>
        <PowerOn_ESXiBladevMotionPortGroup-1.ManagedOrUnManaged>Managed</PowerOn_ESXiBladevMotionPortGroup-1.ManagedOrUnManaged>
        <PowerOn_ESXiBladevMotionPortGroup-1.vMotionPNNetworkName>ESX_VMOTION</PowerOn_ESXiBladevMotionPortGroup-1.vMotionPNNetworkName>
        <PowerOn_ESXiBladevMotionPortGroup-1.vMotionIPAddress>172.16.4.21</PowerOn_ESXiBladevMotionPortGroup-1.vMotionIPAddress>
        <PowerOn_ESXiBladevMotionPortGroup-1.vMotionSubnetMask>255.255.255.0</PowerOn_ESXiBladevMotionPortGroup-1.vMotionSubnetMask>
        <PowerOn_ESXiBladevMotionPortGroup-1.DefaultGatewayOrHSRPAddress>N/A</PowerOn_ESXiBladevMotionPortGroup-1.DefaultGatewayOrHSRPAddress>
        <PowerOn_ESXiBladevMotionPortGroup-1.vMotionSecurity>Yes</PowerOn_ESXiBladevMotionPortGroup-1.vMotionSecurity>
        <PowerOn_ESXiBladevMotionPortGroup-1.vMotionTrafficShaping>Yes</PowerOn_ESXiBladevMotionPortGroup-1.vMotionTrafficShaping>
        <PowerOn_ESXiBladevMotionPortGroup-1.vMotionNICTeaming>Yes</PowerOn_ESXiBladevMotionPortGroup-1.vMotionNICTeaming>
        <PowerOn_ESXiBladevMotionPortGroup-2.Name />
        <PowerOn_ESXiBladevMotionPortGroup-2.HostLocation>MELBOURNE</PowerOn_ESXiBladevMotionPortGroup-2.HostLocation>
        <PowerOn_ESXiBladevMotionPortGroup-2.ESXiHostName>ESC-DR-ESX02</PowerOn_ESXiBladevMotionPortGroup-2.ESXiHostName>
        <PowerOn_ESXiBladevMotionPortGroup-2.ManagedOrUnManaged>Managed</PowerOn_ESXiBladevMotionPortGroup-2.ManagedOrUnManaged>
        <PowerOn_ESXiBladevMotionPortGroup-2.vMotionPNNetworkName>ESX_VMOTION</PowerOn_ESXiBladevMotionPortGroup-2.vMotionPNNetworkName>
        <PowerOn_ESXiBladevMotionPortGroup-2.vMotionIPAddress>172.16.4.22</PowerOn_ESXiBladevMotionPortGroup-2.vMotionIPAddress>
        <PowerOn_ESXiBladevMotionPortGroup-2.vMotionSubnetMask>255.255.255.0</PowerOn_ESXiBladevMotionPortGroup-2.vMotionSubnetMask>
        <PowerOn_ESXiBladevMotionPortGroup-2.DefaultGatewayOrHSRPAddress>N/A</PowerOn_ESXiBladevMotionPortGroup-2.DefaultGatewayOrHSRPAddress>
        <PowerOn_ESXiBladevMotionPortGroup-2.vMotionSecurity>Yes</PowerOn_ESXiBladevMotionPortGroup-2.vMotionSecurity>
        <PowerOn_ESXiBladevMotionPortGroup-2.vMotionTrafficShaping>Yes</PowerOn_ESXiBladevMotionPortGroup-2.vMotionTrafficShaping>
        <PowerOn_ESXiBladevMotionPortGroup-2.vMotionNICTeaming>Yes</PowerOn_ESXiBladevMotionPortGroup-2.vMotionNICTeaming>
        <PowerOn_ESXiBladeVMWarePortGroup-1.Name />
        <PowerOn_ESXiBladeVMWarePortGroup-1.HostLocation>SYDNEY</PowerOn_ESXiBladeVMWarePortGroup-1.HostLocation>
        <PowerOn_ESXiBladeVMWarePortGroup-1.ESXiHostName />
        <PowerOn_ESXiBladeVMWarePortGroup-1.ManagedOrUnManaged>Managed</PowerOn_ESXiBladeVMWarePortGroup-1.ManagedOrUnManaged>
          <PowerOn_NonESXiBladeServer-1.BootPartitionSize />
        <PowerOn_NonESXiBladeServer-1.DriveLetter />
        <PowerOn_NonESXiBladeServer-1.PartitionPoolOfStorage>Standard</PowerOn_NonESXiBladeServer-1.PartitionPoolOfStorage>
        <PowerOn_NonESXiBladeServer-1.PartitionNumber>0</PowerOn_NonESXiBladeServer-1.PartitionNumber>
        <PowerOn_NonESXiBladeServer-1.PartitionSize />
        <PowerOn_NonESXiBladeServer-1.MountPoint />
        <PowerOn_NonESXiBladeServer-1.PoolOfStorage>Standard</PowerOn_NonESXiBladeServer-1.PoolOfStorage>
        <PowerOn_FirewallAccessSydney.Name />
        <PowerOn_FirewallAccessSydney.NumberConnectedToFirewall>0</PowerOn_FirewallAccessSydney.NumberConnectedToFirewall>
        <PowerOn_CommentsSydneyFirewall.Name />
        <PowerOn_CommentsSydneyFirewall.Comments />
        <PowerOn_FirewallAccessToNetworkSydney-1.Name />
        <PowerOn_FirewallAccessToNetworkSydney-1.PrivateNetworkNumber />
        <PowerOn_FirewallAccessToNetworkSydney-1.PrivateNetworkName />
        <PowerOn_FirewallAccessToNetworkSydney-1.Zone />
        <PowerOn_FirewallAccessToNetworkSydney-1.Mask />
        <PowerOn_FirewallAccessToNetworkSydney-1.FWVRRPIP />
        <PowerOn_FirewallAccessToNetworkSydney-1.FWPrimaryIP />
        <PowerOn_FirewallAccessToNetworkSydney-1.FWSecondaryIP />
        <PowerOn_FirewallAccessInternetSydney.Name />
        <PowerOn_FirewallAccessInternetSydney.RequireComputeInternet>Not Provided</PowerOn_FirewallAccessInternetSydney.RequireComputeInternet>
        <PowerOn_FirewallAccessInternetSydney.RouteToCustomerVPN />
        <PowerOn_FirewallInboundTranslationSydney-1.Name />
        <PowerOn_FirewallInboundTranslationSydney-1.OrigSourceAddress />
        <PowerOn_FirewallInboundTranslationSydney-1.OrigSourcePort />
        <PowerOn_FirewallInboundTranslationSydney-1.OrigDestinationAddress />
        <PowerOn_FirewallInboundTranslationSydney-1.OrigDestinationPort />
        <PowerOn_FirewallInboundTranslationSydney-1.TransSourceAddress />
        <PowerOn_FirewallInboundTranslationSydney-1.TransSourcePort />
        <PowerOn_FirewallInboundTranslationSydney-1.TransDestinationAddress />
        <PowerOn_FirewallInboundTranslationSydney-1.TransDestinationPort />
        <PowerOn_FirewallOutTranslationSydney-1.Name />
        <PowerOn_FirewallOutTranslationSydney-1.OrigSourceAddress />
        <PowerOn_FirewallOutTranslationSydney-1.OrigSourcePort />
        <PowerOn_FirewallOutTranslationSydney-1.OrigDestinationAddress />
        <PowerOn_FirewallOutTranslationSydney-1.OrigDestinationPort />
        <PowerOn_FirewallOutTranslationSydney-1.TransSourceAddress />
        <PowerOn_FirewallOutTranslationSydney-1.TransSourcePort />
        <PowerOn_FirewallOutTranslationSydney-1.TransDestinationAddress />
        <PowerOn_FirewallOutTranslationSydney-1.TransDestinationPort />
        <PowerOn_FirewallInboundRulesSydney-1.Name />
        <PowerOn_FirewallInboundRulesSydney-1.SourceAddress />
        <PowerOn_FirewallInboundRulesSydney-1.SourcePort />
        <PowerOn_FirewallInboundRulesSydney-1.SourceZone />
        <PowerOn_FirewallInboundRulesSydney-1.DestinationAddress />
        <PowerOn_FirewallInboundRulesSydney-1.DestinationPort />
        <PowerOn_FirewallInboundRulesSydney-1.DestinationZone />
        <PowerOn_FirewallInboundRulesSydney-1.Permit>Permit</PowerOn_FirewallInboundRulesSydney-1.Permit>
        <PowerOn_FirewallAccessMelbourne.Name />
        <PowerOn_FirewallAccessMelbourne.NumberConnectedToFirewall>1</PowerOn_FirewallAccessMelbourne.NumberConnectedToFirewall>
        <PowerOn_CommentsMelbourneFirewall.Name />
        <PowerOn_CommentsMelbourneFirewall.Comments />
        <PowerOn_FirewallAccessToNetworkMelbourne-1.Name />
        <PowerOn_FirewallAccessToNetworkMelbourne-1.PrivateNetworkNumber>PN5</PowerOn_FirewallAccessToNetworkMelbourne-1.PrivateNetworkNumber>
        <PowerOn_FirewallAccessToNetworkMelbourne-1.PrivateNetworkName>DR_Internet</PowerOn_FirewallAccessToNetworkMelbourne-1.PrivateNetworkName>
        <PowerOn_FirewallAccessToNetworkMelbourne-1.Zone>DMZ</PowerOn_FirewallAccessToNetworkMelbourne-1.Zone>
        <PowerOn_FirewallAccessToNetworkMelbourne-1.Mask>172.16.6.0/24</PowerOn_FirewallAccessToNetworkMelbourne-1.Mask>
        <PowerOn_FirewallAccessToNetworkMelbourne-1.FWVRRPIP>172.16.6.2</PowerOn_FirewallAccessToNetworkMelbourne-1.FWVRRPIP>
        <PowerOn_FirewallAccessToNetworkMelbourne-1.FWPrimaryIP>172.16.6.3</PowerOn_FirewallAccessToNetworkMelbourne-1.FWPrimaryIP>
        <PowerOn_FirewallAccessToNetworkMelbourne-1.FWSecondaryIP>172.16.6.1</PowerOn_FirewallAccessToNetworkMelbourne-1.FWSecondaryIP>
        <PowerOn_FirewallAccessInternetMelbourne.Name />
        <PowerOn_FirewallAccessInternetMelbourne.RequireComputeInternet>Dedicated</PowerOn_FirewallAccessInternetMelbourne.RequireComputeInternet>
        <PowerOn_FirewallAccessInternetMelbourne.RouteToCustomerVPN>Yes</PowerOn_FirewallAccessInternetMelbourne.RouteToCustomerVPN>
        <PowerOn_FirewallInboundTransMelbourne-1.Name />
        <PowerOn_FirewallInboundTransMelbourne-1.OrigSourceAddress />
        <PowerOn_FirewallInboundTransMelbourne-1.OrigSourcePort />
        <PowerOn_FirewallInboundTransMelbourne-1.OrigDestinationAddress />
        <PowerOn_FirewallInboundTransMelbourne-1.OrigDestinationPort />
        <PowerOn_FirewallInboundTransMelbourne-1.TransSourceAddress />
        <PowerOn_FirewallInboundTransMelbourne-1.TransSourcePort />
        <PowerOn_FirewallInboundTransMelbourne-1.TransDestinationAddress />
        <PowerOn_FirewallInboundTransMelbourne-1.TransDestinationPort />
        <PowerOn_FirewallOutTranslationMelbourne-1.Name />
        <PowerOn_FirewallOutTranslationMelbourne-1.OrigSourceAddress />
        <PowerOn_FirewallOutTranslationMelbourne-1.OrigSourcePort />
        <PowerOn_FirewallOutTranslationMelbourne-1.OrigDestinationAddress />
        <PowerOn_FirewallOutTranslationMelbourne-1.OrigDestinationPort />
        <PowerOn_FirewallOutTranslationMelbourne-1.TransSourceAddress />
        <PowerOn_FirewallOutTranslationMelbourne-1.TransSourcePort />
        <PowerOn_FirewallOutTranslationMelbourne-1.TransDestinationAddress />
        <PowerOn_FirewallOutTranslationMelbourne-1.TransDestinationPort />
        <PowerOn_FirewallInboundRulesMelbourne-1.Name />
        <PowerOn_FirewallInboundRulesMelbourne-1.SourceAddress />
        <PowerOn_FirewallInboundRulesMelbourne-1.SourcePort />
        <PowerOn_FirewallInboundRulesMelbourne-1.SourceZone />
        <PowerOn_FirewallInboundRulesMelbourne-1.DestinationAddress />
        <PowerOn_FirewallInboundRulesMelbourne-1.DestinationPort />
        <PowerOn_FirewallInboundRulesMelbourne-1.DestinationZone />
        <PowerOn_FirewallInboundRulesMelbourne-1.Permit>Permit</PowerOn_FirewallInboundRulesMelbourne-1.Permit>
        <Service_Common.ErrorCode>9999</Service_Common.ErrorCode>
        <Service_Common.ErrorDescription>An unknown error has occured.</Service_Common.ErrorDescription>
        <Service_Common.AutomationSummaryURL />
        <Service_Common.ProcessInstanceId />
        <Service_Common.Option1 />
        <Service_Common.Option2 />
        <Service_Common.Option3 />
    </FormData>
</root>

我目前拥有的 XSLT 是:

<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output omit-xml-declaration="yes" indent="yes"/>

 <xsl:template match="/*">
  <table><xsl:apply-templates select="FormData"/></table>
 </xsl:template>

 <xsl:template match="FormData[1]">
  <tr><xsl:apply-templates select="*" mode="header"/></tr>
  <xsl:call-template name="standardRow"/>
 </xsl:template>

 <xsl:template match="FormData" name="standardRow">
  <tr><xsl:apply-templates select="*"/></tr>
 </xsl:template>

 <xsl:template match="FormData/*">
  <td><xsl:apply-templates select="node()"/></td>
 </xsl:template>

 <xsl:template match="FormData/*" mode="header">
  <th><xsl:value-of select="name()"/></th>
 </xsl:template>
</xsl:stylesheet>

我需要以下表格:

<table>
 <tr><td>PowerOn_Compute.Name</td><td></td></tr>
 <tr><td>PowerOn_Compute.BorisID</td><td>19001</td></tr>
 .....
</table>

这样试试:

XSLT 1.0

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>

<xsl:template match="/root">
    <xsl:variable name="col" select="FormData"/>
    <xsl:variable name="row" select="FormData[1]/*"/>
    <table border="1">
        <xsl:for-each select="$row">
            <xsl:variable name="i" select="position()"/>
            <tr>
                <td><xsl:value-of select="name()"/></td>
                <xsl:for-each select="$col">
                    <td><xsl:value-of select="*[$i]"/></td>
                </xsl:for-each>
            </tr>    
        </xsl:for-each>
    </table>
</xsl:template>

</xsl:stylesheet>