Is there a for-each statement in XSQL like the one in XSL?
I'm trying to do the following:
<?xml version="1.0" ?>
- <!-- <?xml-stylesheet type="text/xsl" href="/dvd/xsl/admin/listuser.xsl"?>
-->
- <database>
- <request>
- <parameters>
- <row>
<checkboxuser>jonathan</checkboxuser>
</row>
- <row>
<checkboxuser>james</checkboxuser>
</row>
- <row>
<checkboxuser>steve</checkboxuser>
</row>
- <row>
<checkboxuser>richard</checkboxuser>
</row>
</parameters>
- <session>
<access>0</access>
<user>malik</user>
<adminfirstname>Malik</adminfirstname>
<adminlastname>Graves-Pryor</adminlastname>
</session>
- <cookies>
<JServSessionIdroot>v647ogyd8n</JServSessionIdroot>
</cookies>
</request>
- <allusers>
- <userinfo>
<first-name>Jonathan</first-name>
<last-name>Terry</last-name>
<email>[email protected]</email>
<user-name>jonathan</user-name>
<password>terry</password>
<access-level>1</access-level>
</userinfo>
</allusers>
</database>Now as you can see, I have 4 instances of <checkboxuser> in my XSQL page. These values are being passed in from checkboxes on the previous page. Is there an XSQL command that will say something like <xsql:for-each select="/database/request/parameters/checkboxuser"> ?
So that it'd look something like this in the original code:
<?xml version="1.0"?>
<!--<?xml-stylesheet type="text/xsl" href="/dvd/xsl/admin/listuser.xsl"?>-->
<database connection="dvddb" xmlns:xsql="urn:oracle-xsql">
<xsql:include-request-params/>
<xsql:query id-attribute="" tag-case="lower" rowset-element="allusers" row-element="userinfo">
SELECT FIRSTNAME AS "FIRST-NAME",
LASTNAME AS "LAST-NAME",
EMAIL AS "EMAIL",
USERNAME AS "USER-NAME",
PASSWORD AS "PASSWORD",
ACCESSLEVEL AS "ACCESS-LEVEL"
FROM LKUP_USER
WHERE USERNAME = '<xsql:for-each select="/database/request/parameters/checkboxuser">'
ORDER BY ACCESSLEVEL
</xsql:query>
</database>Or something like that... The XSL works fine, but not when I want to pull info from the DB.. :)
Malik Graves-Pryor
Ok I got a friend of mine to load everything up for me using 'javac' on he command line with -verbose and he got this back:
C:\oracle\ora81>javac -verbose MultiValuedParam.java
[parsed MultiValuedParam.java in 453 ms]
[loaded C:\Oracle\ora81\lib\oraclexsql.jar(oracle/xml/xsql/XSQLActionHandlerImpl
.class) in 62 ms]
[loaded C:\jdk1.2.2\jre\lib\rt.jar(java/lang/Object.class) in 0 ms]
[loaded C:\Oracle\ora81\lib\oraclexsql.jar(oracle/xml/xsql/XSQLActionHandler.cla
ss) in 0 ms]
[loaded C:\jdk1.2.2\jre\lib\rt.jar(java/sql/SQLException.class) in 15 ms]
[loaded C:\jdk1.2.2\jre\lib\rt.jar(java/lang/Exception.class) in 0 ms]
[loaded C:\jdk1.2.2\jre\lib\rt.jar(java/lang/Throwable.class) in 0 ms]
[loaded C:\jdk1.2.2\jre\lib\rt.jar(java/io/Serializable.class) in 0 ms]
MultiValuedParam.java:10: Package javax.servlet.http not found in import.
import javax.servlet.http.*;
^
MultiValuedParam.java:11: Package org.w3c.dom not found in import.
import org.w3c.dom.*;
^
[checking class MultiValuedParam]
2 errors
[done in 1266 ms]Any clues on what needs to be done to get those last two working? He has the oraclexsql.jar file listed in the system environment variable section of win2k.
Thanks!
Malik Graves-Pryor
Similar Messages
-
Looking for IM app that is like the one on iPhone
I am looking for an app for IM that is like the one on the iPhone whereby I do not have to sign up for another account and can use my present email address.
Thanks
LarryBYou mean the one with the green icon with a white chat bubble? If so, that is the messaging app for SMS or MMS. It doesn't exist on the iPad as the iPad is not a phone and therefore does not have SMS/MMS capability (though there are apps you can use to fake it).
-
Is there any chance that Tab Grouping feature (similar to Opera 11) will appear in Firefox? Could be very helpful and convenient.
Hi ThaPlaya,
I feel your pain. I am in charge of over 250 PCs and laptops. Flash Player stopped working for me after an update. I have been working on this issue non-stop since the middle of October, 2012. It's time-consuming, and even after applying the latest Flash update, it still doesn't work properly.
I am beyond frustrated! I have people calling me left and right saying that they can't access content. I have been using this site https://www.mozilla.org/en-US/plugincheck/ to try and do a browser plug-in check while in IE an dFirefox. Even after I update all plug-ins, Flash still works about half the time.
For instance, the principal of the middle and high school wanted to view an online magazine http://upfront.scholastic.com/issues/12_10_12, about 3 pages load on this site. The rest continue to say LOADING. When I right-click on a page and then left-click on ABOUT ADOBE 11.5.502.110, it seems I am using the most up-to-date version for IE and Firefox.
Students are trying to access sumdog.com and stmath.com, both run using Flash. STMath is now working a bit better because I allowed some exceptions in our internet content filtering appliance, and in our firewall, sumdog still works half the time.
If Adobe is going to update their browser plug-ins, they need to test and retest before giving the public access. This situation is causing me a ton of problems!
Sorry to infiltrate your post...
Dawn/Flower1964 -
Hi guys,
I'm making a program in java for school.
Now I have this:
for(Stap2TrampolineModel trampoline : lijstTrampolines)
trampoline = new Stap2TrampolineModel(0,215,100,"Poing",lijstKinderen); //model
trampolineView = new Stap2TrampolineView(trampoline); //view
trampolineController = new Stap2TrampolineController(trampoline, trampolineView); //controller
trampolineView.setBounds(trampoline.getXInvoer(),trampoline.getYInvoer(),trampoline.getFormaat()+1,20);
add(trampolineView);
repaint();
and in the mouselistener this:
public void mouseClicked( MouseEvent e )
System.out.println(lijstTrampolines.size());
// Onderzoek of met de rechterknop is geklikt
if( e.isMetaDown() )
// x = e.getX(); (for later needs)
//y = e.getY(); (for later needs)
lijstTrampolines.add(trampoline);
repaint();
The program should display a "trampoline" when I click...but it doesnt. It is added to the list, because I can see that in the console because of the System.out.println
But it doesn't show the display I want. When I delete the for each statement, it does show the "trampoline". So the mouselistener works (it gets added when I click) and the arraylist works (it shows that in the console), but the for each statement doesnt work...
Anyone knows how to solve this problem?Where is this foreach loop located? In inialisation presumably. But that's over and done with when your mouseListener is called. I'd guess your list is empty when the loop is called, and it does nothing.
Your mouse listener, when it adds a trampoline must also add a trampoline view object. And the repaints don't do you any good, use revalidate() after adding a trampoline view to recalculate the layout. -
Variable Use in For-Each statement
Hello Gurus-
I am having an issue using a variable i've created in a for each statement. Here is the code i'm using
My objective is to create a variable based on the kind of invoice. If the invoice is a proof or reprint, one copy should be printed. If it's a final invoice, I need two copies.
<?xdoxslt:set_variable($_XDOCTX, 'x', 0)?>
for-each<?if: Print_Additional_Header_Text_ID238='PROOF'?><?xdoxslt:set_variable($_XDOCTX, 'x', 1)?><?end if?>
<?if: Print_Additional_Header_Text_ID238='REPRINT'?><?xdoxslt:set_variable($_XDOCTX, 'x', 1)?><?end if?>
<?if:not ( Print_Additional_Header_Text_ID238)?><?xdoxslt:set_variable($_XDOCTX, 'x',2)?><?end if?>
<?xdoxslt:get_variable($_XDOCTX,'x')?><?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,$x,1)?>
for-each is the loop i'm using to repeat sections of the invoice.
When I run the preview with the last for-each print, i get an error that says "variable not defined:'x' "
But when i remove the last for each the correct variable, 1 or 2, will show in the invoice.
My question is: How can I use the variable 'x' in <?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,$x,1)?>
TIA
Darius
Edited by: 852460 on May 24, 2011 8:31 AM
Edited by: DEK17 on Jul 20, 2011 1:15 PMProbably, this will help
http://winrichman.blogspot.com/search/label/multiple%20copy
Try
<?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,get_variable($_XDOCTX, 'x'),1)?>
or
<?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,xdoxslt:get_variable($_XDOCTX, 'x'),1)?> -
Where can I find more OBE like the one for Database xE and SQL Developer?
Hi,
I tried to post on the OBE forum but it is expired.
I found the downloadable OBE, or tutorial, very good resources for me to learn Oracle, like the one for XE and SQL developer, which you can download, not just read online, and see as many times as you can, with flash stuffs inside,
Will you make more this kind of OBE?
Where can I find them?
PeterHi Hans,
I know the above address you offered but those are
not downloadble.So do what I do .... CTRL-S (save page)
As an Oracle trainer, I consider the OBEs to be very important. I doubt that Oracle will get rid of them.
However, it takes time to make them. I suspect that they are created when a new feature needs to be demonstrated and the product management has the resources available.
I just wish they would make the original set from Oracle8i available. They provided some very important basics which have long since hit the archive pile.
I'm sure that some of the ACEs would be happy to upgrade them to Oracle10g/11g level. I know I would be willing to contribute to that effort. -
GROUP BY - Is there a way to have some sort of for-each statement?
Hi there,
This discussion is a branch from https://forums.oracle.com/thread/2614679
I data mart I created for a chain of theatres. The fact table contain information about ticket sales, and I have a some dimensions including DimClient and DimTime.
Here is an example of each table:
FactTicketPurchase
TICKETPURCHASEID
CLIENTID
PRODUCTIONID
THEATREID
TIMEID
TROWID
SUMTOTALAMOUNT
60006
2527
66
21
942
40
7
60007
2527
72
21
988
36
6
60008
2527
74
21
1001
40
6
60009
2527
76
21
1015
37
6
60010
2527
79
21
1037
39
6
DDL for FactTicketPurchase
CREATE TABLE FactTicketPurchase(
TicketPurchaseID NUMBER(10) PRIMARY KEY,
ClientID NUMBER(5) CONSTRAINT fk_client REFERENCES DimClient,
-- ProductionID NUMBER(5) CONSTRAINT fk_prod REFERENCES DimProduction,
-- TheatreID NUMBER(5) CONSTRAINT fk_theatre REFERENCES DimTheatre,
TimeID NUMBER(6) CONSTRAINT fk_time REFERENCES DimTime,
-- TRowID NUMBER(5) CONSTRAINT fk_trow REFERENCES DimTRow,
SumTotalAmount NUMBER(22) NOT NULL);
DimClient
CLIENTID
CLIENT#
NAME
TOWN
COUNTY
2503
1
LEE M1
West Bridgford
Nottingham
2504
2
HELEN W2
Hyson Green
Nottingham
2505
3
LEE M3
Lenton Abbey
Nottingham
2506
4
LORA W4
Beeston
Nottingham
2507
5
SCOTT M5
Radford
Nottingham
2508
6
MINA W6
Hyson Green
Nottingham
..cff.
DDL for DimClient
CREATE TABLE DimClient(
ClientID NUMBER(5) PRIMARY KEY,
Name VARCHAR2(30) NOT NULL);
DimTime
TIMEID
FULLDATE
YEAR
SEASON
MONTH
MONTHDAY
WEEK
WEEKDAY
817
02-MAR-10
2010
Spring
3
2
9
3
818
03-MAR-10
2010
Spring
3
3
9
4
819
04-MAR-10
2010
Spring
3
4
9
5
820
05-MAR-10
2010
Spring
3
5
9
6
821
06-MAR-10
2010
Spring
3
6
9
7
822
07-MAR-10
2010
Spring
3
7
9
1
DDL for DimTime
CREATE TABLE DimTime(
TimeID NUMBER(6) PRIMARY KEY,
Year NUMBER(4) NOT NULL,
Season VARCHAR2(20));
I have the following analysis request to perform on this data mart:
Top 5 clients by value of ticket sale for each season
For this requirement I came up with the following query:
SELECT * FROM
(SELECT FacTIC.ClientID, DimCLI.Name, SUM(SumtotalAmount) SumTotalAmount, DimTIM.Season
FROM FactTicketPurchase FacTIC, DimClient DimCLI, DimTime DimTIM
WHERE FacTIC.ClientID = DimCLI.ClientID
AND FacTIC.TimeID = DimTIM.TimeID
AND Season = 'Spring' AND Year = 2010
GROUP BY Season, FacTIC.ClientID, DimCLI.Name
ORDER BY Season ASC, SumTotalAmount DESC)
WHERE rownum <=5;
As you can see, in line 06 of the above query, I am explicitly specifying the season for the query to return.
However what I would like to do is just one query that could autocratically go through the seasons and years available in the time dimension in a fashion similar to a FOR-EACH statement. This way, if we get more years added to the time dimension, we wouldn't have to amend the query.
Is this possible?
Regards,
P.I think I fixed it!
The trick was to look into the r_num value. As soon as I added it to my query I started to see how r_num was being calculated and I realised that I had to add Season to my partition, right after Year.
SELECT Year, Season, TotalAmount, Name
FROM (
SELECT DimCLI.Name
, DimTIM.Year
, DIMTIM.Season
, SUM(FacTIC.SumTotalAmount) TotalAmount
, RANK() OVER (PARTITION BY Year, Season
ORDER BY SUM(FacTIC.SumTotalAmount) DESC
) AS r_num
FROM FactTicketPurchase FacTIC
, DimClient DimCLI
, DimTime DimTIM
WHERE FacTIC.ClientID = DimCLI.ClientID
AND FacTIC.TimeID = DimTIM.TimeID
GROUP BY DimTIM.Year
, DimTIM.Season
, DimCLI.Name
WHERE r_num <= 5 -- Need to amend this line on my data sample to show 2 rows.
ORDER BY Year, Season, TotalAmount DESC;
Looking at my data sample, I got the following:
YEAR
SEASON
TOTALAMOUNT
CLIENTID
2010
Autumn
29
2504
2010
Autumn
26
2503
2010
Spring
25
2503
2010
Spring
14
2506
2010
Summer
26
2506
2010
Summer
26
2504
2010
Winter
28
2503
2010
Winter
26
2506
2011
Autumn
23
2506
2011
Autumn
14
2503
2011
Spring
25
2505
2011
Spring
13
2503
2011
Summer
21
2505
2011
Summer
14
2503
2011
Winter
19
2505
Now, looking at my real data, (considering the top 5 rows, not the top 2), I got:
YEAR
SEASON
TOTALAMOUNT
NAME
2010
Autumn
141
BUSH M225
2010
Autumn
140
DIANA W66
2010
Autumn
136
HANA W232
2010
Autumn
120
DIANA W220
2010
Autumn
120
WILSON M459
2010
Spring
137
DAVID M469
2010
Spring
125
ALEX M125
2010
Spring
124
PETER M269
2010
Spring
115
ZHOU M463
2010
Spring
114
TANIA W304
2010
Summer
138
JANE W404
2010
Summer
105
MINA W8
2010
Summer
97
DAVID M275
2010
Summer
96
CLINTON M483
2010
Summer
93
ANNA W288
2011
Spring
12
LUISE W20
2011
Spring
7
ANNA W432
2011
Spring
7
LEE M409
2011
Spring
7
CHRIS W274
2011
Spring
7
HELEN W136
2011
Spring
7
LILY W114
2011
Spring
7
LUISE W348
2011
Spring
7
LIU M107
2011
Spring
7
VICTORY W194
2011
Spring
7
DIANA W240
2011
Spring
7
HELEN W120
2011
Spring
7
LILY W296
2011
Spring
7
MATTHEW M389
2011
Spring
7
PACO M343
2011
Spring
7
YANG M411
2011
Spring
7
ERIC M101
2011
Spring
7
ALEX M181
2011
Spring
7
SMITH M289
2011
Spring
7
DIANA W360
2011
Spring
7
MATTHEW M63
2011
Spring
7
SALLY W170
2011
Spring
7
JENNY W258
2011
Spring
7 -
How I know if there notification for each transaction in each module
dear Consultant's
How I know if there notification for each transaction in each module and if it's enabled or need to enable
For example:
In AP:
When I create, transaction is there any notification send
When I create payment term is there any notification send
How I know what the standard oracle notification create for each module
thanks for caringI can't believe there's still no proper answers for this question . I'm now struggling with the same issue as the original asker. It seems that at least with the newest version of Nokia Drive you can delete the maps saved (without the need to remove the whole application). You can do that even one by one. But the question is: "If I delete a particular map and load it again, will that be the newest version of the map? Or is there still a need to delete the whole Nokia Drive application, as said in the instructions linked earlier in this thread?"
Anyway, even deleting one map and loading it again sounds very frustrating without knowing if there actually is a new update or not. We should know exactly which is the current version of each map and wheter there is a newer version.
Many things are gone worse after Symbian. On Symbian phones, you could easily update all the maps with Ovi Suite. Now, with Zune, you can update the firmware, but not the maps which was a disappointment to me. I don't have WiFi connection, so, for me, it would be cheaper to download huge amounts of data with my computer's wired connection (with my phone connected to it via USB). Don't want to waste my monthly data limit to download again possibly the same map versions just to be sure...
But please, moderators and others, give us some comments and answers...
Loyal Nokia owner -
Set height size for each state enabling browser scrollbar if needed..
I'm working on a flex project, completely new to it. I'm trying to resize my application based on the set height size for each state. I'd like the wrapper to resize in the browser so that the browser's scroll bar appears if needed. hope this makes sense....
My enitial opening page I've set the height to 1000. now when I click on a link to another state from this page, we'll call it 'home' which i have set to 2000
The page opens in its 2000 height but no scroll bar appears to scroll down in the browser...
If anyone's done this or knows how to, I'd really appreciate your input.I've done something similar with a few of my apps, you have to use a little javascript on the html page and the ExternalInterface class in your app. Basically, you need to resize the "browser's" height based on your flash file. So here's quick example:
In your html template page (which you can edit in your flashbuilder project panel ->html-template->indext.template.html)
in your html add the jscript function:
<script type="text/javascript">
function setWindowHeight(heightVal){
document.getElementById('theWindow').style.height=heightVal; // make sure to give the body tag an id of 'theWindow' or whatever
</script>
In your flashbuilder app you need to call the javascript fx, you can use the ExternalInterface class for this:
ExternalInterface.call('setWindowHeight',val+'px');
you need to send the jscript fx the height of your container or whatever you want it resized to.... -
Hi everyone,
I have 2x physical servers running Hyper-V 2012 R2. Each hosts several virtual machines. The VHDs of the VMs are stored on several dedicated physical disks to have a performance boost. For exampe if VM A has two VHDs attached I made sure that the VHDs are
on different physical disks to have them not slow-down each other in case of intensive disk accesses.
So far so good. I was looking forward to the replication-feature. The idea is to have the two physical servers have their primary running VMs being replicated to the other physical server and vice-versa. I was hoping to have the chance to choose for each
individual VM where the replicated VHD will be stored. But instead I can only see the one location/path which is configured in Hyper-V Manager when I activate the replication-feature on the server.
Is there by any chance a way how to select the storage location for each VHD/VM if using the replication-feature of Hyper-V 2012 R2?
Thanks in advance.
Cheers,
SebastianSecondly, you could replicate different VMs to different storage locations to perform some of the disk balancing you are trying to perform. Lastly, you could copy the vhd file to a different location
before starting the VM.
.:|:.:|:. tim
Hi Tim,
thanks for the reply. Sorry, but I had some other tasks to take care of, so I wasn't paying enough attention to this thread.
The part I quoted from your reply sounds exactly like the action I'd like to perform, but as you pointed out before this should not be possible.
How can I perform the action (replicating each VM to a storage location) as you mentioned secondly? To sum it up again:
2x physical machines carrying severel HDDs
8+ VMs spread to run on the 2x servers
when setting up replication I can only set the storage-location from server A on B and vice versa B on A
Thanks again for your reply.
Cheers,
Sebastian -
Hello, is there any way of having a reboot disk for lion that I'm downloading, like the one I have with snow leopard ?
Once the Lion download is complete quit the installer and follow these directions. The file you need to make a boot disk disappears after you install Lion.
Egg Freckles | Burning A Lion Boot Disc
However, the Lion installation includes a recovery partition. It won't be of help if your entire HD dies but is very handy otherwise. This Knowledge Base article has a lot of good information about Lion's recovery partition.
OS X Lion: About Lion Recovery -
IS THERE A SPECIAL ONE FOR MAC,OR CAN I USE THE ONE THAT WINDOWS MADE? AS I DIDNT WANT ANY SOFTWARE ON MY MAC MADE BY WINDOWS.......I WANT TO USE THE YOUTUBE CONVERTER TO MP3,CAN SOMEONE LET ME KNOW PLEASE ,MANY THANKS SAM
Check out what the new version of Crossover Mac - they have begun to add 10.8 support and some new apps, too.
OP: PLS do not use CAPS in future. -
Update button in sql report for each row can only get the report value
I have to added Update for each row of records like:
select a.*,'Update' button from (
select c.*,d.login from country c,champ d
where c.champ_id=d.champ_id(+)
order by c.name) a
then go to the report->edit button ->Column Link
I added some items P40_REGION, P40_CHAMPID,P40_ACTIVE,P40_CODE and assign the value like #region#,#active# ,#code# to these item, but when I click the update button in the report I found the values such as #region#,#active# ,#code# is the report value not the select list selected value(the region, active column are displayed as select list lov).
Can anyone tell me how to sort this knid of problem?
Thanks a lot!Sorry, it doesn't work. I also tried apex_application.g_f01(i), but not everytime I can get the value or get the incorrect value. If you have time you can try to create it like what I have described. Our team use two days now but still can not sort this problem.
-
Would anybody think that for all of the pages of apps, for each time that you swipe, the backround would change..... You could disable this in settings.
Tell Apple: http://www.apple.com/feedback/iphone.html
-
I have a Mac desktop & also a MacBook Air. Do I have to buy the OS X Lion for each device or can I buy one for both devices?
jamesfromdundas wrote:
you get three copies for thirty bucks press puchased items from app store on your other machine. follow orders.
That is incorrect james, you can install it on ALL the computers you own, no limit.
Maybe you are looking for
-
I need to upgrade my storage but i can't. Need help
-
Crashing java virtual machine problem...
This topic is related to my previous topic: http://forum.java.sun.com/thread.jsp?forum=31&thread=341889&tstart=0&trange=15 I think it is due to the memory the program uses... on average it uses 300 meg of memory, but whenever i have more than say 10
-
Website does not recognize uploaded file as pdf
A website is rejecting uploaded pdf files with the error message that it is not a pdf file. The site accepts the same files uploaded with IE from the same computer. It also accepts the file uploaded with Firefox from another running Windows 7 Profess
-
SQL Developer BUG - ORA-00980 Synonym Translation No Longer Valid
We have a read only database of our Production and when I try to access any data using the SQL Developer, I'm getting the following Error. Error at Command Line:1 Column:14 Error report: SQL Error: ORA-00980: synonym translation is no longer valid If
-
When the 10-step or similar process is used, does this end up granting ALL permissions to the applet? Is there any way to involve a java.policy file which defines specific limits? Can this be downloaded in any (semi-) automated manner like the certif