Connecting Tech Pros Worldwide Help | Site Map

Generate xsl file with php

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 5th, 2008, 01:25 PM
Lorenzo De Tomasi
Guest
 
Posts: n/a
Default Generate xsl file with php

With php, is it possible to generate an xslt (.xsl) file and then,
always with php, parse an xml file using the php-generated xsl file?

The problem is: can I create a localized xsl file based on php-gettext
and then parse the xml file loading the xsl file in the correct
language?

Something like:
$doc = new DOMDocument();
$xsl = new XSLTProcessor();
$doc->load('template.xsl?lang=it');
$xsl->importStyleSheet($doc);
$doc->load('it.xml');
echo $xsl->transformToXML($doc);

Thank you :-)

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.