How can I make my existing HTML files work in XML?
Answer:
Either convert them to conform to some new document type (with or without a DTD or
Schema) and write a style sheet to go with them; or edit them to conform to XHTML.
It is necessary to convert existing HTML files because XML does not permit end-tag
minimization (missing , etc), unquoted attribute values, and a number of other SGML shortcuts which have been normal in most HTML DTDs. However, many HTML authoring tools already producenalmost (but not quite) well-formed XML.
You may be able to convert HTML to XHTML using the Dave Raggett's HTML Tidy
program, which can clean up some of the formatting mess left behind by inadequate
HTML editors, and even separate out some of the formatting to a stylesheet, but there is
usually still some hand-editing to do.
Schema) and write a style sheet to go with them; or edit them to conform to XHTML.
It is necessary to convert existing HTML files because XML does not permit end-tag
minimization (missing , etc), unquoted attribute values, and a number of other SGML shortcuts which have been normal in most HTML DTDs. However, many HTML authoring tools already producenalmost (but not quite) well-formed XML.
You may be able to convert HTML to XHTML using the Dave Raggett's HTML Tidy
program, which can clean up some of the formatting mess left behind by inadequate
HTML editors, and even separate out some of the formatting to a stylesheet, but there is
usually still some hand-editing to do.
No comments:
Post a Comment