Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!
Tommyrot, what I would do is get rid of the lines:
selectField = xslStyle.selectSingleNode("...");
selectField.value = "status[@pp=" + varPayPeriod + "]/@s"
replace it with:
xslStyle.addParameter("varPayPeriod", varPayPeriod);
add a
<xslt:param name="varPayPeriod"/>
to the beginning of your .xsl file, and change the
<xsl:value-of select="status/@s" />
to
<xsl:value-of select="status[@pp=$varPayPeriod]/@s" />
and use
<xsl:if test="status[@pp=$varPayPeriod]/@s" />
You have my permission to go and beat the original programmer with a stick.
(I might not have the syntax correct, you might have to use @pp='$varPayPeriod' with single quotes)
Thanks, Tom.
what the original programmer is doing is modifying the stylesheet on the fly, so that the stylesheet that is executed will be different than what the code you see.
Very kludgy.
Heh. That's probably why I couldn't find anything like it in my "Beginning XML" book. I think that book
does
have the technique of passing a parameter to xsl like you show.
I've got a few other things to do, but I'll try your code out soon.
A city in Oklahoma was threatening the CentOS Linux distribution because the default Apache test page was showing up on their website.
OMG. I've had customers like that. Unbelievable. The distro guy was unbelievably patient and the OK guy was an asshat not to apologize.
Are there any books that folks here think are "must have" tech books that are on either the Que or Sams imprints? I have a short window in which I could obtain such things and would like to know if there's anything I should be gunning for. Monsieur Scola recommended ""Unix System Administrator's Handbook", which isn't on either of those imprints but was still something I could get a discount on. It looks like it will be an interesting read.
I have good access to books on Mac OS X from a theoretical point of view, but books that have good "down in the trenches" advice on networks, Mac OS X, Linux and Windows would be of interest to me.
Windows Is So Slow, but Why?
Check out all these anonymous blog comments from MSFT employees, calling for management to be fired.
How long has it been since XP came out?
It does seem like quite awhile for a signifcant upgrade to Windows to come out. OTOH, it doesn't seem like Microsoft has been suffering greatly because of it.
How long has it been since XP came out?
2002, I think. Most of their previous verisons came out on a two to three year cycle. Vista is overdue, even if you count 2003 Server.
Wikipedia, bless its soul, has entries for MacOS, Windows and Photoshop that detail the version releases and dates. That has been such a godsend in my work.
[link]
Huh. I had no idea Wikipedia had that much computer info.
They even have a big entry for 'DLL hell': [link]
I was so glad the day I discovered those entries. The forerunners at my soon-to-be-ex-place of employ were TERRIBLE at noting what version of an app a book was made for (if the app wasn't in the title of the book by version). They stupidly assumed that 6 years later people would remember... I did a lot of cross-referencing with the help of Wikipedia.