For what it's worth, I also encountered the same problem with other elements that HTML5 doesn't require to close, such as <img> or <br> (TemplateProvider demands them both to be closed). More importantly, I discovered that if you delete the <!DOCTYPE> line from the beginning of the HTML file, the "Unexpected DTD declaration" error message will be replaced by useful ones pointing out which tags aren't closed and where. EDIT: How do I newline on FPish? From quoting the parent it seems that two newlines should suffice.

By on 8/24/2015 12:51 AM ()

That's a good discovery! This works for me too. Thanks.

By on 8/24/2015 11:49 AM ()

Will check into this, should be fairly quick to adjust the parser.

By on 8/21/2015 4:48 PM ()

Also, if you have a <script> element containing some JavaScript code, and that code contains a comparison using >, this produces an error too. The type provider parser should ignore anything inside a <script> element.

By on 8/27/2015 10:57 AM ()

I believe you can write the <script> blocks in your UI.Next template as follows to get rid of the validation error (and this should still work when we relax the parser as I indicated above):

1
2
3
4
5
<script>
//<![CDATA[
    ...code...
//]]>
</script>
By on 8/27/2015 11:06 AM ()

Actually, I'm not sure it did work. The type provider no longer complained, but the JavaScript seemed to be ignored completely, as if I'd commented it out. Anyway, I placed it in a js file instead, which works.

By on 8/28/2015 1:56 AM ()

Yes that works, thanks.

By on 8/27/2015 11:18 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper