first_page

Rolling My Own Small Bits of InfoPath

An earlier entry sketched out the role XSLT plays in declaring a user interface—performing data binding and “control” or “widget” creation simultaneously. Well, I forgot to add data validation to the mix. In fact, it is only now that I consciously recognize that InfoPath validates data with schema. This means that an XML-based user interface uses XSL for data binding and “control creation”—and it uses XSD for data validation.

So I can new up an XmlValidatingReader. Great. Now how do I declare “user friendly” error messages to send back to the client? How do I open this information path? The doodle here is a set of XML that declares a relationship between XSD nodes and user interface elements. The assumption here is that all node-level XML validation errors return the name of the exceptional node. When this is true we can rest assured that some very generic JavaScript can be directed by “smart client” (or server-side) code to highlight the widget containing the invalid data. I think I just described 60% or more of what Microsoft InfoPath does.

rasx()