Re: package.xml 2.0 dilemma

From: Date: Thu, 02 Jun 2005 23:03:20 +0000
Subject: Re: package.xml 2.0 dilemma
References: 1 2  Groups: php.pear.dev php.pear.core 
Request: Send a blank email to pear-dev+get-37942@lists.php.net to get a copy of this message
Alan Knowles wrote:
Agh, the pain of XML tools ;) out of interest where is the XSchema code? I"m not sure how many packages are using package2.xml yet. I'd like the format to be a little more flexible, and what you describe sounds clearer, so if you are going to break it, the sooner the better.. It would also be usefull if we could create packages (eg. generate package.xml(v1) that could be installed by the older pear.. - but I guess that's quite a bit of work.
As a side note, it is possible to create a bastardized package.xml 1.0 from your existing package.xml 2.0 with code something like this (untested): <?php require_once 'PEAR/Common.php'; $common = new PEAR_Common; $info = $common->infoFromAny('/path/to/package2.xml'); $newxml = $common->xmlFromInfo($info); file_put_contents('package.xml', $newxml); ?> However, you'll want to hand-check the contents of the new package.xml as the conversion is not fantastic. Better is to use PEAR_PackageFileManager to spit out 2 package.xml, version 1.0 and 2.0, as this makes things work with only 1 script. Greg

« previous php.pear.dev (#37942) next »