October 2003 - Posts

MS Blogger Should Have Been Fired

I don't see what the big deal is here. The guy blatantly violated MS security policies. Yes, the picture was quite innocent, but here is the deal. You can't just go around snapping photos of stuff arriving on trucks to Microsoft. If the guy had in any way been a valuble employee, he probably would have gotten away with a slap on the wrist. However, he was just a temp anyway, which means he is disposable. My question is, when the hell did a tech get the idea that he could just go around snapping photos of stuff arriving on trucks and posting them to his weblog? What if the stuff in question had been delivered under some NDA or something?
Posted by Jesse Ezell with 13 comment(s)

Longhorn Video

Lap around Longhorn: Chris Anderson and Don Box provide a code-centric, high level walk through of the main pillars of Longhorn.” [1]

[1] Neil Cowburn http://blog.opennetcf.org/ncowburn/permalink.aspx/a2589230-00a3-47ca-bbdb-302cb0e6c141 

Posted by Jesse Ezell with no comments

SCO Doesn't Like GPL Either

"The Free Software Foundation is the only entity that can enforce the GPL so, in effect, IBM is barred from trying to enforce the GPL with SCO," wrote Blake Stowell, a SCO spokesman, in an e-mail response to questions.

SCO's filings also assert that "the GPL violates the U.S. Constitution, together with copyright, antitrust and export control laws." [1]

Is it just me, or does anyone else think the GPL's days are numbered...

[1] SCO: IBM cannot enforce GPL. Robert McMillan. http://www.infoworld.com/article/03/10/27/HNscoenforce_1.html

Posted by Jesse Ezell with 19 comment(s)

Method Based Transaction Support

Unlike EnterpriseServices, Indigo will finally support true method based transactions (yes, as you should know, EnterpriseServices doesn't really do this, even though you have those attributes which might make you think it does). So, all those people that thought I was crazy for saying the currently implementation was lame can just kiss my @#$*!. :-)
Posted by Jesse Ezell with 1 comment(s)

MS Dumps .NET Remoting

Yes, it is final, MS is dropping .NET Remoting support. Funny. COM+, DCOM, and MSMQ will be supported by Indigo, but .NET Remoting WILL NOT. More info in this video.
Posted by Jesse Ezell with 6 comment(s)

Longhorn PDC Build Preview

If your not there. Head over to Thurrott's  at: http://www.winsupersite.com/ to get plenty of screenshots and info.

Posted by Jesse Ezell with 1 comment(s)

Creating *Valid* XHTML Documents

While working on our CMS, we ran into a common problem that no one seems to have solved completely yet, creating valid XHTML documents from IE's non-validated HTML editing component. The common suggestion with .NET is to use the SgmlReader to make a pass over your doc and then just output directly to an XmlWriter using WriteNode. While it may seem like a good suggestion, you don't really gain much with this approach, because what you are generating is definately not XHTML, it is HTML with closing tags. The following block of code shows how to extend this method to create truly valid XHTML. For the sake of simplicity, there are a couple missing pieces from this code (like handling element nesting appropriately and running a validation against the schema after conversion to make sure you were able to convert the doc), but this should get you started in the right direction.

using System;
using Sgml;
using System.IO;
using System.Xml.Schema;
using System.Xml;
using System.Text;
using System.Web;
using System.Collections;
using System.Collections.Specialized;
namespace Activehead.Empower.Conversion
{
 public class HtmlConverter
 {
  public HtmlConverter()
  {
   using(Stream schemaStream = File.OpenRead("xhtml.xsd"))
   {
    schema = XmlSchema.Read(schemaStream, null );
    schemaStream.Close();
    schema.Compile(null);
   }
  }
  
  XmlSchema schema;
  string xhtmlNamespace = "http://www.w3.org/1999/xhtml";
  bool IsValidElement(XmlElement node)
  {
   string nodeName = node.LocalName.ToLower();
   if(schema.Elements[new XmlQualifiedName(nodeName, xhtmlNamespace)] != null)
   {
    return true;
   }
   return false;
  }
  
  bool IsValidAttribute(XmlElement parent, XmlAttribute attribute)
  {
   string nodeName = parent.LocalName.ToLower();   
   string attributeName = attribute.LocalName.ToLower();
   
   XmlSchemaElement e = schema.Elements[new XmlQualifiedName(nodeName, xhtmlNamespace)] as XmlSchemaElement;
   if(e != null)
   {
    XmlSchemaComplexType ct = e.SchemaType as XmlSchemaComplexType;
    if(ct != null)
    {
     foreach(XmlSchemaAttribute a in ct.AttributeUses.Values)
     {
      if(a.QualifiedName.Name == attribute.Name)
      {
       return true;
      }
     }
    }
   }
     
   return false;
  }
  string ProcessString(string strInputHtml)
  { 
   string strOutputXhtml = String.Empty;
   SgmlReader reader = new SgmlReader(); 
   reader.DocType ="HTML"; 
   StringReader sr = new System.IO.StringReader(strInputHtml); 
   reader.InputStream = sr;
   StringWriter sw = new StringWriter();
   XmlTextWriter w =new XmlTextWriter(sw);
   reader.Read();
   while(!reader.EOF)
   {
    w.WriteNode(reader,true);
   } 
   w.Flush();
   w.Close(); 

   return sw.ToString();
  } 
  void ProcessNode(XmlNode parent)
  {
   for(int i = 0; i < parent.ChildNodes.Count; i++)
   {
    XmlNode node = parent.ChildNodes[i];
    if(node is XmlElement && !IsValidElement((XmlElement)node))
    {
     XmlNodeList content = node.ChildNodes;
     parent.RemoveChild(node);
     foreach(XmlNode child in content)
     {
      parent.AppendChild(child);
     }
     i--;
    }
    else
    {
     for(int n = 0; n < parent.Attributes.Count; n++)
     {
      if(!IsValidAttribute((XmlElement)parent, parent.Attributes[n]))
      {
       parent.Attributes.Remove(parent.Attributes[n]);
       n--;
      }
     }
     ProcessNode(node);
    }
   } 
  }
  public XmlDocument ToXHtml(string html)
  {
   string xhtml = ProcessString(html);
   XmlDocument doc = new XmlDocument();
   doc.LoadXml(xhtml);
   ProcessNode(doc.DocumentElement);
   return doc;
  }
 }
}

Posted by Jesse Ezell with 6 comment(s)

Earnings Reports / Webcasts

Two approaches to solving the same webcast problem:

http://www.microsoft.com/msft/earn.mspx

http://www.macromedia.com/macromedia/ir/macr/web_pres/earnings/q204/?promoid=pu1_homepage_macr_102203

It is pretty clear that Macromedia's solution (via Breeze) provides a far superior experience to the Microsoft approach. This space is actually pretty active. If you think Breeze is cool, you should check out these guys, who just released a standalone version of their product (something Macromedia has yet to come out with).

Posted by Jesse Ezell with no comments
More Posts Next page »