473,500 Members | 1,955 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

assign values to variabiles

mickey0
142 New Member
Hello,
I have this string: <hello>\n<world>
And I have to do this:
Expand|Select|Wrap|Line Numbers
  1.  <xsl:param name="string"/>
  2.        //assigns substring-before($string,'\n') to $ var1
  3.        //assigns substring-after($string,'\n') to $ var2  
  4.        <xsl:if test= start-with($var1,'<') and end-with($var1,'>'  
  5.           and  start-with($var2,'<') and end-with($var2,'>'     >
  6.                 //doSomething
  7.        </xsl:if>
  8.  
I have to know if what is before and after '\n' are two tags...
I'm using xslt 1.0; but what I try hard is assign a these values to var1 and var2.
How can I do, please?
thanks,
Jul 24 '08 #1
1 1546
Dormilich
8,658 Recognized Expert Moderator Expert
I think you should assing the strings between < and > to another parameter and compare those.
If fn:replace() is working you might try something like
Expand|Select|Wrap|Line Numbers
  1. <xsl:param name="str1" select="replace($var1, "<([^>]+)>")", "$1" />
  2. ...
  3. <xsl:if test="$str1 != $str2">
  4.     // doSomething
  5. </xsl:if>
Aug 24 '08 #2

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

Similar topics

7
21918
by: Paul via AccessMonster.com | last post by:
I have a report with some Unbound text boxes. I want to shows the values in these text boxes from my VBA code. How can I assign the valuse thru code ? Pls help me. -- Message posted via...
26
7026
by: Brett | last post by:
I have created a structure with five fields. I then create an array of this type of structure and place the structure into an array element. Say index one. I want to assign a value to field3 of...
1
1400
by: Matt | last post by:
All - Is there a preferred method to assign session variables in ASP.NET / VB.NET? It looks like you can do any of the following to assign values: Session.Item("Foo") = "Bar"...
8
7379
by: Sergei | last post by:
Hi, I am displaying modal dialog and passing values from the main form to the modal dialog and back. It works fine but if I used the following syntax on Page_Load(just for testing) in VB to...
7
2699
by: Chris Wertman | last post by:
I am so lost on this one. Dim Ary as Integer = New Integer(4) {0,1,2,3} FAILS with the error: Array initializer has 1 too few elements. So I try Dim Ary as Integer = New Integer(3)...
6
2246
by: david | last post by:
I try to use "for" loop to retrieve and assign values in web form. The code is in the following. But it can not be compiled. What I want to do is: txtQ1.Text =...
4
2492
by: Avi | last post by:
Hi I am creating web application in which i want to assign by default values to the property which i had created my own. In that one of the property is of type color and i am unable to assign...
5
8060
by: howa | last post by:
Hi, Consider a simple example, e.g. var a = { 'a': 'b', 'c': 'd' }
3
27892
by: bharathi228 | last post by:
hi, how to assign a array as datasource to datagridview in vb.net. my problem is iam having an array with 60 values
0
7136
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,...
0
7018
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...
0
7182
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7232
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...
1
6906
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...
0
5490
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,...
1
4923
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...
0
1430
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 ...
1
672
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.