Closed Bug 34424 Opened 25 years ago Closed 25 years ago

Need an interface to obtain current document DTD

Categories

(Core :: Layout, defect, P3)

All
Windows NT
defect

Tracking

()

VERIFIED DUPLICATE of bug 34458

People

(Reporter: cmanske, Assigned: harishd)

References

Details

Attachments

(1 file)

In order to have different rules for creating HTML in Composer, we need to know when the document being edited is HTML 3.2, or 4.0 strict, etc. Specific issue at hand (bug 7648) is the insertion of TBODY in HTML 3.2 docs.
Blocks: 7648
Charlie -- I've sent you voice mail about this, but perhaps we can do this via this bug. The parser already calls the document when it encounters a doctype, and you can access it through the normal dom mechanism. The only remaining issue is what to do in the absence of a doctype in the incoming stream. I propose that we add a new call to the sink/document called SetDefaultDocType() which you can query if the document itself doens't have a doctype. Does that sound reasonable?
Sounds good to me. So I'll look for an existing DOCTYPE element first, then if missing, call SetDefaultDocType(). Will that then insert a DOCTYPE element which I then get from the DOM?
No -- prolonged exposure to akkana has convinced me that putting non-original data in the content model should be avoided where possible. : ) The reason for the 2nd call is so that we can have a way for the parser to notify the sink/document without affecting the document state. Harish: this is a dup of the bug I opened for you this morning.
Assignee: rickg → harishd
*** This bug has been marked as a duplicate of 34458 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Marking verified dup of 34458.
Status: RESOLVED → VERIFIED
All the documents will now have a DOCTYPE associated with it. That is, for documents without DOCTYPE parser would create one ( the default is set to <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> ). Also have added a static API ( CreateCompatibleDTD()) which could be used to retrieve the appropriate DTD for a give DOCTYPE, or MimeType.
All the documents will now have a DOCTYPE associated with it. That is, for documents without DOCTYPE parser would create one ( the default is set to <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> ). Also have added a static API ( CreateCompatibleDTD()), on the parser, which could be used to retrieve the appropriate DTD for a give DOCTYPE, or MimeType.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: