Sign in
in
   
"It is the mark of an educated mind to be able to entertain a thought without accepting it."  -Aristotle

About Me

I am a co-founder of Notches, an early stage startup currently based in NYC. We are building a free, open reviews network that anyone can participate in and anyone can build on top of. You can find out more on our official blog.

Read more about my background.

Connect with me on...

Recent Readers

Flickr Photos

 

Warning:

This article is more than 45 days old. Given the speed at which the technology world moves, this post is probably somewhat out of date. Please keep this in mind when reading the post. If this is a tutorial, please check whether you are using the same versions mentioned in the article.

More about InfoPath

The other day I posted about my initial experiences with InfoPath. As I mentioned, one of the frustrating things I found was that for the body text, whose type was string, I couldn't use the RichTextBox.

Don shared some insight as to why this is the case.

The rich text control can only be bound to an element whose type looks like this:

<complexType mixed="true">
<sequence minOccurs="0" maxOccurs="unbounded" >
<any namespace="http://www.w3.org/1999/xhtml"
processContents="lax" />
</sequence>
</complexType>

As it turns out, the problem is that this particular service uses a string for that field. At first I accepted that answer, but the more I think about it, the more it bothers me. I'm assuming the RichTextBox produces an XHTML. An HTML string, whether well-formed or not, is still just a string at the end of the day. If the underlying data type is perfectly valid, why shouldn't I be able to use RichTextBox?

At the very least, I'm hoping I can do some sort of mapping. If I can create a new "virtual" data field on my end, bind the RichTextBox to it, and then provide some mapping logic to the underlying object (ie escaping XML characters or wrapping it in CDATA), that would be neat. I'm going to keep my fingers crossed and play with it a little this weekend.

The thing is, I really do think it's important for a tool such as InfoPath to be flexible. I realize this may be a contrived example to some extent... but when I design a form, I should be able to choose how to build the string. I shouldn't be limited to a simple textbox. More importantly, we shouldn't have to design services based on their potential consumers.

Can anyone (Don especially) add more insight into this problem? Am I missing something here? Are there valid technical reasons why this shouldn't be the case?

Only published comments... Apr 04 2003, 10:51 AM by Tim

View related posts

 

Omar Shahine said:

Did you ever find a solution for this? I am having this exact problem trying to get infopath to work with dasBlog and it's Description field is just a string.
June 13, 2004 12:12 PM