Re: !DOCTYPE creation viadom implementation
| From: | Kevin Waterson | Date: | Wed, 06 Aug 2003 05:11:25 +0000 |
| Subject: | Re: !DOCTYPE creation viadom implementation | ||
| References: | 1 2 | Groups: | php.xml.dev |
| Request: | Send a blank email to php-xml-dev+get-180@lists.php.net to get a copy of this message | ||
This one time, at band camp, "Rob Richards" <rrichards@ctindustries.net> wrote:
> From: Jaanus Heeringson
>
> > I'm having a hard time creating the !DOCTYPE instruction. As far as i
> > know i need to use the domimplementation approach, but if there is some
> > other way I'd like to hear it. Here is my code:
I too am curious about DOCTYPE.
I used this approach but no doctype is in evidence. How do I put one in?
$proc = new xsltprocessor();
$dom = new domDocument;
$dom2 = new domDocument;
$dom2->loadxml($xmlstring);
$dom->load('./themes/'.$page->theme.'/phpro.xsl');
//
$dom->load('./ext/'.$_GET['ext'].'/'.$_GET['ext'].'.xsl');
$proc->importStylesheet($dom);
$result = $proc->transformToDoc($dom2);
$result->encoding = "HTML";
print $result->savexml();
Kind regards
Kevin
--
______
(_____ \
_____) ) ____ ____ ____ ____
| ____/ / _ ) / _ | / ___) / _ )
| | ( (/ / ( ( | |( (___ ( (/ /
|_| \____) \_||_| \____) \____)
Kevin Waterson
Port Macquarie, Australia