/[LeafOK_CVS]/fenglin/bbs/display_doc.php
ViewVC logotype

Annotation of /fenglin/bbs/display_doc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Sat Aug 12 13:26:29 2023 UTC (2 years, 7 months ago) by sysadm
Branch: MAIN
XML2HTML conversion

1 sysadm 1.1 <?
2     $xmlfiles = array(
3     "./doc/management.xml",
4     "./doc/bbs_auth_user.xml",
5     "./doc/bbs_master.xml",
6     "./doc/board_manage.xml"
7     );
8    
9     $xslfile = "./doc/bbs_xml_doc.xsl";
10    
11     $xsl = new DOMDocument;
12     $xsl->load($xslfile);
13    
14     // Configure the transformer
15     $proc = new XSLTProcessor;
16     $proc->importStyleSheet($xsl); // attach the xsl rules
17    
18     foreach ($xmlfiles as $xmlfile)
19     {
20     $htmlfile = str_replace(".xml", ".html", $xmlfile);
21    
22     // Load the XML source
23     $xml = new DOMDocument;
24     $xml->load($xmlfile);
25    
26     $domdoc = $proc->transformToDoc($xml);
27     $domdoc->saveHTMLFile($htmlfile);
28     }
29     ?>

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1