1
是否有人有XSLT将采取app.config并将其渲染为非技术人员可口的格式?通过XSLT渲染App.config/Web.config文件
目的是主要信息,但与验证XML的不错的副作用(如果它已经变为无效,也不会渲染)
是否有人有XSLT将采取app.config并将其渲染为非技术人员可口的格式?通过XSLT渲染App.config/Web.config文件
目的是主要信息,但与验证XML的不错的副作用(如果它已经变为无效,也不会渲染)
首先草案中的溶液,以显示
捶这在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>
什么类型的转换你找谁?仅供参考?你想要改变什么样的细节水平?