2008-10-08 8 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

변환의 어떤 종류의 당신이 찾고있는

는 목적은 주로 정보 제공되고 있지만, XML을 검증하는 좋은 부작용으로 (이 무효가 지난 경우는 렌더링되지 않습니다)? 정보 제공의 목적으로 만 사용 하시겠습니까? 변환하려는 세부 수준은 어느 정도입니까?

보여줄 수있는 솔루션에