Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 5th, 2008, 02: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


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 network members.
Post your question now . . .
It's fast and it's free

Popular Articles