<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Philo's WebLog : Developer</title><link>http://blogs.msdn.com/philoj/archive/tags/Developer/default.aspx</link><description>Tags: Developer</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>A simple conceit vs. questions left unasked</title><link>http://blogs.msdn.com/philoj/archive/2007/10/26/a-simple-conceit-vs-questions-left-unasked.aspx</link><pubDate>Sat, 27 Oct 2007 06:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5701801</guid><dc:creator>philoj</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/philoj/comments/5701801.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=5701801</wfw:commentRss><description>&lt;P&gt;Here's a fun mental exercise - on the one hand, we have the "everyone is lost but me" syndrome, where someone will charge off on a course of action, despite many many warnings about the perilous nature of his quest, until he runs smack dab into that windmill. &lt;/P&gt;
&lt;P&gt;And yet we have "there is no such thing as a stupid question" - where even though everyone around you seems to know what's going on, and you see some flaw, the refrain is "it never hurts to ask the question." &lt;/P&gt;
&lt;P&gt;How do we reconcile these? One the one hand, we say that charging off contrary to everyone's opinion is bad; but on the other hand questioning the course when everyone is charging off is good. &lt;/P&gt;
&lt;P&gt;The issue is ego. &lt;/P&gt;
&lt;P&gt;"Everyone is lost but me" isn't about one person heading in a direction that everyone else warns about; it's about believing that you are smarter than everyone else around you. I can cite two examples and a counter-example from, of all places, Hollywood:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Batman&amp;amp;Robin, where Joel Schumacher killed a multi-billion dollar franchise because he was sure what the public wanted to see was more camp like the Batman TV show of the 60's. Never mind that Tim Burton's dark, adult dramas had raked in sinful amounts of cash - when everything is working right, obviously it's time to change the formula. The box office punished Schumacher and comic book movies went into remission for ten years, until Spiderman and Raimi's understanding of the public brought it back. &lt;/LI&gt;
&lt;LI&gt;Annapolis (and the thought that prompted this post). This one is near and dear to my heart, since I'm a Naval Academy graduate. As I understand it, the director/producer people wanted to make a movie set at the Naval Academy - hoping to trade a bit on the patriotism borne by 9/11 and launch a new era of Top Gun movies. They approached the Navy about filming at USNA. The public affairs officers in the Navy read the script, and asked for a few changes. The producer/director people refused, and the Navy refused permission (so the movie was shot in Philadelphia). This turn of events was crushing to a lot of USNA graduates, and at first we blamed the Navy for being so unbending. Now that I have seen part of the film, I understand. One of the objections the Navy had was about a romance between a Plebe (freshman) and a female upperclassman. This is fraternization and an expulsion offense at the Naval Academy. I'm sure the producer/director people thought this made it a "forbidden love," but it just came away as completely and utterly unbelievable. I had to turn the movie off. So because the producer/director people thought they knew better than Navy officials what a USNA movie should look like, it tanked. &lt;/LI&gt;
&lt;LI&gt;The exception: The Lord of the Rings. When Peter Jackson first landed the role as director, he talked about "his vision" of Tolkien's work. Several hundred thousand angry emails and letters from fans later, he took their rebukes as a challenge and decided to go the other way - be as accurate as humanly possible to the original work. The rest of that, is history. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Of course, there's an exception to all of this - there are times that you may be so sure in your vision that you decide to ride off despite the warnings of others. Many visionaries have changed the world this way. Sometimes it's still ego, but I think a large number of times what sets them apart isn't thinking "everyone else is lost but me" but rather "everyone else is looking for the path, but I think I can find a shortcut" - not doubting the intelligence of everyone else, but believing they've found insight into a new path. &lt;/P&gt;
&lt;P&gt;A fine line to walk, to be sure. &lt;/P&gt;
&lt;P&gt;And yet you'll sit in a room of people you know are smarter than you who are discussing a plan and settling onto the details when you're sure you've spotted a flaw in their plan. Is it ego to ask about it? Well, it may be ego to assert that you have found the flaw in their plan and their all stupid; but I think again - many folks who ask (or sadly, don't ask) that question aren't sure they're smarter than everyone else - often they just think they are the ones who have missed something. &lt;/P&gt;
&lt;P&gt;Who was it that said "don't let your ego write checks your body can't cash..."? &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5701801" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/philoj/archive/tags/Non-Tech/default.aspx">Non-Tech</category></item><item><title>InfoPath &amp; SharePoint screencast demo</title><link>http://blogs.msdn.com/philoj/archive/2007/09/28/infopath-sharepoint.aspx</link><pubDate>Fri, 28 Sep 2007 08:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5179743</guid><dc:creator>philoj</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/philoj/comments/5179743.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=5179743</wfw:commentRss><description>&lt;P&gt;As&amp;nbsp; follow-up to the "hook InfoPath to a database" demo, here I'm taking a step back to a simpler form - building an InfoPath form to be used on its own in conjunction with SharePoint. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;A href="http://channel9.msdn.com/ShowPost.aspx?PostID=344635"&gt;http://channel9.msdn.com/ShowPost.aspx?PostID=344635&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;In the next few videos I'm going to cover:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;InfoPath, xml schemas, and xml&lt;/LI&gt;
&lt;LI&gt;An advanced InfoPath form connected to a database&lt;/LI&gt;
&lt;LI&gt;Connecting an InfoPath form to a .Net web service&lt;/LI&gt;
&lt;LI&gt;Connecting an InfoPath form to a SQL Server web service&lt;/LI&gt;
&lt;LI&gt;eForms &amp;amp; workflow in SharePoint&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;(Just a reminder - this and other fun InfoPath 2007 stuff all covered in &lt;A class="" href="http://www.amazon.com/gp/product/1590597303?ie=UTF8&amp;amp;tag=philosvbaccesspr&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1590597303" target=_blank mce_href="http://www.amazon.com/gp/product/1590597303?ie=UTF8&amp;amp;tag=philosvbaccesspr&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1590597303"&gt;my book&lt;/A&gt;...) &lt;/P&gt;
&lt;P&gt;&amp;nbsp;I'll also be covering more business intelligence content (SQL Server Analysis Services, ProClarity, PerformancePoint - stay tuned!)&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5179743" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx">InfoPath</category><category domain="http://blogs.msdn.com/philoj/archive/tags/Non-Tech/default.aspx">Non-Tech</category></item><item><title>SQL Server Analysis Services in ten minutes</title><link>http://blogs.msdn.com/philoj/archive/2007/09/24/sql-server-analysis-services-in-ten-minutes.aspx</link><pubDate>Mon, 24 Sep 2007 21:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5103941</guid><dc:creator>philoj</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/philoj/comments/5103941.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=5103941</wfw:commentRss><description>&lt;P&gt;Analysis Services has been part of SQL Server for a while, but it's underappreciated by most. I've posted another video on Channel 9 to try to share what a powerful capability this is for understanding large volumes of aggregated data. &lt;/P&gt;
&lt;P&gt;More than just the simple demo (showing a cube, clicking through some dimensions, pulling the data into Excel 2007), Analysis Services opens the door to truly powerful analytic capabilities in data mining, visualization, and (with PerformancePoint Server), scorecards, dashboards, analytic charts, and planning scenarios. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;I'm not trying to trivialize the technology - OLAP cubes are definitely something that's a short time to learn, a lifetime to master. But I am trying to demystify some of this stuff so SQL Server devs &amp;amp; DBA's can get an idea where to start. &lt;/P&gt;
&lt;P&gt;Short video, but I'm trying to keep them under ten minutes. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://channel9.msdn.com/Showpost.aspx?postid=343717"&gt;http://channel9.msdn.com/Showpost.aspx?postid=343717&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5103941" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/philoj/archive/tags/Business+Intelligence/default.aspx">Business Intelligence</category></item><item><title>Philo on EDI</title><link>http://blogs.msdn.com/philoj/archive/2007/09/24/philo-on-edi.aspx</link><pubDate>Mon, 24 Sep 2007 07:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5087651</guid><dc:creator>philoj</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/philoj/comments/5087651.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=5087651</wfw:commentRss><description>&lt;P&gt;I wrote this post on Joel On Software in 2004 in response to a newbie asking about EDI. Since then I have referred several people to it, but a few times I've found the post tricky to find. So, instead of constantly relying on the benevolence of Joel acting as a library for me, I'm going to recycle bits and post this here. The advice is targeted towards EDI, but it really is good general purpose advice for building ETL or any kind of document parsing...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Step 1: Get sample data from every trading partner. Refuse to do anything until you have this. Claim work stoppage, announce loudly at meetings you're stalled, send emails to VP's, whatever - GET DATA FROM EVERY PARTNER BEFORE STARTING.&lt;BR&gt;&lt;BR&gt;Step 2: Make zero assumptions. Provide error cases for every possibility&lt;BR&gt;&lt;BR&gt;Step 3: Get the ANSI X12 specs for the document. Read them. Compare the sample data from #1 to them. Be prepared to create program flows for every line in the implementation guides BUT look for lines that aren't used by your partners. Any line you can't find being used, document it. Once you have a full list, send that list to your manager for "I don't see these fields being used - do we need to implement them?" Get the answer in writing.&lt;BR&gt;&lt;BR&gt;Step 4: Make sure your code can provide for the lines in step 3 when some partner starts using one of them the day after you deploy.&lt;BR&gt;&lt;BR&gt;The hardest part about EDI is that the rules are observed mainly in the breach, and nobody makes partners follow the rules. I built my 810/850 parser as a class hierarchy, which ended up serving me VERY well - it was very modular, and changes like those in step 4 above turned out to be relatively straightforward.&lt;BR&gt;&lt;BR&gt;Final note: make sure you know what versions the partners are using, too. :-)&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5087651" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/Developer/default.aspx">Developer</category></item><item><title>A "drill through" web part</title><link>http://blogs.msdn.com/philoj/archive/2005/04/27/412777.aspx</link><pubDate>Wed, 27 Apr 2005 23:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:412777</guid><dc:creator>philoj</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/philoj/comments/412777.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=412777</wfw:commentRss><description>&lt;P&gt;This &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/smpxCreateConnectableWPMultipleInterface_SV01080585.asp"&gt;MSDN article&lt;/A&gt;&amp;nbsp;shows how to implement a SharePoint web part that can act as a consumer or a provider. However, if you try to use it as a "drill through" web part (another web part filters the results in this web part; clicking on this web part filters or populates another web part), it won't work (actually it will; but it will give unpredictable results)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The reason is that the filter value which filters the grid isn't available when the page is reloaded for the second click-through, and so the index returned on the postback points to the wrong row. The simple solution is to store the selected index in a ViewState variable and test against both the ViewState and the returned datagrid index, then filter as appropriate. &lt;/P&gt;
&lt;P&gt;Philo&lt;BR&gt;&lt;I&gt;&lt;FONT color=#0000ff size=2&gt;I had no illusions&lt;BR&gt;That I'd ever find a glimpse of summer's heatwaves in your eyes&lt;/FONT&gt;&lt;/P&gt;&lt;/I&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=412777" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/philoj/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Emailing a different InfoPath form</title><link>http://blogs.msdn.com/philoj/archive/2005/04/25/411972.aspx</link><pubDate>Tue, 26 Apr 2005 01:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:411972</guid><dc:creator>philoj</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/philoj/comments/411972.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=411972</wfw:commentRss><description>&lt;P&gt;I recently needed to create an InfoPath form that enabled the user to post the data to another user in a format they could open in *their* InfoPath form. After some thought, I went with the idea of running an XSL transform on the data and posting it via an email connector. &lt;/P&gt;
&lt;P&gt;Of course, first I needed to create the XSLT. Obviously you can do this in notepad, but I prefer tools that are less likely to make my eyes bleed. I chose to go with Altova's &lt;A href="http://www.altova.com/products_mapforce.html"&gt;MapForce&lt;/A&gt;&amp;nbsp;- it's a great visual designer for mapping one schema to another:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.textamerica.com/user.images.x/92/IMG_465392/_0425/TZ20042517505446.jpg?refresh="&gt; &lt;/P&gt;
&lt;P&gt;I extracted the form files from each InfoPath form and loaded the myschema.xsd files as source and destination. MapForce handled most of the mapping, connecting similarly-named nodes. Then I generated the XSLT. I had to do a quick edit on the XSL to provide the processing instructions and pull out the schemaLocation attribute on the root. (You can probably do this in MapForce too, but I was in a rush...)&lt;/P&gt;
&lt;P&gt;So, next thing - add the xslt to the form as a data connection. You want to create a data connection that will Receive Data from an XML file - then you can select your XSLT file and add it as a resource. &lt;/P&gt;
&lt;P&gt;Now create a data connection to submit the form via email - set properties as needed. &lt;/P&gt;
&lt;P&gt;Add a button and add form code - I'm working in jscript so that I didn't need a fully trusted form. &lt;/P&gt;
&lt;P&gt;The final step, add the following code:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#006400&gt;//Get the current form data&lt;/FONT&gt;&lt;BR&gt;var CurrentForm=XDocument.DOM;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#006400&gt;//Get the transform&lt;/FONT&gt;&lt;BR&gt;var XSLTFileDOM=XDocument.GetDOM("MTCXSLT");&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;FONT color=#006400&gt;//Initialize the final xml DOM&lt;/FONT&gt;&lt;BR&gt;var tmpDOM=new ActiveXObject("MSXML2.DomDocument.5.0");&lt;BR&gt;tmpDOM.validateOnParse=true;&lt;BR&gt;tmpDOM.async=false;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#006400&gt;//Perform the transform; strDOM gets the XML String&lt;/FONT&gt;&lt;BR&gt;var strDOM=CurrentForm.transformNode(XSLTFileDOM);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#006400&gt;//Load the XML String from above into our DOM variable&lt;/FONT&gt;&lt;BR&gt;tmpDOM.loadXML(strDOM);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#006400&gt;//Post the DOM via email. &lt;BR&gt;&lt;/FONT&gt;XDocument.DataAdapters("SubmitToMTC").SubmitData(tmpDOM);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Voila! &lt;/P&gt;
&lt;P&gt;Philo&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=411972" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Creating a Structured Product Labeling Editor</title><link>http://blogs.msdn.com/philoj/archive/2004/06/06/149441.aspx</link><pubDate>Sun, 06 Jun 2004 08:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:149441</guid><dc:creator>philoj</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/philoj/comments/149441.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=149441</wfw:commentRss><description>&lt;P&gt;The challenge: use &lt;a title="" href="http://office.microsoft.com/home/office.aspx?assetid=FX01085792" target="_blank"&gt;InfoPath&lt;/a&gt; to create an editor for the Structured Product Labeling (SPL) subset of the &lt;A href="http://www.hl7.org/"&gt;HL7&lt;/A&gt;&amp;nbsp;Clinical Document Architecture (CDA) schema. &lt;/P&gt;
&lt;P&gt;I've done quite a bit of document-centric work, and my philosophy has always been to design an XML schema first, because from an xsd, all other things can flow:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;InfoPath can generate forms from schema &lt;/LI&gt;
&lt;LI&gt;BizTalk can generate maps from schema&lt;/LI&gt;
&lt;LI&gt;There are EDI tools to generate implementation guides from schema&lt;/LI&gt;
&lt;LI&gt;XMLSpy can generate databases and code from schema&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;So when I was told there was an &lt;A href="http://www.hl7.org/Library/Committees/rcrim/SPL%20Ballot%20Package%5FDSTU%5FDec2003%5Ffinal%2Ezip"&gt;SPL schema&lt;/A&gt; to work from, I figured this was a one-day job, tops.&lt;/P&gt;
&lt;P&gt;I was wrong.&lt;/P&gt;
&lt;P&gt;Here's what a &lt;A href="http://www.radix.net/~philo/images/SPLLabel.gif" target=_blank&gt;drug label&lt;/A&gt; usually looks like in the physical form. Now, one of the great features of InfoPath is that you can just point it at an xml schema and get a form out of it. However, doing this with the &lt;A href="http://www.radix.net/~philo/PORR_MT050015.xsd" target=_blank&gt;SPL Schema&lt;/A&gt;&amp;nbsp;(this isn't complete - the included files aren't there; see the SPL schema link for the whole schema) yields a pretty &lt;A href="http://www.radix.net/~philo/images/SPLInfoPath.gif" target=_blank&gt;unsatisfying result&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;The problem is that the schema has a whole lot of metadata, and what is there for content is just markup, like HTML (imagine trying to autogenerate a form from the schema for xhtml - it doesn't reflect how people really use the schema). &lt;/P&gt;
&lt;P&gt;This is, of course, in retrospect. Going in, I couldn't get the hang of why the form wasn't getting me where I needed to go. It wasn't until I looked at the sample &lt;A href="http://www.radix.net/~philo/SampleDoc.xml"&gt;SPL XML&lt;/A&gt; - that's when the markup concept clicked and I started looking at the SPL schema as a destination instead of a source. &lt;/P&gt;
&lt;P&gt;Another consideration is that the SPL Schema serves the label, not the drug or the company. What this means is that the information in the schema is geared towards describing the medication, but there may be additional information regarding the drug, the label editing and approval process, or other considerations that the pharmaceutical company wants stored with the label. &lt;/P&gt;
&lt;P&gt;These two considerations indicate that the label is best served by using an authoring schema to store the information and generating the SPL XML from that schema. Since InfoPath natively stores its data in XML, the InfoPath schema can serve as an authoring schema nicely. (Alternatively, if the pharma already has a business system in place to store SPL-type information, InfoPath can be designed to interact with that system)&lt;/P&gt;
&lt;P&gt;So - next week we'll lay out an InfoPath form to serve the label, designed from a blank form to save directly to XML.&lt;/P&gt;
&lt;P&gt;Philo&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=149441" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Healthcare / HL7 solution</title><link>http://blogs.msdn.com/philoj/archive/2004/06/04/148474.aspx</link><pubDate>Fri, 04 Jun 2004 17:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:148474</guid><dc:creator>philoj</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/philoj/comments/148474.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=148474</wfw:commentRss><description>&lt;P&gt;Over the next few days I'll be posting a series of articles covering my trials and tribulations in creating an &amp;#8220;HL7 Generator&amp;#8221; - specifically using &lt;A title="" href="http://office.microsoft.com/home/office.aspx?assetid=FX01085792" target=_blank&gt;InfoPath&lt;/A&gt; to generate XML in the Structured Product Label format, which is a subset of the Clinical Document Architecture. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.radix.net/~philo/images/SPLFinishedForm.gif"&gt;Here&lt;/A&gt;&amp;nbsp;is an image of the (nearly) completed form.&lt;/P&gt;
&lt;P&gt;As usual, it turns out the best approach was to look at it sideways...&lt;/P&gt;
&lt;P&gt;Here's an (updated) approximate schedule of the articles:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT color=#000080&gt;6/7/2004&lt;/FONT&gt;: &lt;A href="http://blogs.msdn.com/philoj/archive/2004/06/06.aspx"&gt;Analysis and SPL overview &lt;/A&gt;
&lt;LI&gt;&lt;FONT color=#000080&gt;7/12/2004&lt;/FONT&gt;: Form Design 
&lt;LI&gt;&lt;FONT color=#000080&gt;7/19/2004&lt;/FONT&gt;: Code 
&lt;LI&gt;&lt;FONT color=#000080&gt;7/26/2004&lt;/FONT&gt;: XSLT and views 
&lt;LI&gt;&lt;FONT color=#000080&gt;8/2/2004&lt;/FONT&gt;: Task pane&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Of course, this is subject to change as I write...&lt;/P&gt;
&lt;P&gt;Philo&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=148474" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>InfoPath Context Sensitive Help</title><link>http://blogs.msdn.com/philoj/archive/2004/04/25/119926.aspx</link><pubDate>Sun, 25 Apr 2004 23:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:119926</guid><dc:creator>philoj</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/philoj/comments/119926.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=119926</wfw:commentRss><description>&lt;P&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=D5ADC839-73F4-4299-ABA0-E88C90B25144&amp;amp;displaylang=en"&gt;&lt;A title="" href="http://office.microsoft.com/home/office.aspx?assetid=FX01085792"&gt;InfoPath&lt;/A&gt; SP1&lt;/A&gt;&amp;nbsp;(&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=D5ADC839-73F4-4299-ABA0-E88C90B25144&amp;amp;displaylang=en"&gt;public beta &lt;/A&gt;at the link; final due out this summer) includes a lot of cool changes, both in the UI and behind the scenes (most notably the ability to stuff managed code behind the form). First I'm going to cover the OnContextChange event and using it to create context-sensitive help.&lt;/P&gt;
&lt;P&gt;To create a managed code InfoPath form, you need to download the &lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=7E9EBC57-E115-4CAC-9986-A712E22879BB&amp;amp;displaylang=en"&gt;InfoPath Toolkit for Visual Studio .Net&lt;/A&gt;&amp;nbsp;&lt;/A&gt;- this provides the templates for InfoPath in VS. Once installed, open Visual Studio, create a new project, select Microsoft Office InfoPath Projects, then either &amp;#8220;Visual Basic Projects&amp;#8221; or &amp;#8220;Visual C# Projects&amp;#8221; (I'll be using C#), and &amp;#8220;InfoPath Form Template&amp;#8221; from the &amp;#8220;Templates&amp;#8221; pane. &lt;/P&gt;
&lt;P&gt;Name your project, click &amp;#8220;OK&amp;#8221; and you've got an InfoPath project and form. (Also notice that under the &amp;#8220;Project&amp;#8221; menu in Visual Studio you've got some new InfoPath commands, most notably &amp;#8220;Open InfoPath&amp;#8221; for those times you close the form designer)&lt;/P&gt;
&lt;P&gt;So, for our context-sensitive help we're going to need an HTML file containing the help. Create your file - all you really need to do is append all the help paragraphs/articles into a single file. The way I handled context sensitivity is to wrap each help segment into a DIV, then hide all the DIVs and show the appropriate DIV based on the control selected. Other possibilities include using HTML anchors and scrolling to the anchor for the article, or even creating a document with an empty DIV, then pulling the text from another location and dynamically inserting it into the document. &lt;/P&gt;
&lt;P&gt;So, I have an HTML document with a series of DIVs. I used FrontPage 2003 because I found the layer handling helped out a lot. (View | Task Pane, then in the Task Pane menu at the top select &amp;#8220;Layers&amp;#8221;) You'll want each layer/DIV to use the following tag:&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#808080 size=2&gt;&amp;lt;div style="position: absolute; visibility: hidden; left: 0px; top: 0px" id="[Name]"&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;For [Name] use the control name for the control you want the DIV associated with. &lt;/P&gt;
&lt;P&gt;[Thanks to Josh Bertsch for help with the following code, C# and jscript]&lt;/P&gt;
&lt;P&gt;Now add the following jscript to the &amp;lt;HEAD&amp;gt; of the file:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#808080 size=2&gt;&amp;lt;script&amp;gt;&lt;BR&gt;&amp;nbsp;var g_anchor="";&lt;BR&gt;&amp;nbsp;function waitForContext(anchor)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;g_anchor=anchor;&lt;BR&gt;&amp;nbsp;&amp;nbsp;window.setTimeout("setTaskPaneLoc();", 1000);&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;function setTaskPaneLoc(aLoc)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;var aLoc=g_anchor;&lt;BR&gt;&amp;nbsp;&amp;nbsp;var aCol=document.all.tags("DIV");&lt;BR&gt;&amp;nbsp;&amp;nbsp;var aColLen=aCol.length;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;var anchorNames="";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;for(var i=0; i&amp;lt;aColLen; i++)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;anchorNames+=aCol[i].id + "; ";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(aCol[i].id==aLoc)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aCol[i].style.visibility="visible";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aCol[i].style.visibility="hidden";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;lt;/script&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This will, after a 1-second pause, zip through the DIV tags in the file, showing the one whose ID is the same as the control name, and hiding the rest. &lt;/P&gt;
&lt;P&gt;Once you're happy with the file, in InfoPath go to Tools | Form Options, then the Advanced tab. In the &amp;#8220;Custom Task Pane&amp;#8220; section check &amp;#8220;Enable custom task pane&amp;#8221;, then click the &amp;#8220;Resource Files&amp;#8220; button and add your file. (NOTE: if you change your help file later, you'll have to go to this option, remove the file and add it again, otherwise you won't see your changes). Once you've added the file, then it should be available in the drop-down for &amp;#8220;Task pane location&amp;#8220; - select it. &lt;/P&gt;
&lt;P&gt;Now, in InfoPath go to the Tools Menu, Programming, and click &amp;#8220;On Context Change Event&amp;#8220; - this will create and take you to the OnContextChange event handler in the VS.Net IDE. &lt;/P&gt;
&lt;P&gt;Add a reference in the project to Microsoft.mshtml.&lt;/P&gt;
&lt;P&gt;Use this code in your OnContextChange handler:&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#808080&gt;&lt;FONT face="Courier New"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; (e.Type == "ContextNode")&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#808080 size=2&gt;{&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#808080&gt;&lt;FONT face="Courier New"&gt;string&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; aLoc=e.Context.nodeName;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#808080 size=2&gt;aLoc=aLoc.Replace("my:", "");&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#808080 size=2&gt;HTMLTaskPaneObject taskPane=(HTMLTaskPaneObject)thisXDocument.View.Window.TaskPanes[0];&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#808080 size=2&gt;mshtml.HTMLWindow2Class window=(mshtml.HTMLWindow2Class)taskPane.HTMLDocument.Script;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#808080 size=2&gt;window.execScript("waitForContext('" + aLoc + "')", "JScript");&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#808080 size=2&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;That should do it - now just remember that the DIV id has to be the same as the name of the control. Also watch out for width/height definitions on the DIVs - best to just let the task pane do the formatting. &lt;/P&gt;
&lt;P&gt;Philo&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=119926" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Book Review: SharePoint, Building Office 2003 Solutions</title><link>http://blogs.msdn.com/philoj/archive/2004/04/17/115266.aspx</link><pubDate>Sat, 17 Apr 2004 22:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:115266</guid><dc:creator>philoj</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/philoj/comments/115266.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=115266</wfw:commentRss><description>&lt;TABLE border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top&gt;&lt;IFRAME marginWidth=0 marginHeight=0 src="http://rcm.amazon.com/e/cm?o=1&amp;amp;l=as1&amp;amp;f=ifr&amp;amp;t=philosvbaccesspr&amp;amp;dev-t=D68HUNXKLHS4J&amp;amp;p=8&amp;amp;asins=1590593383&amp;amp;IS2=1&amp;amp;lt1=_blank" frameBorder=0 width=120 scrolling=no height=240&gt;&lt;MAP NAME="boxmap-p8"&gt;&lt;AREA SHAPE="RECT" COORDS="14, 200, 103, 207" HREF="http://rcm.amazon.com/e/cm/privacy-policy.html?o=1" &gt;&lt;AREA COORDS="0,0,10000,10000" HREF="http://www.amazon.com/exec/obidos/redirect-home/philosvbaccesspr" &gt;&lt;/MAP&gt;&lt;img src="http://rcm-images.amazon.com/images/G/01/rcm/120x240.gif" width="120" height="240" border="0" usemap="#boxmap-p8" alt="Shop at Amazon.com"&gt;&lt;/IFRAME&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;I bought Scot's book hot off the presses, since it's the first major SharePoint 2003 book. When I got it, I breezed through it, and I'll be honest - I was unimpressed. &lt;/P&gt;
&lt;P&gt;Well, I had reason to browse through it again, and this time I just sat down and started reading it. That's when I realized - certain book publishers that use multiple authors&amp;nbsp;had taught me not to bother reading computer books through, as they were so disjointed they worked better as technical manuals. So that's what I'm used to - being able to flip a few pages and find the thing I'm looking for. &lt;/P&gt;
&lt;P&gt;Scot's book is different. It harkens back to a day where you could actually read through a book and learn a new technology in a structured manner.&amp;nbsp;If you take the time to read the book from start to finish&amp;nbsp;(it&amp;nbsp;doesn't take long - if you skim the tutorials you can probably get through most&amp;nbsp;of it in a single evening) it's&amp;nbsp;a good thorough introduction to SharePoint.&amp;nbsp;And I &lt;EM&gt;mean&amp;nbsp;&lt;/EM&gt;thorough - there are tutorials on building web parts, working with page templates, creating data views in FrontPage, integrating Windows Single Signon... &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;(Incidentally, I'm not trying to cast aspersion on one method of publishing over another - I'm simply trying to indicate the different &amp;#8220;reading philosophies&amp;#8220; each may require)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;He also has a nice walkthrough for creating a new portal from the ground up - laying out areas, sites,&amp;nbsp; as well as explaining users and groups.&lt;/P&gt;
&lt;P&gt;All in all, I give this book a healthy thumb's up for anyone who wants to learn SharePoint admin and development - for the first book out of the gate, it's an excellent reference to have. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Philo&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=115266" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/Book+Review/default.aspx">Book Review</category><category domain="http://blogs.msdn.com/philoj/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/philoj/archive/tags/SharePoint/default.aspx">SharePoint</category></item></channel></rss>