473,763 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Variable node-set with document() function

1 New Member
<xsl:call-template name="Blanks">
<xsl:with-param name="NumPop" select="$NoOfBl oggs"/>
<xsl:with-param name="Required" select="10"/>
<xsl:with-param name="FileName" select="'fred.x ml'"/>
<xsl:with-param name="BlankTags " select="'/Fred/Bloggs'"/>
</xsl:call-template>
<xsl:template name="Blanks">
<xsl:param name="NumPop"/>
<xsl:param name="Required"/>
<xsl:param name="FileName"/>
<xsl:param name="BlankTags "/>
<xsl:variable name="vtestPass ed">
<xsl:if test="$NumPop &lt; $Required">
<xsl:text>tru e</xsl:text>
</xsl:if>
</xsl:variable>
<xsl:if test="$vtestPas sed='true'">
<xsl:copy-of select="documen t($FileName, $BlankTags)"/>
<xsl:call-template name="Blanks">
<xsl:with-param name="NumPop" select="$NumPop + 1"/>
<xsl:with-param name="Required" select="$Requir ed"/>
<xsl:with-param name="FileName" select="$FileNa me"/>
<xsl:with-param name="BlankTags " select="$BlankT ags"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

If I substitute the node set $BlankTags for "/Fred/Bloggs" in the document() function it works, but if I try and use a variable ($BlankTags) I get the following error

XSLT 1.0 Debugging Error:Error in function document, Not a node set


Any ideas how I can make this work please?
Aug 29 '07 #1
1 1935
jkmyoung
2,057 Recognized Expert Top Contributor
Are you trying to get:
<xsl:copy-of select="documen t($FileName)/Fred/Bloggs"/>
?

It sounds like you're trying to use the exslt:evaluate function.
http://www.exslt.org/dyn/functions/evaluate/
Aug 29 '07 #2

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

Similar topics

1
1692
by: Piet | last post by:
Hello, I am planning to program an Xml displayer that will show an Xml file in a tree view. This will involve the development of a tailored tree model which will use DOM nodes instead of the DefaultMutableTreeNode. To get an idea of how a tree model can be generated, I have downloaded an example from the sun homepage in which file objects are used as TreeNodes. This program resembles mine in that the tree will be constructed from objects...
4
2589
by: sylvain.loiseau | last post by:
Hello Given a node set, I try to compute the total of the string-length value of each node. For instance, with : <xsl:for-each select="//q"> <!-- the length of each node is compute with: --> <xsl:value-of select="string-length(.)" />
3
1632
by: Supa Hoopsa | last post by:
I am using a treeview and within each node, I want to store the name of the function that was called to create the node's data. Then whenever a user selects this node, I want to be able to call that function without having to create a huge SELECT CASE statement. i.e. Node.123's data is created in a function called "fnGetProjectDetails"
5
56573
by: seans | last post by:
Hi, Is there a way to create a static variable in Javascript? I want to use a recursive function to traverse a DOM tree and examine each node. If the node is a text object I would like to save the text to a string or array. Is it possible to create an array or string variable to do this? Any advice would be greatly appreciated. Thanks again. sean
134
7910
by: James A. Donald | last post by:
I am contemplating getting into Python, which is used by engineers I admire - google and Bram Cohen, but was horrified to read "no variable or argument declarations are necessary." Surely that means that if I misspell a variable name, my program will mysteriously fail to work with no error message. If you don't declare variables, you can inadvertently re-use an variable used in an enclosing context when you don't intend to, or
0
1259
by: XML newbie: Urgent pls help! | last post by:
ok, I changed "If node.Text = "Success" " to "If Not loginDom.InnerText Is Nothing ". Now, I don't get the NullReference error but the SessionID I see on screen is concatanated one. It looks like:XXXXXX=YYYYY==, but did I do wrong. Althouggh, I get the message, Satus as Success.Since, I have to use this SessionID in another click event on the same page, how do I do this.I tried, g_SessionID= loginDom.Value g_SessionID =...
9
18688
by: Moses | last post by:
Hi All, How to check weather a node has sibling? Is there any function like " hasChildNodes() " Thanks in Advance Moses
4
10868
by: =?Utf-8?B?c2FtMDFt?= | last post by:
just as the subject states, I need to find a way to read each line from a multiline variable without having to write the string out to a file so I can stream it in and use ReadLine(). Below is a snippet of code where I am trying to read the string that has been passed into the function. //source is the string of data to parse out //nodes is the Xml Node Name in the mappingFile ("/Meters/Ion/Report/Field") //ReadLine indicates whether...
8
1505
by: jj | last post by:
Trying to understand the manual regarding variables to solve the following. I'm working with Drupal CMS and have a loop to retrieve values that are normally fetched by using this variable: $node- incrementing that number 1 so next variable is $node- Here's what I'm trying in my loop to change that number in the variable using $i:
4
2364
by: matth | last post by:
I've been working on something that deals with handling a user's selection within the DOM and I'm tripping up on one last, but crucial, detail. Forgive me for the length of the code, but my question is pretty straightforward and my brain hasn't been working. Problem: The way I'm iterating through the nodes doesn't allow me to preserve the node hierarchy. Instead of:
0
9563
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
9386
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,...
0
9998
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9938
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
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
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
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.