Re: [PHP-XML-DEV] !DOCTYPE creation viadom implementation

[email protected] (Kevin Waterson)
Newsgroups php.xml.dev
Organization Oceania
Message-ID <[email protected]>
This one time, at band camp, "Rob Richards" <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.