Graham VMead

Ranch Hand
+ Follow
since Sep 22, 2003
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 Graham VMead

Hi Paul

Thanks for that. I seem to have a funny here because I've tried it opening the xml via IE6 and it works but if I do it via MY version of XALAN it doesnt!!!

Thanks for your time

Thought I did

<xsl:variable name="someStuff" select="/screen/business/allOffers"/>

According to the same document you link to here it says

<xsl:variable name="sectnum" select="//title/@id" />
will set the variable $sectnum to be a node list of all the 'id' attribute nodes of 'title' elements within your document. You could then iterate over them to give your table of contents.

which implies that if you use the select clause in the variable tag you will get a node set that can be iterated over. I want my variable "someStuff" to be a node set that I can use later in the template via

<xsl:if test ="$somestuff/path1/path2" etc.

This link herealso under the section "Reaching with XPath" also implies that you can??

Maybe I'm getting the wrong end of the stick.
Hi I'm pretty new to XSLT, could someone explain to me why this doesnt work as it is doing my head in. I've searched loads of forums and afaik it should work!!!

I'm trying to bind a variable to a node-set then reuse the variable in various places in the xslt templates

I'm using Java 1.3, xalan 2.3.1 I think xslt 1.0

Very simple xml

The xslt, when I use the variable reference nothing is output but with the full absolute path it is !!

Its probably a elemental error but thanks to anyone who can help

I am working on a system where the company uses XSLT Templates to generate HTML from XML data using XALAN.

Could someone tell me if there is a siginificant performance difference between using absolute paths on statements rather than relative paths to the current context node?

Does anyone have a link to performance tips for using XSLT

Thanks to anyone who replies


Is it possible to get a bookmark added in the Help page to appear in the bookmark view???

I can get standard bookmarks added say to a Java file to appear but Help bookmarks only appear in the Help Bookmark section.

Or is this impossible coz the Help Server is dynamically set?

I'm using Version 3.2.1

Thanks to anyone who replies.

Thanks for the replies chaps, Stefan I like your suggestion and will try that.

I find that the ISO format "YYYY-MM-DD" works perfectly well for US users, and I expect it would be equally acceptable to users all over the world.

I know what your saying Paul but this assumes I control/have a say in what the customer wants and I'm afraid my customer is a large mega-corp that makes cars and whatever they say goes no questions asked even if its illogical
15 years ago
Hi I'm working on a system where the user wants to see dates as


As there isn't a default pattern for this in DateFormat class I did the following

I've noticed that with an American US Locale 9th of April 2006 is shown as
09:04:2006 as per the pattern.

This is true to the pattern I asked for but "wrong" for US users. I wonder if there is a concise way for me to both format dates as DD:MM:YYYY AND also MM D:YYYY dependent on the Locale? e.g in UK its 09:04:2006 and 04:09:2006 in U.S ?

TIA Graham
15 years ago
Thanks for the reply Ernest: Thats what I'll do then
15 years ago

I want to sort a list of session beans by their string session keys so I implemented the following.

If I want to search this sorted list using Collections.binarySearch with the search key as a String and using the same comparator how do I know whether objA or objB will be the search String and which will be the bean.

Will I need to do the following

Hope this makes sense, I know I should be checking the bean class and throwing ClassCastExceptions etc but I've left it out for clarity.
[ July 07, 2006: Message edited by: Graham VMead ]
15 years ago

As the title suggests I'm totally new to Cryptography. I'm trying to write some code that will encrypt entries to a log file and decrypt them.

The original code was using a File Input/Output stream and the read() write().

So Imagine my joy at finding the CipherInputStream and CipherOutputStream classes in the Sun JCE which you can wrap around a FileInputStream and FileOutputStream.

Alas when I write() to the log file and later try and read() it back in again I either get 98% success with random gobblydegook characters in the decrypted data or I get truncation of the data.

I've trawled the net and found that its something to do with padding and using the correct encrypt/decrpyt mode.

The only examples I've found (including Sun's JCE spec) either encrypt simple strings (I can do that) or a whole file at a time.

If anyone can provide help or a URL link explaining how to append encrypted data to and read back decrypted datafrom a file I would be eternally grateful.

TIA Graham
15 years ago
Definitely F.

Nice Smile.

She would stop my bookshelf from going into nerdy meltdown and I wouldn't have to hide it inside a copy of Playboy on the train, as I do with the GOF book!!!

Or as a second choice, how about all of them a la WROX books, but they wouldn't look like a gang of Axe murderers see WROX NETWORKING!!!

[ January 19, 2006: Message edited by: Graham VMead ]
[ January 19, 2006: Message edited by: Graham VMead ]
15 years ago
Thanks David/Ernest
15 years ago
This could be the wrong forum but hope not.

I've got a PC with Windows XP pre-installed.

I really want to learn Linux. Is it possible to load Linux onto my machine so that I can make it dual boot and choose on start up which OS to use.

Can I do it without wasting my current system and data. Any links/tips that don't require a degree in PC configuration would be very welcome


15 years ago

Can someone tell me if this approach is "right" or there is a better way, its something which always gives me a headache when I use struts.

Say I have the situation where, I want to use request scope action forms.

JSP Screen 1 user enters some data
JSP Screen 2 Application outputs data based on entry on screen1.

Screen 1 will have an action mapped via the

So the Action casts the form passed to Screen1ActionForm(form)

Gets the data out of it screen1ActionForm.getXXXX()

To prepopulate the Screen2ActionForm

It has to

Create an instance of Screen2ActionForm

Populate it via setXXX methods

Put this instance into the correct scope
e.g request.setAttribute(Screen2ActionForm)

Return an ActionForward that maps to Screen2 JSP

What worries me about this approach is that not only does the Action need to know the Class of the ActionForm passed to it (Screen1ActionForm) it also has to know the Class of the Form used in the target jsp (Screen2ActionForm)!

Is this ok???
15 years ago

Thanks a lot for your help. If its not a real pain, have you got any tips on the following,

Say I've got a screen (HTML) with 3 tabs e.g Summary, Diagnostics, Log.

Each tab has the concept of internal states, so Diagnostics has sub states e.g "Show diagnostic candidates" "process candidate" etc. The user has the ability to jump from say "Show Diagnostic candidates" in the "Diagnostic" pane to "Summary". On returning to the "Diagnostic" pane the system must remember the "Diagnostic" sub state and show the appropiate screen.

From trawling the net this seems to be "Orthogonal" states, but I have yet to find an implementation example.

Would this be implemented with a top level State machine class holding a list of Child "State machines".

The Top level state machine would know which current state it was in "Summary" "Diagnostic" "Log" etc.

When the top level SM received an Event how would it know which Child SM to route to. I've seen an example where it routes the event to all child SM's in turn?!

How would it distinguish between an event that changed the top level current state e.g going from diagnostics to summary, and one that was a change in a childs state, e.g diagnostic screen 1 to screen 2.

May be I'm on the wrong track.

TIA Graham