L
Leila
Hi,
I have an infoPath form which allows users to insert news articles.
My main body field is a richtext field. I assumed that by using this
type of field, the user could then use the fomatting buttons at the
top of the form to make text bold, italic, etc. This all looks great
on the infopath form, but when I try to display the body field on my
HTML page (using XSLT), all the formatting is lost.
I am assuming that the html tags in the body field (<b>...</b>,
<i>...</i> and so on) are being interpretted as XML so they are not
getting sent to the browser.
After some reading, I see that one solution would be to insert a CDATA
tag into the xml file, as in:
<news>
<article>
<title>TITLE OF STORY</title>
<date>16/08/2004</date>
<body><![CDATA[ I assume I should insert the <b>cdata tags</b> in my
XML doc like this in order to have my <i>HTML</i> tags preserved so
that the broswer can interpret them as <b>HTML</b>, not <i>XML</i>!
]]</body>
..
..
..
</article>
</news>
Then in my XSLT, I should do something like this:
<xsl:value-of select="news/article/body" disable-output-escaping="yes"
/>
However, how can I alter my infoPath form so that it puts the CDATA
tag around the body field??? Is this possible?
Obviously I am not working with the XML documents directly; I am
creating them through Infopath!
Any suggestions would be most welcome!
Leila
I have an infoPath form which allows users to insert news articles.
My main body field is a richtext field. I assumed that by using this
type of field, the user could then use the fomatting buttons at the
top of the form to make text bold, italic, etc. This all looks great
on the infopath form, but when I try to display the body field on my
HTML page (using XSLT), all the formatting is lost.
I am assuming that the html tags in the body field (<b>...</b>,
<i>...</i> and so on) are being interpretted as XML so they are not
getting sent to the browser.
After some reading, I see that one solution would be to insert a CDATA
tag into the xml file, as in:
<news>
<article>
<title>TITLE OF STORY</title>
<date>16/08/2004</date>
<body><![CDATA[ I assume I should insert the <b>cdata tags</b> in my
XML doc like this in order to have my <i>HTML</i> tags preserved so
that the broswer can interpret them as <b>HTML</b>, not <i>XML</i>!
]]</body>
..
..
..
</article>
</news>
Then in my XSLT, I should do something like this:
<xsl:value-of select="news/article/body" disable-output-escaping="yes"
/>
However, how can I alter my infoPath form so that it puts the CDATA
tag around the body field??? Is this possible?
Obviously I am not working with the XML documents directly; I am
creating them through Infopath!
Any suggestions would be most welcome!
Leila