473,804 Members | 3,250 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# XSLT xsl:param help needed

1 New Member
Hello,

I have coded a C# program that passes an argument list to my XSLT file. I get no errors, but I don't get any output either.

Here's what I want to do: pass a parameter that is an XPath epression to be processed by XSLT.

Here's my XSLT:

<xsl:template match="/">
<xsl:param name = "pmtr"/>

<br></br>
TV Data from: <xsl:value-of select="ms:form at-date(//@from,MMMdyy,'e n-US')"/>
to: <xsl:value-of select="ms:form at-date(//@to,MMMdyy,'en-US')"/>
<xsl:for-each select="//df:programs/df:program[df:title='$pmtr ']">

I've tried various combinations and syntaxes of $pmtr, but nothing works. I've also spend many hours surfing the web and reading reference books on the subject and have come up with nothing. However, it seems that parameters and variables simply cannot be used in an XPath expression.

Can anyone help or suggest an alternative? What I want to do is create a C# form where the user will enter the XPath query and then pass it on to the xslt file for processing.

Thanks!
Dec 24 '06 #1
0 1807

Sign in to post your reply or Sign up for a free account.

Similar topics

3
11052
by: Karsten Weinert | last post by:
Hi! Can you please explain to me the difference between a xsl:param and a xsl:variable? Since I can assign a value to both only once, what's the point? A small example would help me a lot. Regards, Karsten. -- The email above is not in use. Please write to k dot weinert at gmx dot net.
2
2011
by: philips | last post by:
Hi everybody, I am using the Xalan 1.8 C++ API in a real-time financial application which need to apply XSLT transformations on XML input messages received on-the- fly. On the process output, I get the transformed output XML. In the XSLT stylesheet, I defined several templates which take input parameters (like function calls) and I also defined global XSL variables.
2
1714
by: Raghavendra RAV | last post by:
Hi, Is it possible to pass mutiple values to xsl parameters ? Please guide me.. if any other alternative ways to achieve this, please inform.. Thanks, Raghu CSS India
1
5495
by: kurt hansen | last post by:
hi I thought that this would be easy, but maybe not so much. I want to: pass an xpath expression and a string value to a stylesheet and copy the source xml document, changing the value of the node described by the xpath expression, to the new value.
1
2186
by: Tjerk Wolterink | last post by:
Xsl stylesheet can accept parameters, but can you also give an array-data-type parameter?? With xsl parameters i mean these: Well i solved my problem but these <xsl:param name="param1"/>
0
1299
by: kirashet | last post by:
Hello everybody, I tried to make a XSL:FO - Sheet where I can control if the PDF should be printed in portrait or landscape. My results so far: <xsl:param name="printingtype" select="'landscape'"> <xsl:variable name="pageheight"> <xsl:choose> <xsl:when
12
3421
by: Keith Chadwick | last post by:
I have a fairly hefty XSLT file that for the sake of debugging and clarity I wish to split into some separate sub-templates contained within the same file. The master template calls an apply-templates and passes a node set to it. This template in turn defines approximately 15 variables that dictate how the following template should proceed. Pseudo example: <!-- Root transformation called via .NET XSLTransform()--> <xsl:template...
2
1889
by: junkblog747 | last post by:
What will the expression "/.." in the attribute select="/.." return? I just inherited a huge stylesheet to maintain which has a lot of parameters such as <xsl:param name="myParam" select="/.."/>. And then there is a lot of conditional processing based on this parameter. I stepped thru the code with a debugger in Oxygen and saw that the param is always empty (0 nodes selected). I am trying to figure what the original author of the...
1
3253
by: V4mp1r3 | last post by:
Hi ! I'm making a XSL that returns distinct values from a XML Element, but the element is dynamic, so i pass it from the server as a Parameter. XSL: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" />
0
9708
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9588
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10327
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3828
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.