ie7 xsl input tag

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jckdnk111
    New Member
    • Apr 2008
    • 2

    ie7 xsl input tag

    Hi,

    I've got some javascript that attempts to set the innerHTML of a div with the result of an xslt. It works great if the output is something like:

    Code:
    <p>hello world</p>
    However, if the output is an input field it fails:

    Code:
    <input type="text" name"test" value="please work" />
    This xsl works in both firefox 2 and opera 9, just not ie7?
    ie throws "XML Parsing Error: The following tags were not closed: input"
    Any ideas as to why?

    Thanks for the help!
  • jckdnk111
    New Member
    • Apr 2008
    • 2

    #2
    ah ha!

    I was playing around with xmlstarlet on my local box and found that my xsl was, in fact, creating malformed XHTML because I had specified "html" as my output method:

    Code:
    <xsl:output method="html"/>
    Because the original page that loaded the html had a DTD declaring "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d" ie7 rightly complained about the HTML being generated.

    wow, check out ie7 actually correcting my code :-)

    Comment

    • drhowarddrfine
      Recognized Expert Expert
      • Sep 2006
      • 7434

      #3
      XHTML does not work in any version of IE and Microsoft has no plans to make it work, except if you serve it as application/xml.

      Comment

      Working...