Hi All,
I am generating a (X)HTML page in an IE webbrowser control (housed by a .Net
WinForm application) from a XML file using XSLT (using
Msxml2.DOMDocument.4.0). When the user clicks a button, control is returned
back to the WinForm application where I use mshtml to get a portion of the
web page (a table to be exact). Within the table cells, there are
checkboxes and textboxes that are being defined as INPUT elements (so the
user can change the values). The problem is that the INPUT elements are not
being returned as valid XML (see below). Specifically, the attribute values
do not have quote marks around them and there is no closing element for the
INPUT element node (i.e. </INPUT>). Although I can clean this up in the C#
code, I am curious to hear if this can somehow be resolved by applying a
property to mshtml or something. Thank you in advance.
This is what mshtml returns to me:
<INPUT type=checkbox name=SelectCheckBox2>
<INPUT size=25 value=BranchOffice1 name=value3>
This is the XSLT that generates the HTML
<!--
================================================== ==========================
========= -->
<xsl:template name="CheckBox">
<xsl:param name="XMLname" />
<xsl:param name="State" />
<xsl:element name="input">
<xsl:attribute name="XMLname"><xsl:value-of
select="$XMLname"/></xsl:attribute>
<xsl:attribute name="type">checkbox</xsl:attribute>
<xsl:if test="$State = 'true'">
<xsl:attribute name="checked">true</xsl:attribute>
</xsl:if>
</xsl:element>
</xsl:template>
<!--
================================================== ==========================
========= -->
<xsl:template name="TextBox">
<xsl:param name="XMLname"/>
<xsl:param name="Size"/>
<xsl:param name="Value"/>
<xsl:element name="input">
<xsl:attribute name="XMLname"><xsl:value-of
select="$XMLname"/></xsl:attribute>
<xsl:attribute name="type">text</xsl:attribute>
<xsl:attribute name="size"><xsl:value-of select="$Size"
/></xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="$Value"
/></xsl:attribute>
</xsl:element>
</xsl:template>