Brian R. Wainwright

Ranch Hand
+ Follow
since Aug 12, 2003
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Brian R. Wainwright

Well I finally got this resolved so I'm posting the solution to anyone who may need to do something similar in the future. Basically I used XSL 2.0's for-each-group functionality to get distinct values of my first column. Then I iterate over those groups, and with a nested loop, iterate over ALL the values in that first column, grab the index I'm at and then grab the corresponding values in the other columns based on that index. Voila!

So I've made some progress with this. Progress in sp far as I think I'm on the right track, I just don't quite know what track that is!!! Using the following stylesheet, I think I've managed to group my data by the values in column 1 using <xsl:key>. I then try and iterate over those groupings and get the corresponding values. As far as I can understand, there's one core issue with the stylesheet - the iteration over the group is isn't what I think it is. I think I'm iterating over a single value, which is a string of all the "groupings" (the values from COL[1]/fmp:DATA) rather than some sort of array-like structure of each group name. Anyway, here's the stylsheet...

And here's the result:

This is promising, but not the result I'm looking for (see previous post). I kind of pulled this strategy together from some research on the web so I'm not quite sure what I'm doing. If anyone can shed some light I'd appreciate it!! Thanks!!!1
[ June 26, 2007: Message edited by: Brian R. Wainwright ]
Hello everyone,

I'm looking for suggestions on how to tackle this problem. I think it can be done using the for-each-group tag in XSLT 2.0. Basically, I've been given an export of FileMaker XML that looks like this:

In case nobody has had to work with FileMaker XML and XSL, it's kind of a pain in the you know what to work with sometimes. I need to transform this FileMaker XML into the following - grouping each value in column 1 together into a single attribute:

I'm thinking of taking the approach of iterating over the first column and gathering the values and the indices and then mixing and matching like that, but the for-each-group element in XSLT may provide what I'm really looking to do quickly and easily. Has anyone used that? Thanks!
Thanks for the kudos Paul! I know enough to get suckered into doing things like this! I had read that article already and it didn't quite seem like what I wanted to do, so I ended up using <xsl:text> tags to write out the DOCTYPE declaration manually. This made more sense since some fo the info I had in the <!ENTITY> declarations I needed to generate would have to be retrieved on the fly. For anyone interested, as far as I could find out, you can't do this any other way. Here's what I did....

Hey guys,

I'm writing a XSL stylesheet that needs to create a DOCTYPE declaration like this:

So far, I've written the following, which successfully generates everything except the ENTITY part...

Results in...

I admit my XSLT skills are lacking... but for the life of me I can't find any info anywhere on how to do this. Any help is appreciated! This is killing me!
Can anyone tell me how to tell Maven2 to compile source using JDK 1.5? I've added this to my

and have added this to my pom.xml:

And it still complains!!! Thanks!
17 years ago
Ok guys - here's the final solution... In JSP #1 I have the following:

JSP #2 is the result of the call to "/drm/actions/refresh-alerts" as a Struts action. Essentially the content of the notificationFram ifram is this jsp...

So my reloadNotifications() call reloads the content of "frameData" and then I set the html contnet of the "myStuff" span to the html content of my iframe. Works like a charm!

Thanks everyone for their attention and help!
Thanks for the reply Eric. I'm not sure I follow you when You say "if the value is in the iframe." Do you mean if it is within the <iframe></iframe> tags?

One idea I tried that actually works, but which looks like garbage is to have another iframe that has as its source a jsp which just has the following on it:

The iframe looks like:

Then in my reloadNotifications() function I do the following:

This works - the numbers update - because the server side scriptlet code get's reloaded when the ifram reloads. The only problem is look and feel - blech.
Thanks guys - the setInterval was what I was looking for since I just want to refresh a particular iframe. So this is working... sort of... My I fram relaods and calls my refresh-alerts servlet which is great. The servlet sets a session variable called "new-alerts" which I then want to use to update the html in a <span>. Here's the code... It doesn't work because the variables aren't refreshed whan I reload my iframe.

And elsewhere in my page...

I know I can't reference a session variable from my javascript and my scriptlet code gets compiled at runtime and never recompiles because it never refreshes (the iframe is all that refreshes). My question is how can I get the "val" variable to dynamically display the value getting set in my servlet? Hope this makes sense... I'm sure there's something simple I'm missing.
I'm trying to do a very simple thing... I have an IFrame that I want to refresh every x number of seconds. To do that I have the following on a .jsp page that is included in another .jsp page:

What's happening is that the iframe is only ever loaded once. I've tried using:

and explicitly setting the src of my iframe, but that results in the src action being called twice - once when the iframe loads and once when the setTimeout() is called for the first (and last) time. Am I misunderstanding somethign about how setTimeout() is supposed to work? I'm testing this on IE 6 on Windows XP. Thanks!

Thanks Merrill,

I came up with an idea that was similar to your implementation using a javascript array, but it runs on the client...

And then elsewhere on my jsp...

So when the page laods, I iterate through my list and populate a Javascript array with the values I need to retrieve. In my hyperlink, I call playTone() whcih takes the name of the particular element. I then get the selected index of that element and based on that look up the value by index in my prepopyulated array. Works great.
17 years ago
Hello Everyone,

I have the following on a JSP:

What I'd like to do is pass the filePath property of the currently selected bean (critTone) in the select list to the playTone() javascript. I'm having a hard time trying to get my head around what the best approach would be since I'm not refrencing the option value. The way it is written above, the value being passed to the playTone() function is the filePath of the last bean in the iteration.

This has to be a fairly common thing to do... does anyone have any suggestions?

17 years ago
Ok... well I think I figured out the problem... pretty simple actually. I just need to add ugd.company_id to my GROUP BY clause... I guess because it is being included as part of the SELECT somehow? I not really certain why. Does anyone have an explanation?
Thanks stu...

I've actually refined the query a little further...

So this is doing something similar, but checking another table (ATTRIBUTE_VALUES) to get a count of the number of rows with a value of 'TRUE'

This number is used to make certain that the number of the number I get in the second sub-select is valid. The last piece here is to pass that value into the group by clause like this:

The problem with this last statement is that I get a "NOT A GROUP BY Expression" when adding the last select. Oracle doesn't like the " = ugd.company_id". If I replace the = ugd.company_id with a number (51) it works. This number however needs to be whatever the current ugd.company_id is. If I got this to work, I guess I also wouldn't like that it does the same query twice. But I could live with that. I know I should be able to have a dynamic value as part of my HAVING COUNT(employee_id) = clause, but I'm not sure if it is possibel in this context. Any more ideas would be great! Thanks again!
[ June 02, 2006: Message edited by: Brian R. Wainwright ]
Hey everyone,

I'm having difficulty resolving a query in Oracle 8i...

I have the following table:

The primary key is a combination of all 3 columns.
The module_type column can be one of four values: 4, 5, 6 or 7.
I'm attempting to select those employee_ids that exist in ALL 4 module_types for a given number of company_id's. For example, given the following data:

The following query returns employee_id 1

This query works great. I need to further filter the result set however, by module_type so that if no record exists for a given module type, no results are returned. In other words, in order to obtain a result set there must be at least 1 row for each module_type.

Does anyone have any suggestions for further filtering this result set? Thanks!
[ June 01, 2006: Message edited by: Brian R. Wainwright ]