S
shapper
Hello,
I am transforming a XML file into another XML file using a XSLT.
Everything is working fine! I have only one problem:
I want one of the values in my XSLT file to be taken from a Key in my
Web.Config AppSettings!
Please see the XSLT code:
Hi,
I was reading some Merge Methods in the web but I am having some
problems making this work.
Look at my XSLT code:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.google.com/schemas/sitemap/0.84"
xmlns:dk="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<xslutput method="xml" version="1.0" encoding="UTF-8"
indent="yes"/>
<xsl:template match="dk:*"/>
<xsl:template match="@*|text()|comment()"/>
<xsl:template match="/">
<xsl:element name="urlset">
<xsl:apply-templates select="//dk:siteMapNode[@google='true']"/>
</xsl:element>
</xsl:template>
<xsl:template match="dk:siteMapNode">
<xsl:element name="url">
<xsl:element name="loc">
<xsl:text>http://www.MYDOMAIN.com/</xsl:text>
<xsl:value-of select="substring(@url, 3)"/>
</xsl:element>
<xsl:element name="lastmod">
<xsl:value-of select="@lastmod"/>
</xsl:element>
<xsl:element name="changefreq">
<xsl:value-of select="@changefreq"/>
</xsl:element>
<xsl:element name="priority">
<xsl:value-of select="@priority"/>
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Do you see the line?
<xsl:text>http://www.MYDOMAIN.com/</xsl:text>
I want "http://www.MYDOMAIN.com/" to be taken from a Key in Application
Settings in my Web.Config or at run time before the XML file is
displayed.
Thanks,
Miguel
I am transforming a XML file into another XML file using a XSLT.
Everything is working fine! I have only one problem:
I want one of the values in my XSLT file to be taken from a Key in my
Web.Config AppSettings!
Please see the XSLT code:
Hi,
I was reading some Merge Methods in the web but I am having some
problems making this work.
Look at my XSLT code:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.google.com/schemas/sitemap/0.84"
xmlns:dk="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<xslutput method="xml" version="1.0" encoding="UTF-8"
indent="yes"/>
<xsl:template match="dk:*"/>
<xsl:template match="@*|text()|comment()"/>
<xsl:template match="/">
<xsl:element name="urlset">
<xsl:apply-templates select="//dk:siteMapNode[@google='true']"/>
</xsl:element>
</xsl:template>
<xsl:template match="dk:siteMapNode">
<xsl:element name="url">
<xsl:element name="loc">
<xsl:text>http://www.MYDOMAIN.com/</xsl:text>
<xsl:value-of select="substring(@url, 3)"/>
</xsl:element>
<xsl:element name="lastmod">
<xsl:value-of select="@lastmod"/>
</xsl:element>
<xsl:element name="changefreq">
<xsl:value-of select="@changefreq"/>
</xsl:element>
<xsl:element name="priority">
<xsl:value-of select="@priority"/>
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Do you see the line?
<xsl:text>http://www.MYDOMAIN.com/</xsl:text>
I want "http://www.MYDOMAIN.com/" to be taken from a Key in Application
Settings in my Web.Config or at run time before the XML file is
displayed.
Thanks,
Miguel