Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 3rd, 2013, 06:14 PM
Registered User
 
Join Date: Aug 2013
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default Changing a URI on a stylesheet with C#

I am running some reports with C#. After I running them I need to running them through a xslt stylesheet. There are multiple files everytime I run it. Is there a way to edit the xslt stylesheet with C#? It would be for the param "uri" select attr.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="2.0">
    
    <xsl:param name="identifier"/>
    <xsl:param name="uri" select="'file:///D:/XSLT/file.csv'"/>
    <xsl:template match"/">
          .........
    </xsl:template>
</xsl:stylesheet>
 
Old September 3rd, 2013, 06:23 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You don't need to modify the stylesheet to set a parameter value. The API for your chosen XSLT processor will provide a mechanism to set the value of the parameter before running the transformation.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
getting Namespace uri rock3111 XSLT 6 July 1st, 2012 04:57 AM
tagdir uri thelemur BOOK: Beginning JavaServer Pages 0 May 26th, 2011 09:48 AM
Set the Base URI of the stylesheet bonekrusher XSLT 3 February 19th, 2010 09:14 AM
Changing Stylesheet on runtime Thagi ASP.NET 1.x and 2.0 Application Design 2 February 17th, 2006 10:03 AM
Referrer and Uri druid2112 General .NET 1 April 20th, 2004 12:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.