By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,515 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,515 IT Pros & Developers. It's quick & easy.

Insert one value in my XSLT code

P: n/a

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:


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:output method="xml" version="1.0" encoding="UTF-8"
<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:template match="dk:siteMapNode">
<xsl:element name="url">
<xsl:element name="loc">
<xsl:value-of select="substring(@url, 3)"/>
<xsl:element name="lastmod">
<xsl:value-of select="@lastmod"/>
<xsl:element name="changefreq">
<xsl:value-of select="@changefreq"/>
<xsl:element name="priority">
<xsl:value-of select="@priority"/>

Do you see the line?


I want "" to be taken from a Key in Application
Settings in my Web.Config or at run time before the XML file is



Oct 27 '06 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Read up on stylesheet parameters, or extension functions, depending on
how your execution environment works.
Oct 27 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.