2008-10-08 59 views

回答

2

首先草案中的溶液,以显示

  • 连接字符串
  • 应用程序设置

捶这在App.config:

<?xml-stylesheet type="text/xsl" href="display-config.xslt"?> 

这是内容display-config.xslt:

<?xml version="1.0" encoding="ISO-8859-1"?> 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 

    <xsl:template match="/"> 
    <html> 
    <body> 
    <h2>Settings</h2> 
    <xsl:apply-templates /> 
    </body> 
    </html> 
    </xsl:template>  


    <xsl:template match="connectionStrings"> 
    <h3>Connection Strings</h3> 
    <table border="1"> 
    <tr bgcolor="#abcdef"> 
    <th align="left">Name</th> 
    <th align="left">Connection String</th> 
    </tr> 
    <xsl:for-each select="add"> 
    <tr> 
     <td><xsl:value-of select="@name"/></td> 
     <td><xsl:value-of select="@connectionString"/></td> 
    </tr> 
    </xsl:for-each> 
    </table> 
    </xsl:template> 


    <xsl:template match="appSettings"> 
    <h3>Settings</h3> 
    <table border="1"> 
    <tr bgcolor="#abcdef"> 
    <th align="left">Key</th> 
    <th align="left">Value</th> 
    </tr> 
    <xsl:for-each select="add"> 
    <tr> 
     <td><xsl:value-of select="@key"/></td> 
     <td><xsl:value-of select="@value"/></td> 
    </tr> 
    </xsl:for-each> 
    </table> 
    </xsl:template> 
</xsl:stylesheet> 
0

什么类型的转换你找谁?仅供参考?你想要改变什么样的细节水平?