<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>High Tech Redneck Woman &#187; Development</title>
	<atom:link href="http://www.hightechredneckwoman.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hightechredneckwoman.com</link>
	<description>I&#039;m a Redneck Woman. I&#039;m a High Tech Broad.</description>
	<lastBuildDate>Wed, 28 Jul 2010 01:19:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>I have a plan</title>
		<link>http://www.hightechredneckwoman.com/2010/07/27/i-have-a-plan/</link>
		<comments>http://www.hightechredneckwoman.com/2010/07/27/i-have-a-plan/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 01:19:36 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.hightechredneckwoman.com/?p=1312</guid>
		<description><![CDATA[<p>It seems like that since I started working full time as a web developer/programmer, I have neglected my own websites.  It has been really bad over the past few years.  I don&#8217;t even blog very much any more.  I&#8217;ve basically been doing all of my ranting and raving on Twitter and Facebook and haven&#8217;t been giving my own websites any attention.  I spend 8 hours (or 9 hours this summer) working on other people&#8217;s websites&#160;[&#8230;]</p>]]></description>
			<content:encoded><![CDATA[<p>It seems like that since I started working full time as a web developer/programmer, I have neglected my own websites.  It has been really bad over the past few years.  I don&#8217;t even blog very much any more.  I&#8217;ve basically been doing all of my ranting and raving on Twitter and Facebook and haven&#8217;t been giving my own websites any attention.  I spend 8 hours (or 9 hours this summer) working on other people&#8217;s websites and don&#8217;t really wanna work on mine when I get home.</p>
<p>I&#8217;m trying to change that.  I&#8217;ve deactivated my Facebook account, and I&#8217;m taking a break from Twitter for a while.  I know I&#8217;ll eventually go back to Twitter, but as for Facebook, I&#8217;m not sure.  I might reactivate my account and I might delete it completely &#8230; I just don&#8217;t know yet.  Since I&#8217;m taking a break from social media, I&#8217;ll have more time on my hands, and I plan to use that time on my websites.  </p>
<p>Tonite I put together a list of things that I want to do.  They are (roughly in order that I want to accomplish them):</p>
<ul>
<li>Clean up the files I have on the server with my web host (get rid of stuff I&#8217;m no longer using).</li>
<li>Clean up my database (again, get rid of stuff I&#8217;m no longer using).</li>
<li>Decide what I want to do with the subdomains that I have set up (keep, redirect, or remove).</li>
<li>Clean up my email accounts and forwarders (again, get rid of stuff I&#8217;m no longer using).</li>
<li>Redesign the layout for this website.</li>
<li>Start this site over from scratch in WP3 and import the posts and comments I have to this point.</li>
<li>Possibly redesign the layout for my <a href="http://www.rebeccaresler.com" target="external">professional website</a>.</li>
<li>Start my professional website over from scratch using CodeIgniter.</li>
<li>Do further development on the weather script I wrote a few years back.</li>
<li>Possibly write a WP plugin based on my weather script (once I complete it).</li>
<li>Blog more about the stuff that I&#8217;ve been doing at work with CodeIgniter.</li>
</ul>
<p>That list should keep me busy for a while. LOL  Now I just need to get myself to turn off the tv so I don&#8217;t have any distractions.</p>
<p>Wish me luck. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hightechredneckwoman.com/2010/07/27/i-have-a-plan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I had such high hopes</title>
		<link>http://www.hightechredneckwoman.com/2010/03/04/i-had-such-high-hopes/</link>
		<comments>http://www.hightechredneckwoman.com/2010/03/04/i-had-such-high-hopes/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 01:55:58 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.hightechredneckwoman.com/?p=1294</guid>
		<description><![CDATA[<p>After I redesigned this place the last time (back in <a href="http://www.hightechredneckwoman.com/2009/09/18/fresh-look/">September</a>, I had such high hopes of blogging more often and blogging about techie stuff.  It&#8217;s now March, and this is only my 2nd post of the year, and no techie/geekie stuff.  Yeah &#8230; I&#8217;m burning up the place. LOL</p>
<p>Since I&#8217;m back working again (just over 4 months at the new place) and coding every day, I have ideas race through my head&#160;[&#8230;]</p>]]></description>
			<content:encoded><![CDATA[<p>After I redesigned this place the last time (back in <a href="http://www.hightechredneckwoman.com/2009/09/18/fresh-look/">September</a>, I had such high hopes of blogging more often and blogging about techie stuff.  It&#8217;s now March, and this is only my 2nd post of the year, and no techie/geekie stuff.  Yeah &#8230; I&#8217;m burning up the place. LOL</p>
<p>Since I&#8217;m back working again (just over 4 months at the new place) and coding every day, I have ideas race through my head for things I want to do with my own websites.  Unfortunately, those ideas are racing while I&#8217;m at work, and by the time I get home, they&#8217;re gone.  I need to start writing &#8216;em down I think.  I&#8217;ve been using the CodeIgniter framework a lot.  I keep trying to think of things I could do with it.</p>
<p>I&#8217;ve also dabbled in writing a Facebook app for a project at work.  It&#8217;s a relatively simple one, as far as Facebook apps go &#8230; no interaction with the user or anything like that.  I still had issues getting things set up initially, but that&#8217;s probably because I jumped in with both feet rather than reading documentation first.  Oh well. I learn best by doing anyway.  I&#8217;d love to come up with a Facebook app on my own, but I&#8217;m not sure what to do.  The only thing that I can come up with is a weather widget. I started laying one out for my own websites already.  I could create a script that can be plugged in to a regular website, a WordPress plugin, and a Facebook app.  I just need to get my butt in gear.  It&#8217;s hard to get motivated to work on my own websites after working on other people&#8217;s sites all day at work.  But then again, I am usually sitting at the computer all nite anyway.  I might as well do something useful rather than reading Twitter and Facebook and other mindless surfing.</p>
<p>We use WordPress quite a bit at work.  I don&#8217;t deal with it since I&#8217;m the programming geek (php &#038; MySQL), but I see what is being done by my co-workers.  It makes me want to work on this place again.  One thing I&#8217;ve never dabbled with is widgets.  I usually just hard code the stuff I want in the sidebar since I&#8217;m just doing the site for myself.  But I&#8217;ve seen what can be done with widgets and it makes me wanna give it a try.  </p>
<p>There was a time where I was doing a lot of WP development.  Yeah, it was just for myself, but I knew what was going on and what I could do.  It&#8217;s been so long since I&#8217;ve done anything serious with WP.  Even when I redesigned last, I didn&#8217;t delve into things I could have. I really wanna dive back in, but I feel so far behind. So many advances have been made to the core.  I happened run across a site for a <a href="http://www.wordcampmsp.org/">WordCamp in the cities</a>. I&#8217;m seriously considering going.  I think one of my co-workers wants to as well.  It&#8217;s not until November, so we&#8217;ve got a while to make a decision.  Anyone else considering going to it?</p>
<p>I&#8217;ve got a pretty sweet setup going on now (well, considering what I&#8217;ve had in the past anyway).  I added memory to my laptop (from 1GB to 4GB), and I upgraded to Windows 7 (which I <strong><em>LOVE</em></strong>).  I even got a new monitor that&#8217;s hooked up to my laptop (21.5&#8243; widescreen).  The dual monitor setup is perfect for development (I wish I had dual monitors at work).  I still use WAMP server for local development.  I even found out about a program (from my boss) that gives me a GUI for my local MySQL databases (<a href="http://www.heidisql.com/">HeidiSQL</a>).  I have no excuse not to work on my own websites (other than the fact that I&#8217;ve turned into a lazy ass).</p>
<p>So &#8230; be on the lookout (I&#8217;ve said that before, haven&#8217;t I <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/G-wink.gif' alt=':wink:' class='wp-smiley' /> ).  I really will try to post more here. As with the ideas I have for my websites during the day, I have ideas for posts that never materialize (I think I need to carry a notebook with me to work &#8230; or just use Google Docs).  I need to be better about that. I need to stop procrastinating and being lazy. I really hope I can follow through.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hightechredneckwoman.com/2010/03/04/i-had-such-high-hopes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Project</title>
		<link>http://www.hightechredneckwoman.com/2009/04/28/new-project/</link>
		<comments>http://www.hightechredneckwoman.com/2009/04/28/new-project/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 17:15:05 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[distractions]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Weather]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.hightechredneckwoman.com/?p=1187</guid>
		<description><![CDATA[<p>While I wait to hear back from the job opportunity I interviewed for last week and the job opportunity I applied for yesterday, I need a project to keep me occupied.  I only really have one idea for what that project should be.  I&#8217;ve already done something similar with this idea, but I thought I would take it a step further this time around.</p>
<p>What is the idea?  Well, it&#8217;s a weather widget.  Yes, there&#160;[&#8230;]</p>]]></description>
			<content:encoded><![CDATA[<p>While I wait to hear back from the job opportunity I interviewed for last week and the job opportunity I applied for yesterday, I need a project to keep me occupied.  I only really have one idea for what that project should be.  I&#8217;ve already done something similar with this idea, but I thought I would take it a step further this time around.</p>
<p>What is the idea?  Well, it&#8217;s a weather widget.  Yes, there are lots of weather widgets already out there on the web, but there&#8217;s no rule anywhere saying I can&#8217;t add one more to the mix. <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/G-razz1.gif' alt=':pbbt:' class='wp-smiley' /> </p>
<p>My previous stab at this idea was just for my own personal use on my own websites.  It displayed the current conditions only for Fargo.  This time I want to create something that others can download and add to their own websites.  I also want it to allow for customization of the location of the conditions by the person who is viewing the website that the widget is on, and I want it to remember that customization.</p>
<p>I intend to use the <a href="http://www.weather.gov/xml/current_obs/" target="external">NWS XML feeds</a> for the data source.  That&#8217;s what I was using for my first version of this widget.  I trust the data from the NWS.  I see them as an official source.  I know that there are other sources out there that might have more data points, but I prefer the NWS, so that&#8217;s what I&#8217;m gonna use.</p>
<p>I&#8217;ve already created a brief outline of what I want to accomplish.  I even started sketching out the database schema over the weekend.  Now I just need to force myself to sit at the computer and work on it.  I definitely could use the distraction while I&#8217;m waiting.  Once I have things finished up, I&#8217;ll most likely add it to this site for download (with instructions of course).  I don&#8217;t know if anyone else will want to use it, but it will be good for me to put this together.  And it will be something nice to add to my portfolio. <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/G-smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hightechredneckwoman.com/2009/04/28/new-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optional should be OPTIONAL</title>
		<link>http://www.hightechredneckwoman.com/2008/05/23/optional-should-be-optional/</link>
		<comments>http://www.hightechredneckwoman.com/2008/05/23/optional-should-be-optional/#comments</comments>
		<pubDate>Fri, 23 May 2008 22:48:39 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.hightechredneckwoman.com/?p=271</guid>
		<description><![CDATA[<p>Yesterday and today, I've been working on some changes to our discount system (at work).  The majority of the changes dealt with the (mssql) database ... stored procedures and user defined functions (ufn).  One of the changes was to get the shopping cart subtotal based on different criteria ... </p>
<ul>
<li>If the shopping cart had an order-level discount in it, and that discount was set up to override any discount exclusions that were set</li></ul><p>&#160;[&#8230;]</p>]]></description>
			<content:encoded><![CDATA[<p>Yesterday and today, I've been working on some changes to our discount system (at work).  The majority of the changes dealt with the (mssql) database ... stored procedures and user defined functions (ufn).  One of the changes was to get the shopping cart subtotal based on different criteria ... </p>
<ul>
<li>If the shopping cart had an order-level discount in it, and that discount was set up to override any discount exclusions that were set up, the subtotal calculation needed to only exclude those products where the exclusion wasn't allowed to be overridden.</li>
<li>If the shopping cart had an order-level discount in it, and that discount was NOT set up to override any discount exclusions that were set up, the subtotal calculation needed to exclude ALL products that had exclusions set up.</li>
</ul>
<p>We have a ufn set up to calculate the order subtotal.  This ufn is already taking into account the discount exclusions.  But with my changes, I needed it to now look at the exclusion overrides.  I was hoping that ufn's allowed for optional parameters like php functions do.  So I set up a little test to see ...</p>
<div class="syntax_hilite">
<div id="sql-4">
<div class="sql"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">FUNCTION</span> <span style="color:#006600; font-weight:bold;">&#91;</span>dbo<span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#006600; font-weight:bold;">&#91;</span>ufn_MyTest<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#40;</span>@Param1 int, @Param2 int = <span style="color: #993333; font-weight: bold;">NULL</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
RETURNS varchar<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #cc66cc;">500</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
<span style="color: #993333; font-weight: bold;">AS</span><br />
BEGIN<br />
&nbsp; &nbsp; DECLARE @MyVariable varchar<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #cc66cc;">500</span><span style="color:#006600; font-weight:bold;">&#41;</span></p>
<p>&nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">IF</span> @Param1&gt; <span style="color: #cc66cc;">10</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">SET</span> @MyVariable = <span style="color: #ff0000;">'Incoming parameter #1 is greater than 10.'</span><br />
&nbsp; &nbsp; ELSE<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">SET</span> @MyVariable = <span style="color: #ff0000;">'Incoming parameter #1 is less than 10.'</span></p>
<p>&nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">IF</span> @Param2 <span style="color: #993333; font-weight: bold;">IS</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; BEGIN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">IF</span> @Param2&gt; <span style="color: #cc66cc;">10</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">SET</span> @MyVariable = @MyVariable + <span style="color: #ff0000;">' Incoming parameter #2 is greater than 10.'</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">SET</span> @MyVariable = @MyVariable + <span style="color: #ff0000;">' Incoming parameter #2 is less than 10.'</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; END</p>
<p>&nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">RETURN</span> @MyVariable<br />
END</div>
</div>
</div>
<p></p>
<p>The database let me create the function, so I was hopeful that this was gonna work.  So I tried executing my little ufn ...</p>
<div class="syntax_hilite">
<div id="sql-5">
<div class="sql"><span style="color: #993333; font-weight: bold;">SELECT</span> dbo.ufn_MyTest<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #cc66cc;">8</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</div>
</div>
<p></p>
<p>But that didn't work.  It gave me an error ...</p>
<p><code>An insufficient number of arguments were supplied for the procedure or function dbo.ufn_myTest.</code></p>
<p>What?  Come on.  That second parameter is set up to be optional.  So I did some searching and found this tidbit ...</p>
<blockquote><p>from the MSSQL manual<br />
When a parameter of the function has a default value, the keyword "default" must be specified when calling the function in order to get the default value. This behavior is different from parameters with default values in stored procedures in which omitting the parameter also implies the default value.</p></blockquote>
<p>Grrr!!  <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/banghead.gif' alt=':banghead:' class='wp-smiley' /> So I tried this ...</p>
<div class="syntax_hilite">
<div id="sql-6">
<div class="sql"><span style="color: #993333; font-weight: bold;">SELECT</span> dbo.ufn_MyTest<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #cc66cc;">8</span>, <span style="color: #993333; font-weight: bold;">DEFAULT</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</div>
</div>
<p></p>
<p>THAT worked.  But doesn't that kind of defeat the purpose of having an "optional" parameter.  When I think "optional", I see that as meaning that the parameter doesn't have to be passed or it can be, depending on the situation.  If I have to put 'DEFAULT' in it's place, that doesn't make it optional.  I could just as well pass in the "optional" value.  </p>
<p>To fix my little conundrum, I created a separate ufn and called the appropriate one based on the parameter that I had wanted to pass in as an optional one.  That worked like a charm.  I just wish that Microsoft would have set up mssql ufn's to accept truly optional parameters.  But I guess I'm not surprised.  It is Microsoft after all.   <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/neener.gif' alt=':nahnah:' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hightechredneckwoman.com/2008/05/23/optional-should-be-optional/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XSL Variable Quirks</title>
		<link>http://www.hightechredneckwoman.com/2008/04/21/xsl-variable-quirks/</link>
		<comments>http://www.hightechredneckwoman.com/2008/04/21/xsl-variable-quirks/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 17:52:58 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[quirks]]></category>
		<category><![CDATA[xsl]]></category>

		<guid isPermaLink="false">http://www.hightechredneckwoman.com/?p=231</guid>
		<description><![CDATA[<p>I'm still working on our Google Checkout integration at work.  I have the web service done, but now I need to process the notifications from Google and update our database accordingly.  This morning I was working on translating the XML from Google's 'New Order Notification' into a simpler XML that I can use to insert the order into our database by translating it through an XSL stylesheet.  While doing so, I ran into a little&#160;[&#8230;]</p>]]></description>
			<content:encoded><![CDATA[<p>I'm still working on our Google Checkout integration at work.  I have the web service done, but now I need to process the notifications from Google and update our database accordingly.  This morning I was working on translating the XML from Google's 'New Order Notification' into a simpler XML that I can use to insert the order into our database by translating it through an XSL stylesheet.  While doing so, I ran into a little quirk in how XSL translations are done.</p>
<p>I was splitting the name into pieces for first name, middle initial, and last name.  While going through the various ways the name could be split, I was setting variables with the values.  After all of the processing, I was using the variables to set the XML pieces that I needed.  But I was getting errors saying that a couple of my variables weren't registered.  </p>
<p>So I did some searching to find out what was up since I don't have a lot of experience with XSL (hence the issue I ran into).  Apparently variables have VERY LIMITED scope.  I was setting the variables with conditional statements inside of a template that was passed the name node to split.</p>
<div class="syntax_hilite">
<div id="code-9">
<div class="code">&lt;xsl:variable name=<span style="color:#CC0000;">"ContactFirstName"</span> select=<span style="color:#CC0000;">"substring-before($name, ' ')"</span> /&gt;<br />
&lt;xsl:variable name=<span style="color:#CC0000;">"rest"</span> select=<span style="color:#CC0000;">"substring-after($name, ' ')"</span> /&gt;<br />
&lt;xsl:choose&gt;<br />
&nbsp; &nbsp; &lt;xsl:when test=<span style="color:#CC0000;">'contains($rest, '</span> <span style="color:#CC0000;">')'</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:variable name=<span style="color:#CC0000;">"ContactMiddleInitial"</span> select=<span style="color:#CC0000;">"substring-before($rest, ' ')"</span> /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:variable name=<span style="color:#CC0000;">"ContactLastName"</span> select=<span style="color:#CC0000;">"substring-after($rest, ' ')"</span> /&gt;<br />
&nbsp; &nbsp; &lt;/xsl:when&gt;<br />
&nbsp; &nbsp; &lt;xsl:otherwise&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:variable name=<span style="color:#CC0000;">"ContactMiddleInitial"</span> select=<span style="color:#CC0000;">"''"</span> /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:variable name=<span style="color:#CC0000;">"ContactLastName"</span> select=<span style="color:#CC0000;">"$rest"</span> /&gt;<br />
&nbsp; &nbsp; &lt;/xsl:otherwise&gt;<br />
&lt;/xsl:choose&gt;<br />
&lt;FirstName&gt;&lt;xsl:value-of select=<span style="color:#CC0000;">"$ContactFirstName"</span> /&gt;&lt;/FirstName&gt;<br />
&lt;MiddleInitial&gt;&lt;xsl:value-of select=<span style="color:#CC0000;">"$ContactMiddleInitial"</span> /&gt;&lt;/MiddleInitial&gt;<br />
&lt;LastName&gt;&lt;xsl:value-of select=<span style="color:#CC0000;">"$ContactLastName"</span> /&gt;&lt;/LastName&gt;</div>
</div>
</div>
<p></p>
<p>Doing the above code, I got errors that the ContactMiddleInitial and ContactLastName variables weren't registered.  I was confused because they were set no matter what from the conditions.  But apparently the <strong>xsl:variable</strong> in each case had a parent of either <strong>xsl:when</strong> or <strong>xsl:otherwise</strong>, and they weren't available outside of that.  I didn't realize that.  </p>
<p>So I changed my code to the following and all was fine:</p>
<div class="syntax_hilite">
<div id="code-10">
<div class="code">&lt;xsl:variable name=<span style="color:#CC0000;">"ContactFirstName"</span> select=<span style="color:#CC0000;">"substring-before($name, ' ')"</span> /&gt;<br />
&lt;xsl:variable name=<span style="color:#CC0000;">"rest"</span> select=<span style="color:#CC0000;">"substring-after($name, ' ')"</span> /&gt;<br />
&lt;xsl:choose&gt;<br />
&nbsp; &nbsp; &lt;xsl:when test=<span style="color:#CC0000;">'contains($rest, '</span> <span style="color:#CC0000;">')'</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:variable name=<span style="color:#CC0000;">"ContactMiddleInitial"</span> select=<span style="color:#CC0000;">"substring-before($rest, ' ')"</span> /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:variable name=<span style="color:#CC0000;">"ContactLastName"</span> select=<span style="color:#CC0000;">"substring-after($rest, ' ')"</span> /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;FirstName&gt;&lt;xsl:value-of select=<span style="color:#CC0000;">"$ContactFirstName"</span> /&gt;&lt;/FirstName&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;MiddleInitial&gt;&lt;xsl:value-of select=<span style="color:#CC0000;">"$ContactMiddleInitial"</span> /&gt;&lt;/MiddleInitial&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;LastName&gt;&lt;xsl:value-of select=<span style="color:#CC0000;">"$ContactLastName"</span> /&gt;&lt;/LastName&gt;<br />
&nbsp; &nbsp; &lt;/xsl:when&gt;<br />
&nbsp; &nbsp; &lt;xsl:otherwise&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:variable name=<span style="color:#CC0000;">"ContactMiddleInitial"</span> select=<span style="color:#CC0000;">"''"</span> /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:variable name=<span style="color:#CC0000;">"ContactLastName"</span> select=<span style="color:#CC0000;">"$rest"</span> /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;FirstName&gt;&lt;xsl:value-of select=<span style="color:#CC0000;">"$ContactFirstName"</span> /&gt;&lt;/FirstName&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;MiddleInitial&gt;&lt;xsl:value-of select=<span style="color:#CC0000;">"$ContactMiddleInitial"</span> /&gt;&lt;/MiddleInitial&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;LastName&gt;&lt;xsl:value-of select=<span style="color:#CC0000;">"$ContactLastName"</span> /&gt;&lt;/LastName&gt;<br />
&nbsp; &nbsp; &lt;/xsl:otherwise&gt;<br />
&lt;/xsl:choose&gt;</div>
</div>
</div>
<p></p>
<p>Seems kinda silly to me that you can't do what I tried in the first case.  But I guess that's how the language is set up.  The first question on this page has more detailed info on this: <a href="http://www.xml.com/pub/a/2002/06/26/q-a.html" target="external">Q. Can I change the value of an XSLT variable?</a></p>
<p>This is mostly for my benefit in case I run into this issue again.  But maybe it will help someone else out there.  See ... I can write tech-related posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hightechredneckwoman.com/2008/04/21/xsl-variable-quirks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weekday plugin</title>
		<link>http://www.hightechredneckwoman.com/2007/01/08/weekday-plugin/</link>
		<comments>http://www.hightechredneckwoman.com/2007/01/08/weekday-plugin/#comments</comments>
		<pubDate>Tue, 09 Jan 2007 01:54:04 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.hightechredneckwoman.com/2007/01/08/weekday-plugin/</guid>
		<description><![CDATA[<p>When I first moved over to WordPress as a blogging platform in June 2004, I wasn't able to find a way to get the date for my posts to display <strong>Today</strong> or <strong>Yesterday</strong>.  I had been able to when I used MovableType.  What I'm talking about is:</p>
<ul>
<li>If the post was posted today, it will put <strong>Today</strong>.</li>
<li>If the post was posted yesterday, it will put <strong>Yesterday</strong>.</li>
<li>Otherwise it will put the actual weekday</li></ul><p>&#160;[&#8230;]</p>]]></description>
			<content:encoded><![CDATA[<p>When I first moved over to WordPress as a blogging platform in June 2004, I wasn't able to find a way to get the date for my posts to display <strong>Today</strong> or <strong>Yesterday</strong>.  I had been able to when I used MovableType.  What I'm talking about is:</p>
<ul>
<li>If the post was posted today, it will put <strong>Today</strong>.</li>
<li>If the post was posted yesterday, it will put <strong>Yesterday</strong>.</li>
<li>Otherwise it will put the actual weekday (i.e. <strong>Monday</strong>).</li>
</ul>
<p>So ... I wrote one of my first WordPress plugins.  It's the only one I wrote that I still use.  </p>
<p><strong>Download:</strong><br />
<a href="http://www.hightechredneckwoman.com/wp-content/uploads/2007/01/weekday.zip" title="Weekday plugin">Weekday plugin</a> version 1.5</p>
<p><strong>Installation:</strong><br />
Installation is simple.  Just unzip the downloaded file and upload it to the <strong>/wp-content/plugins/ </strong>directory in your WordPress install.  Then go to the Plugins page in your WordPress Admin and activate the plugin.</p>
<p><strong>Usage:</strong><br />
In your template where you want to display the date for a post, replace:</p>
<div class="syntax_hilite">
<div id="php-15">
<div class="php"><span style="color:#000000; font-weight:bold;">&lt;?php</span> the_date<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#000000; font-weight:bold;">?&gt;</span></div>
</div>
</div>
<p>
with</p>
<div class="syntax_hilite">
<div id="php-16">
<div class="php"><span style="color:#000000; font-weight:bold;">&lt;?php</span> weekday_date<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#000000; font-weight:bold;">?&gt;</span></div>
</div>
</div>
<p></p>
<p>This will display the date for <strong>every</strong> post, even if there are multiple posts for the same day.  This tag must be used within <a href="http://codex.wordpress.org/The_Loop" target="_blank">The Loop</a></p>
<p>You can customize the format of the date, HTML to put before and after the date (i.e. surround the date in a container), and a separator between the <strong>Weekday</strong> and the rest of the date.  You can also specify if you want to display the date or add it to a string and display it elsewhere:</p>
<div class="syntax_hilite">
<div id="php-17">
<div class="php">weekday_date<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$date_format</span>=<span style="color:#FF0000;">""</span>, <span style="color:#0000FF;">$container_start</span>=<span style="color:#FF0000;">""</span>, <span style="color:#0000FF;">$container_end</span>=<span style="color:#FF0000;">""</span>, <span style="color:#0000FF;">$separator</span>=<span style="color:#FF0000;">""</span>, <span style="color:#0000FF;">$echo</span> = <span style="color:#000000; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</div>
</div>
<p></p>
<p><span style="font-weight: bold; color: #0000ff;">$date_format</span> can be anything you want.  See the <a href="http://us3.php.net/manual/en/function.date.php" target="_blank">date()</a> function for possibilities.</p>
<p>On this site, I am using the following to display the date:</p>
<div class="syntax_hilite">
<div id="php-18">
<div class="php"><span style="color:#000000; font-weight:bold;">&lt;?php</span> weekday_date<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'d M Y'</span>,<span style="color:#FF0000;">''</span>,<span style="color:#FF0000;">''</span>, <span style="color:#FF0000;">'&lt;br /&gt;'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#000000; font-weight:bold;">?&gt;</span></div>
</div>
</div>
<p></p>
<p><strong>Questions?</strong><br />
If you have any questions about the plugin or any problems, please let me know.  </p>
<p>I hope someone out there can find this useful.  If you do, please let me know.  Leave a comment with a link to your site. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hightechredneckwoman.com/2007/01/08/weekday-plugin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
