I have some values in my web.config that I want to access in my XSLT file. How do I do that?
I have done this to load the config file in my XSLT:
<xsl:variable name="config" select="document('..//Website//web.config')"/>
<p><xsl:value-of select="$config//appSettings/add[@key='Test']/@value"/>
</p>
After this I am stuck - nothing gets rendered.
Ok.I have done some changes.I have tried using a separate XML file and i am able to get value from the file in my variable.
    <xsl:apply-templates select="document('TestXML.xml')/test/Tag1">
    </xsl:apply-templates>
    <xsl:template match="Tag1">
      <xsl:choose>
       <xsl:when test="@sName='myTest'">
        <span>
          <xsl:value-of select="@TestId" />
        </span>
      </xsl:when>
    </xsl:choose>    
  </xsl:template>
I am still confused that while reading the web.config file(which is an xml file), i get an empty variable, but for a pure .xml file i get a value in my variable.
my Test.XML is this
<?xml version="1.0"?>
<test>
  <Tag1 sName="myTest" TestId="328,329">
  </Tag1>
</test>
Please help me as to how could i work with a Web.config file with values under <appsettings> section.