Re: [Hampshire] Doctype Declarations in PHP DOM

Top Page

Reply to this message
Author: Mark Johnson
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Doctype Declarations in PHP DOM
> Mark Johnson wrote:
>>>> Does anyone know if it's possible to define which DTD the DOM should
>>>> use,
>>>> so that it's output with the saveHTML() or saveXML() methods?
>>> I don't know for certain, but I'd guess... yes? You know, it occurs to
>>> me
>>> that maybe someone should write, like, documentation for this API
>>> stuff.
>>
>> Perhaps a more useful response would have assumed that I've already
>> found
>> that page, and pointed me to the section of it that I've clearly been
>> overlooking until now, otherwise I wouldn't be posting to the list in
>> the
>> first place.
>
> So, knowing about that page, and finding it to have no reference to an API
> for
> specifying DTD (though I don't know how, a search for "dtd", "doctype",
> "documenttype" or "document type" all refer to this class), you thought it
> worthwhile to write to this mailing list just in case there was some
> undocumented API that a HantsLUG list member happened to know about?
>


Yes.
At the very least I was hoping for a sensible answer, e.g. "You're looking
at the wrong page, here's how to do it" or, "No you can't do that, but
here's a workaround." My previous experience of the list is that even the
most obvious questions are usually met with a friendly response, but I
apologise if my lack of initiative offends you.

> More worthwhile than, for example, working around this imagined deficiency
> by
> inserting a <!DOCTYPE> string into the output of ::saveXML()?
>


That's more what I was after. Thank you :-)

Cheers,
Mark