How get xsl variable
How get xsl variable after transformation in java-code?
Edited by: pasash on Sep 2, 2009 3:43 AM
Of course after the transformation is complete, its internal state is not accessible to the caller. In particular those variables aren't accessible.
Perhaps you could explain what you are trying to do? Not the question you asked, the question you incorrectly thought it was the answer to.
Similar Messages
-
How get hidden variable in adf page
hi..
plz help me how to get the hidden varibles in adf pageWell, you first tell us what a hidden variable is and how you made it hidden.
John -
How get URL variable and show picture?
I have a url, for example:
www.MyWebsite.com/Flash.html?Pic1=1.jpg&Pic2=2.jpg&Pic3=3.jpg
Flash.html has a Flash swf file in it.
In my FLA file I want to dynamically show (in 3 movie clips,
mc1, mc2 & mc3) the 3 pictures from the 3 URL arguments.
How do I do this?
Thanks!To clarify some requirements: I can only use a URL, a HTML
file and SWF (no scripts). AS is ok. Cant use code to create EMBED
params etc...
Also, this has to work in MX.
Any ideas? Thanks. -
I have the following piece of code. The numbers are the number of the code lines.
In line 17 I want to assign a value to the attribute value of the node options. The value should be the value of the xsl-variable "wildart" which i declared in line 7. How can use the value of this variable in line 17 correctly?
1 String xsl =
2 + "<form name=\"wildart\" action=\"/servlet/model/ServletTransformerTest\" method=\"post\">"
3 + "<select name=\"wildart\" onChange=\"form.submit()\">"
4 + "<option>Bitte Ausw�hlen</option>"
5 + "<xsl:for-each select=\"//tier\">"
6 + "<xsl:sort select=\"@wildart\" data-type=\"text\"/>"
7 + "<xsl:variable name=\"wildart\" select=\"@wildart\"/>"
8 + "<xsl:variable name=\"name\" select=\"@name\"/>"
9 + "<xsl:variable name=\"anzahl\" select=\"count(//tier[@wildart=$wildart])\"/>";
10
11 if(optionSelected == null) {
12
13 xsl = xsl
14 + "<xsl:for-each select=\"//tier[@wildart =$wildart]\">"
15 + "<xsl:if test=\"position()=last()\">"
16 + "<xsl:if test=\"@name=$name\">"
17 + "<option value=\"$wildart\">"
18 + "<xsl:value-of select=\"@wildart\"/>"
19 + "</option>"
20 + "</xsl:if>";
21 }use : "<option value=\"{$wildart}\">"
-
How can I get the variable with the value from Thread Run method?
We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
How can I get the variable with the value?
This is sample code:
public class SampleSynchronisation
public static void main(String df[])
sampleThread sathr= new sampleThread();
sathr.start();
System.out.println("This is the value from the run method "+sathr.x);
// I should get Inside the run method::: But I get only Inside
class sampleThread extends Thread
public String x="Inside";
public void run()
x+="the run method";
NB: if i write the variable in to a file I am able to read it from external method. This I dont want to doWe want to access a variable from the run method of a
Thread externally in a class or in a method. I presume you mean a member variable of the thread class and not a local variable inside the run() method.
Even
though I make the variable as public /public static, I
could get the value till the end of the run method
only. After that scope of the variable gets lost
resulting to null value in the called method/class..
I find it easier to implement the Runnable interface rather than extending a thread. This allows your class to extend another class (ie if you extend thread you can't extend something else, but if you implement Runnable you have the ability to inherit from something). Here's how I would write it:
public class SampleSynchronisation
public static void main(String[] args)
SampleSynchronisation app = new SampleSynchronisation();
public SampleSynchronisation()
MyRunnable runner = new MyRunnable();
new Thread(runner).start();
// yield this thread so other thread gets a chance to start
Thread.yield();
System.out.println("runner's X = " + runner.getX());
class MyRunnable implements Runnable
String X = null;
// this method called from the controlling thread
public synchronized String getX()
return X;
public void run()
System.out.println("Inside MyRunnable");
X = "MyRunnable's data";
} // end class MyRunnable
} // end class SampleSynchronisation>
public class SampleSynchronisation
public static void main(String df[])
sampleThread sathr= new sampleThread();
sathr.start();
System.out.println("This is the value from the run
method "+sathr.x);
// I should get Inside the run method::: But I get
only Inside
class sampleThread extends Thread
public String x="Inside";
public void run()
x+="the run method";
NB: if i write the variable in to a file I am able to
read it from external method. This I dont want to do -
How can I get the variable with the value from Thread's run method
We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
How can I get the variable with the value?
This is sample code:
public class SampleSynchronisation
public static void main(String df[])
sampleThread sathr= new sampleThread();
sathr.start();
System.out.println("This is the value from the run method "+sathr.x);
/* I should get:
Inside the run method
But I get only:
Inside*/
class sampleThread extends Thread
public String x="Inside";
public void run()
x+="the run method";
NB: if i write the variable in to a file I am able to read it from external method. This I dont want to doYour main thread continues to run after the sathr thread is completed, consequently the output is done before the sathr thread has modified the string. You need to make the main thread pause, this will allow sathr time to run to the point where it will modify the string and then you can print it out. Another way would be to lock the object using a synchronized block to stop the main thread accessing the string until the sathr has finished with it.
-
How do I get a variable, or object from ABAP STACK.
Hey Gurus,
How do I get a variable, or object from ABAP STACK.
Example: I start my FM. I can see in the ABAP STACK the variable I need. I can see the object; I could use to get my variable. I need to use it in my FM; however I need to reference it in the run time. How do I do that?
Is there a method I can use for reading ABAP STACK?
Do I just use command: get reference of u2026?
Does anyone have an example code?
Basis version 7
Thanks in advance
MartinAh, you mean you want to access a variable from another program in the call stack, yes? You can do this using field symbols, but please don't try to change a value while doing this, it could really screw things up.
this example, is using two programs, where the second is accessing variables of the first program. Basically just notice that we are using the program name and the variable name when assigning the field symbol.
report zrich_0006 .
tables: mara.
parameters: p_matnr type mara-matnr..
data: matnr type mara-matnr.
data: imarc type table of marc with header line.
matnr = p_matnr.
select * from marc into table imarc up to 10 rows
where matnr = p_matnr.
perform in in program zrich_0007.
report zrich_0007 .
* FORM in *
form in.
data: field(50).
data: xmarc type marc.
field-symbols: <matnr>.
field-symbols: <imarc> type marc_upl_tt.
* Assign an individual variable
field = '(ZRICH_0006)matnr'.
assign (field) to <matnr>.
* Assign an internal table
field = '(ZRICH_0006)IMARC[]'.
assign (field) to <imarc>.
* Write out your data
write <matnr>.
loop at <imarc> into xmarc.
write: / xmarc-werks.
endloop.
endform.
Regards,
Rich Heilman -
Xsl:param or xsl:variable gets reset.
Hi, I'm trying to keep a counter using a top level variable in xsl.
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="rownumber">1</xsl:variable>
And every time my xsl calls a specific template, i want to keep a counter.
<xsl:template match="row">
<xsl:variable name="rownumber">
<xsl:number value="$rownumber+1"/>
</xsl:variable>
<xsl:variable value="$rownumber"/>
</xsl:template>
However, my variable $rownumber always gets reset to the default value of "1" everytime the template is called and returns a value of "2".
Is there a work around for this? Is there a way to keep a counter in xsl? Can top level variable change?
I don't want to count the nodes either....
Thanks in advanced,
jonYou can't do that. Variables can't change. And there is no "workaround", as you put it. XSLT is not that kind of programming language. If you want to count something, you need to figure out an expression that looks at the incoming XML and determines the answer. This is often surprisingly easy once you stop writing programs that assume that statements are executed one after the other. For example, in your case it appears that you just want to count the number of "row" elements in the document. The XPath expression for that is "count(//row)". Or perhaps you want to count the number of "row" elements below the current node; that's "count(row)".
-
How the Feature Variables Table BEFM_FV get populated in CRM Billing Eng?
Hello Expert,
Can you please tell me how the Feature Variables Table BEFM_FV get populated in CRM Billing Enge(BEFN)?
We need to change the value of CANCEL_COPY_TYPE variable there. Please help.
- FInd out the way to maintain this table from Billing Engine Frame(BEFN) Meta Data Entry.
Edited by: Palash Dutta on Apr 25, 2011 4:10 PMYou are welcome. I'm glad you got it back up.
(1) You say you did the symbolic link. I will assume this is set correctly; it's very important that it is.
(2) I don't know what you mean by "Been feeding the [email protected] for several weeks now, 700 emails each day at least." After the initial training period, SpamAssassin doesn't learn from mail it has already processed correctly. At this point, you only need to teach SpamAssassin when it is wrong. [email protected] should only be getting spam that is being passed as clean. Likewise, [email protected] should only be getting legitimate mail that is being flagged as junk. You are redirecting mail to both [email protected] and [email protected] ... right? SpamAssassin needs both.
(3) Next, as I said before, you need to implement those "Frontline spam defense for Mac OS X Server." Once you have that done and issue "postfix reload" you can look at your SMTP log in Server Admin and watch as Postfix blocks one piece of junk mail after another. It's kind of cool.
(4) Add some SARE rules:
Visit http://www.rulesemporium.com/rules.htm and download the following rules:
70sareadult.cf
70saregenlsubj0.cf
70sareheader0.cf
70sarehtml0.cf
70sareobfu0.cf
70sareoem.cf
70sarespoof.cf
70sarestocks.cf
70sareunsub.cf
72sare_redirectpost
Visit http://www.rulesemporium.com/other-rules.htm and download the following rules:
backhair.cf
bogus-virus-warnings.cf
chickenpox.cf
weeds.cf
Copy these rules to /etc/mail/spamassassin/
Then stop and restart mail services.
There are other things you can do, and you'll find differing opinions about such things. In general, I think implementing the "Frontline spam defense for Mac OS X Server" and adding the SARE rules will help a lot. Good luck! -
How can i get this variable value into second page IN BSP
Hi friends
I have variable wk_matnr value 'ABC' in first page of BSP.
How can i get this variable value into second page.
MoosaHi,
you can define variable (page attribiue) on the second page with the same name. You can realise the Navigation with Button ther started onInputProcesing routine. In onInputProcesing you have to call navigation->set_parameter with attribut name as parameter and then starting the navigation. If you have checked the auto property on the variable on second page and varable have same name, the value of variable should be transported.
[See this tutorial|http://help.sap.com/saphelp_erp2005/helpdata/DE/1a/c5133a62983c0ae10000000a114084/frameset.htm]
Best regards
Bogdan -
How do I get "CO" variable 01 to 67 in character format?
Post Author: Dennis Hernan
CA Forum: Data Connectivity and SQL
I have 2 databases. "DBA"."RMS_A0_SEGMENT" & "DBA"."RMS_G0_SEGMENT". The A0 segment has a CNTY variable. We create table B from A only to create SELYEAR & CO. SELYEAR is numeric because it is "2007 as". CO is numeric because it is "CNTY as". The values in CNTY are 1 to 67 numeric. How do I get "CO" variable 01 to 67 in character format?
Is this standard SQL or would you call it Crysal SQL format? Select "B"."CNTY", "B"."SR", "B"."SEG", "B"."FED_AID", "B"."TBK_CODE", "B"."PAVE_CYC", "B"."SURFACE", "B"."LENGTH", "B".SELYEAR, "C"."KEY_YEAR", "C"."SEG", "C"."SR", "C"."CNTY", "C"."SLDSTATU", "B"."CO" FROM (SELECT "A"."CNTY", "A"."SR", "A"."SEG", "A"."FED_AID", "A"."TBK_CODE", "A"."PAVE_CYC", "A"."SURFACE", "A"."LENGTH", 2007 as SELYEAR, CNTY as CO FROM "DBA"."RMS_A0_SEGMENT" "A") "B" LEFT JOIN "DBA"."RMS_G0_SEGMENT" "C" ON ("B"."SEG" = "C"."SEG") AND ("B"."SR" = "C"."SR") AND ("B"."CNTY" = "C"."CNTY") AND ("B".SELYEAR = "C"."KEY_YEAR")Post Author: Dennis Hernan
CA Forum: Data Connectivity and SQL
Here's a simple example: SELECT "A"."A01_CTY_CDE", "A"."DIST_CODE","A"."CTY_NAME", A01_CTY_CDE AS CO NUMERIC(2) FROM SYSADM.CNTY_DIST_XREF "A" I'm trying to create the CO variable numeric(2) from the A01_CTY_CDE which is character(2). The values in A01_CTY_CDE are 1 to 67 character, I need CO to be numeric to merge with another linked table. "I am using the Add Command In Database Expert". I need 4 variables when this is done in the Command Database, A01_CTY_CDE, DIST_CODE,CTY_NAME all charater from the original database "SYSADM.CNTY_DIST_XREF". Also I'm trying & need your help, to create a variable CO with a numberic format, and the values equal to the A01_CTY_CDE variable. Call If you like, Dennis, 717.787.7293. -
How can i get system variable using java
Hi,
I just want to know how can i get system variables using java code.
for example i want to get the the date for today or i want to get the number of processes that's running.
Thanks alotHi,
I just want to know how can i get system variables
using java code.
for example i want to get the the date for today or i
want to get the number of processes that's running.
Thanks alotSome generic "system variables" are available though Java, usually through the System class.
Date today = new Date();
is instantiated with the current date and time.
Other system values, like environment values, should be passed to java through the command line (-D option) by setting system properties.
Finally, platform specific values like the number of processes running will have to be written in platform specific code and executed by JNI (java native interface).
Java is platform or system agnostic. Common system values, like time, are implemented. Hopefully you won't need platform specific values. -
Get a variable by a name string? how
Hi,
I am currently developing an interpreter which is of cause a class.
This interpreter will be initiated with several pieces of strings mixed
with unknown number of variables with some order which is unknown previously.
So the better way is just passing one string which contains the variable
name strings and return a collection of variables specified by the variable
ames contained in this string.
Problem is:
How can I get a variable from a name string, instead of a name
variable?
Java Reflection can only return fields, but not variables
Any idea?
And how JNI could do perphaps?
Any help appreciated
Thanks in adv
dunsonAs far as i know, the names of local variables, that are only used inside methods, are not preserved in the bytecode. That means you can't grab from them by name, whatever you do. You are able to grab members though, through reflection, but it's not very efficient. I wouldn't recommend it.
As suggested, I think you need to make special provision for this with a structure like a Hashtable. It's better programming practice, it's more efficient, and you'll find it much easier to program.
Something like this:
import java.util.*;
class Doodad {
Map stuff = new HashMap();
Object getValue(String code) {
return stuff.get(code);
void setValue(String code, Object value) {
stuff.put(code, value); -
I try hard but do not managed, I can't get the variable situaded inside a step?
I have created my sequence object then my step object (I can get the right name of this one)
but I didn't find in the help the method allowing to get any value of the step variables.
Any idea? Thank youHi,
You obtain a reference to your step as an PropertyObject.
Using this PropertyObject reference you can use the PropertObject.GetValString|GetValNumeric|GetValBoolean.
Hope this helps.
Regards
Ray Farmer
Regards
Ray Farmer -
How to use @variable(bouser) in Universe to get BOE userid in Xcelsius
Dear Expert,
I have request that need to display BOE userid to displayed in Dashboard using Xcelsius,
after searching in Internet, i found that it can be done by using @variable(bouser) in an object in the Universe, and use the object in Qaaws, but i don't how to use it.
already tried insert /* @variable('BOUSER') */ in END_SQL universe parameter, but still no luck.
my question is :
how to use @variable(bouser) in universe? and then my Xcelsius can display the BOE userid?
thanks in advance for any answer.
I Using SAP Integration KIT to create universe from Query BEX
Luqman
Edited by: luqman hakim on Jun 29, 2010 4:03 PM>
Didier Mazoue wrote:
> Hi,
>
> You are mentioning that you are using SAP Integration Kit.
> Does it mean that the source you are targeting is SAP BW?
>
> If it is the case, this is unfortunately not supported.
> SAP BW MDX does not support calculated expressions that return string or date: this is a limitation of SAP BW engine.
> This is one of the reason why a lot of user exit are used to address these needs.
>
> Regards
> Didier
Didier Mazoue
yes, my Data source is SAP BW, and connected to BOE via SAP INT KIT.
It's too bad that SAP doesn't support so simple requirement.
you said : user exit
are used to address these needs.
so there are possibility to solve my problem.
would you give me the logic of user exit? which part I should create the user exit
I'm quiet familiar with user exit in BW
thanks
Maybe you are looking for
-
Converting from a currency other than LC
Hello, We have a customer application where we store not only amount in LC but also the amount in Invoice Currency ("IC"). For example, we invoice customers in a currency other than our company code's local currencies. We have a requirement to conv
-
Passing an import parameter to a F.M
Hi Experts, Could anyone resolve the issue below listed . I was passing a string consisting of both upper case and lower case letters as an input parameter to a function module, but the FM is taking the import value in upper case letter rather than m
-
Speed Step Setting under XP - when I am NON running on batteries
Under XPPRO Why does the CPU speed (System Properties, General Tab) measure this: T7600 @ 2.33Ghz, 977 MHz, 2.98 GB of RAM. Except during load it changes to: T7600 @ 2.33Ghz, 2.33 MHz, 2.98 GB of RAM. * During load = running photoshop and makeing the
-
2 Depreciation Areas For Different Ledgers
Dear All, I'm using 2 depreciation areas (01, 60) for different ledger (L1, L2) due to company requirements. However, during asset retirement, posted amount does not reflected correctly in Ledger 2 (depreciation 60). Amount displayed correctly in Ass
-
PC Suite 7.0.7.0
Dear Nokia Team, After installation of the latest PC Suite I cannot connect my N73 and 6680 to my XP SP2 system. It says "Fatal error during installation" Nokia xxx USB Phone Parent. What is wrong? How can i fix it? It worked fine with 6.85 but 7.0 r