1. Microsoft claims Office OpenXML standard Czechmate

    Date: 03/26/08 (Open Source)    Keywords: xml, microsoft

    Microsoft thinks it has the votes to get Office OpenXML (OOXML), the format of Microsoft Office, approved as an ISO standard. The key, it says, was a decision by the Czech Standards Institute to approve the format.

    Source: http://feeds.feedburner.com/~r/zdnet/open-source/~3/258307284/

  2. loading a script

    Date: 11/28/08 (Javascript Community)    Keywords: xml

    I got a feeling that there is no compatible way to a) check that when you dynamically load a script, it is loaded, and b) to know that it was not loaded (say, 404); so I feel like it might make sense to use XmlHttpRequest to load scripts actually.

    What do you think? (Mil pardons, je ne sais que langue on parle ici...)

    Source: http://community.livejournal.com/javascript/161677.html

  3. Client-side validation

    Date: 02/27/09 (C Sharp)    Keywords: html, xml, java, web

    I’m having some “fun” with client-side validation on a roll-my-own BaseValidator subclass.

    My validator is to validate email format and includes the following code (with XMLdoc removed for brevity):

    using System;
    using System.Text.RegularExpressions;
    
    namespace IrisDigital.WebControls.Validation
    {
       [System.Web.UI.ToolboxData("<{0}:EmailValidator runat='server'/>")]
       public class EmailValidator : BaseValidator
       {
          protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer)
          {
             base.AddAttributesToRender(writer);
    
             if (base.RenderUplevel)
             {
                writer.AddAttribute("evaluationfunction", "CheckEmailFormat");
                writer.AddAttribute("controltovalidate", this.GetControlRenderID(this.ControlToValidate));
             }
          }
    
          protected override bool EvaluateIsValid()
          {
             // ...
          }
    
          protected override void OnPreRender(EventArgs e)
          {
             base.OnPreRender(e);
    
             if (base.RenderUplevel)
             {
                if (!Page.ClientScript.IsClientScriptBlockRegistered("IrisDigital.WebControls.Validation.EmailValidator"))
                {
                   Page.ClientScript.RegisterClientScriptInclude("IrisDigital.WebControls.Validation.EmailValidator",
                      Page.ClientScript.GetWebResourceUrl(this.GetType(), "IrisDigital.WebControls.Validation.EmailValidator.js"));
                }
                this.ClientValidationFunction = "CheckEmailFormat";
             }
          }
    

    Most of the rationale for doing things this way is from an article on CodeProject: RequiredIfValidator — Extending from the BaseValidator class, which does it precisely this way.

    The validator works wonderfully. But the client-side validation never fires.

    The WebResource correctly gets added to the page as a script include (for which I need to have the following line in my AssemblyInfo.cs, in case you were wondering):

    [assembly: System.Web.UI.WebResource("IrisDigital.WebControls.Validation.EmailValidator.js", "text/javascript")]

    , but it just never gets called.

    Anyone got any ideas why?

    Cross-posted to '[info]'ms_dot_net and '[info]'owenblacker.

    Source: http://community.livejournal.com/csharp/102003.html

  4. Writing namespace to an XML stream

    Date: 02/11/09 (C Sharp)    Keywords: html, xml

    I'm trying to write XHTML to an XmlWriter. I'm having trouble generating the standard line:
    http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

    With "writer" as my XmlWriter I have
    writer.WriteStartElement("html");
    writer.WriteAttributeString("xmlns", "http://www.w3.org/1999/xhtml");
    writer.WriteAttributeString("lang", "en");
    writer.WriteAttributeString("xml:lang", "en");

    but writer.WriteAttributeString("xmlns", "http://www.w3.org/1999/xhtml") generates an XmlException: "The prefix '' cannot be redefined from '' to 'http://www.w3.org/1999/xhtml' within the same start element tag."

    What am I missing? How do I get that namespace defined?

    TIA.

    Source: http://community.livejournal.com/csharp/101629.html

  5. Accessing an XML-RPC service

    Date: 08/11/08 (C Sharp)    Keywords: xml, yahoo

    I'm trying to access an XML-RPC service from C# that I'm building. I've had absolutely no response from my message on the XML-RPC.net YahooGroup, so I started looking at the only other .Net XML-RPC class library out there: XmlRpcCS, which is only confusing me further.

    The cause of my problems appears to be that XML-RPC.Net seems to require all its proxy objects to be structs. I, however, would like to use class objects, so I can add other functionality into the classes (constructors, the ability to have properties that are masked from the XML-RPC output and so on).

    Now if this were XML serialisation, I would use the attributes that control XML serialisation, such as [XmlIgnore]. Without rewriting half of the class library, though (which would seem to defeat the purpose of using it!), I can't do something like that.

    Does anyone here have any experience of using an XML-RPC library for .Net?

    (Cross-posted to '[info]'ms_dot_net.)

    Source: http://community.livejournal.com/csharp/97906.html

  6. Firefox / CSS / JavaScript / Printing

    Date: 03/09/09 (Web Development)    Keywords: css, html, xml, java

    I have an XSL transform that turns an XML document into HTML. There is a div that contains data and scrolls by using CSS: overflow: auto;. When printing or when JavaScript is disabled, I would like to simply display the contents: overflow: visible;. However,

    This works for printing, but not when JavaScript is disabled.

    My next thought was to use JavaScript, something along these lines: