"Lasse Laursen" <[EMAIL PROTECTED]> wrote in message 02c301c1a4c4$42e03620$[EMAIL PROTECTED]">news:02c301c1a4c4$42e03620$[EMAIL PROTECTED]... > Hi, > > We are about to develop a CMS that uses XML and XSLT. > > The XML files contains some static information (header, footers and common > non-dynamic information). We would like to have a XML file that would > contain a field like: > > <MENU> > <...> > <...> > <...> > <MENU/> > > Before the XML file is loaded into the PHP script that uses the xslt_process > routine to convert the XML/XSLT files into plain HTML we would like to > replace the <MENU> field with come dynamic content (eg. some other > variables, etc.) > > What's the easiest way to do that? SAX or? >
Load the XML into a variable, do whatever changes to it, then process the variable with xslt_process. > Furthermore the 'xslt_process' function requires the following parameters: > > xslt_process (resource xh, string xml, string xsl [, string result [, array > arguments [, array parameters]]]) > > where the XML and XSLT variables are references to files. - The XML file is > in our example a variable (eg. $current_xml_file = "xxxxx";) and therefor we > cannot use the xslt_process function? Of cause we can store the XML var. in > a temporary location and then read the file, but that's an extreamly ugly > approach! :) Any ideas? > Have a look at: http://www.php.net/manual/en/function.xslt-process.php Example 3 Using the xslt_process() to transform a variable containing XML data and a variable containing XSL data into a variable containing the resulting XML data > I'm looking forward to your replies :) > > > Yours > -- > Lasse Laursen <[EMAIL PROTECTED]> - Systems Developer > NetGroup A/S, St. Kongensgade 40H, DK-1264 København K, Denmark > Phone: +45 3370 1526 - Fax: +45 3313 0066 - Web: www.netgroup.dk Peter Clarke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]