Uniface on GitHub
Fixes and Updates
is an HTML5 schema (html5.xsd) available somewhere?
I would like to load an html5 page into a struct.
Any other hint, tip ... suggestion?
Unfortunately HTML 5 is not strictly XML compliant. Some people are promoting XHTML as a standard but it doesn't seem to be popular and not supported by all browsers.
I found this page (https://wiki.whatwg.org/wiki/HTML_vs._XHTML) which gives a little more information.
A) in the past you could find a DTD and not an XML-schema for HTML. B) HTML5 does not care of you create a well formed (X)HTML5 document or not. Both are valid in your browser. I prefer well formed HTML5 it saves a lot of work figuring out why the generated DOM does not fit your picture of the DOM. While generating don't forget that <script/> and <script></script> is not the same in HTML5. some element needs a closing element. for example script, textarea, div. XMLtoStruct does not need a XML-Schema. an XML-Schema is only for validation purpose. incase your document is wel formed, you can also use XSLT (Saxon or the in UF internally build in XALAN processor). Saxon3.0 supports Json. Success Dino.
Thanks for those informations defined in your posts!
what's in your opinion the best way to go from HTML to XHTML?
After some search I am currently experimenting with tidy library. Is it a good pick?
Any other suggestion?
Yes, being HTML a Markup Language too, my idea was to use:
xmlToStruct/full/schema myStruct, myPage, anHTMLschema
but I was not able to find any HTML schema definition...that's why I was asking!
I do not like the idea to build an HTML parser to generate a Uniface struct...
...or it could be someone has already developed it!
I guess my 1st shot would be from HTML via XML or JSON - then xmltostruct / jsontostruct....
© 2020 Uniface Privacy & Cookies | Privacy Statement | Legal