RE: XmlWriter::writeDTD bug...
| From: | Jared Williams | Date: | Wed, 07 Dec 2005 12:16:55 +0000 |
| Subject: | RE: XmlWriter::writeDTD bug... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-227039@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Rob Richards [mailto:rrichards@ctindustries.net]
> Sent: 07 December 2005 04:21
> To: Jared.Williams@ntlworld.com
> Cc: php-general@lists.php.net
> Subject: Re: XmlWriter::writeDTD bug...
>
> Jared Williams wrote:
> > Hi,
> >
> > $writer = new XmlWriter();
> > ...
> >
> > $writer->writeDtd('html', '-//W3C//DTD XHTML 1.0 Strict//EN',
> >
> > 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
> >
> > produces no whitespace between the public & system ids like...
> >
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
> >
> > Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> >
> > Has anyone got a workaround for this problem?
>
> libxml bug. Add $writer->setIndent(TRUE); before the writeDTD
> call (can revert it back right after if you dont want
> indenting). This will force whitespace insertion between the
> two - not pretty but its a workaround.
>
> Rob
Ahh excellent. Cheers
Jared