By Soul Solutions on
Thursday, 28 September 2006
Been having some "issues" trying to serialize datetime fields from infopath to SQL2005. The problem lies in the serialization expects a fully qualified datetime value including locale e.g. 2006-09-20T01:56:45+10:00. However, Infopath, and XML in general doesn't record the local e.g. 2006-09-20T01:56:45
So after doing some searching i came across the adjust-dateTime-to-timezone function for xsl V2.0. So to change a datetime to a sql2005 date do the following:
< xsl:value-of select="adjust-dateTime-to-timezone(ns1:formUpdateDate)"/>
Which works great until you use the .net XslCompiledTransform class. Unfortunatly it only supports V1.0 so doesn't recognise the adjust-dateTime-to-timezone.
So my dodge workaround for the moment is to add the timezone onto the end "manually". When I work out a better way to do this, i'll write it up.
|
By Soul Solutions on
Wednesday, 27 September 2006
Bit rusty on the old xsl transforms...but i had a case today where i needed to add a namespace to search one file, but my output file i need to not have that namespace. It's actually really easy, once you read the doco...use the exclude-result-prefixes attribute e.g.
xmlns:ns1 =http://www.soulsolutions.com.au/mynamespace exclude-result-prefixes="ns1"
|
By Soul Solutions on
Monday, 25 September 2006
Thought it'd be easier to put the comments here than make a GIANT comment on Frank's blog.
Comments on Tech Ed that most come to mind:
Tech Ed
The venue - in general it was well layed out and had enough space (apart from some sessions see below)
Overlap in content in sessions. There was way too much overlap in session with a common theme. This is ok if you go to one of them..but if you go to a theme you'd almost be better off going to every 2nd session. For me, the sessions tended to be very high level.
Same e.gs - It seemed like every web session and/or virtual earth session showed THE SAME real estate agent site
Overcrowding - A lot of rooms were overcrowded where you had to stand or be so squished to the person beside you you end up cramping up
The party - hmm..what can i say...a night club full of geeks...not a great venue for the number of people. Didn't really enjoy watching people play xbox all night
labs - Labs were good but not enough time to work on them unless you skipped sessions - maybe open early till late for those keen to learn?
community project - great in theory - needs to be broken into tasks 1/2 to an hour long so people can contribute more easily. I was keen to contribute but found it hard to find a task that wasn't dependant or atomic enough to work on in the time I had spare.
Bar Code Scanners - I'm not a grocery item going through a check out
Deep Dives - maybe have more deep dives at the end of tech ed once you know what stuff you're interested in diving into. This may satisfy my craving for more than a 1 hour overview of a really big topic.
Tech Ed Bags - Bags were great - even fit a 17" dell
The Food - if you are patient...there was heaps of food. Maybe need a few more snack areas to nip in between talks
PC's / internet access - there were heaps
Tech Ed Shirts - love the embroidery
Key and Lock Note - both interesting and something different to think about...
Read More »
|
By Soul Solutions on
Saturday, 23 September 2006
For some reason the built in gettop and getleft methods from Virtual earth don't work consistantly across all interfaces. Try this more generic function instead.
function SetMapOffsets(obj) {
if (obj.offsetParent) {
mapleft = obj.offsetLeft
maptop = obj.offsetTop
while (obj = obj.offsetParent) {
mapleft += obj.offsetLeft
maptop += obj.offsetTop
}
}
}
|
By Soul Solutions on
Friday, 22 September 2006
I accidentally turned on sticky keys in XP today. Which, if you've ever done makes it really hard to write code, and especially to search Google to switch off.
To get rid of Sticky Keys press both Shift keys at the same time.
|
By Soul Solutions on
Thursday, 21 September 2006
If you have played with Virtual Earth you will have noticed that if you click on a pushpin it actually cancels the mouseover event and your popup ballon doen't appear. To fix this you need to add an onclick event manully through the DOM and then call the onmouseover event manually, There is a slight difference between browsers to take of also. Check out the solution.
var map = null;
var pinID = 1;
function GetMap()
{
map = new VEMap('myMap');
map.LoadMap(new VELatLong(47.6, -122.33), 10 ,'h' ,false);
AddClickablePin(new VELatLong(47.6, -122.33),null,"test","some nice details")
}
function AddClickablePin(location, icon_url, title, details)
{
var pin = new VEPushpin(pinID, location, icon_url, title, details);
map.AddPushpin(pin);
var element = document.getElementById(pinID);
element.onclick = EventHandlerOnClick;
pinID++;
}
function EventHandlerOnClick(e)
{
if (e!=null)
{
document.getElementById(e.currentTarget.id + "_" + map.GUID).onmouseover();
} else
{
document.getElementById(window.event.srcElement.id).onmouseover();
}
}
|
By Soul Solutions on
Monday, 18 September 2006
A little trick for when you add your custom Pushpin in Virtual Earth, if you need to modify the postion of the pin slighty to line up the point of pin or centre of crosshair with the correct pixel you must set a "iconstyle" and do it in css.
//set an iconStyle when adding the pin in js
var x = new VEPushpin(id, location, icon_url, title,
details, iconStyle, titleStyle, detailsStyle);
/*The css class for the pushpin, use left and top to adjust offset*/
.MyPushpinStyle {position:absolute;left:0px;top:-20px;}
|
By Soul Solutions on
Thursday, 14 September 2006
Noticed this annoncement on ASX today...7 to take 33% in Engin. We've had Engin for awhile now and we love it. Our phone bill went down from $80/mth to about $13/mth. We get to use our existing phone, have a real number etc. We can do cool stuff like see our bill online, block numbers permenantly or for a fixed period of time (great for stopping unwanted persons ringing at dinner). We've gotten about 4 other people onto it (including my olds).
Interesting to see that 7 is investing in it after reading reports that in the US VOIP is dead.
|
By Soul Solutions on
Wednesday, 13 September 2006
A nice new feature in Virtual Earth is the addition of polygons. If you have used polylines then with one additional line of code to set the fill colour you can do polygons.
function DrawPoly(id,points,width,color)
{
poly = new VEPolygon(id,points);
poly.SetOutlineWidth(3);
poly.SetOutlineColor(color);
poly.SetFillColor(color);
map.AddPolygon(poly);
}
|
By Soul Solutions on
Wednesday, 13 September 2006
The Virtual Earth control was updated today to include a number of bug fixes. One important one was to support polylines in firefox and change the z-order so that pushpins appear on top. Here is a little shot of it working in the fox.

|