Re: package.xml 2.0 dilemma

From: Date: Thu, 02 Jun 2005 05:20:49 +0000
Subject: Re: package.xml 2.0 dilemma
References: 1  Groups: php.pear.dev php.pear.core 
Request: Send a blank email to pear-dev+get-37923@lists.php.net to get a copy of this message
On Wed, 01 Jun 2005 21:44:35 -0400 cellog@php.net (Greg Beaver) wrote: > Hi all, > > As Alan has mentioned in > > http://pear.php.net/bugs/4457 (*) > > package.xml 2.0 currently has a specific tag ordering. I made > this choice because XSchema has only three kinds of ordering > indicators, sequence, choice and all. sequence allows very > fine-grained control over elements, choice says "any of these > elements can occur here" and all says "any of these elements can > occur in any order". > > The problem with the all indicator is that there can only be 1 of > a particular tag. In other words, this hypothetical xml: > > <package> > <name/> > <summary/> > <lead/> > <lead/> > </package> > > would be invalid because it has 2 <lead/> tags. > > However, there is a way around this. Tags can have child > sequences, which means if I put back in the old <maintainers> tag > like so > > <package> > <name/> > <summary/> > <maintainers> > <lead/> > <lead/> > </maintainers> > </package> > > Then we can have more flexible tag ordering in package.xml. I fail to see the difference but <lead/> being maintainers child, still two there. Have you some more clear examples? I take again a look at the xsd files and package2.xml, any reason to use lead,dev,... as tag and not properties? This was a point I did not like in the version 1 but was still better as it has a <maintainer> tag. Having a tag for each maintainer role sounds pretty ugly. Like having a tag for each possible color for instance. > The problem with this is that suddenly, older package.xml > 2.0-based releases will become invalid. ... > 1) all maintainers would be inside <maintainers> > 2) channel/uri would be inside new tag <origin> > 3) usesroles/usestask would be inside <uses> > 4) srcpackage/srcuri would be inside new tag <src> > The first two will break every existing release. We are alpha for 1.4, who cares? Why did you remove <maintainer> tag? > 1) slightly less code in PEAR_PackageFile_v2 not relevant at the current stage, pear being already quite big ;) > 2) smaller validation code in PEAR_PackageFile_v2_Validator > 3) flexibility in element ordering in package.xml version 2.0 good point for the users. > Disadvantages would be > > 1) every release using package.xml 2.0 up to now is suddenly > invalid 1.4 is alpha and should stay for some times, until "all" the features have been somehow tested and validated. About the #4457, I agree with Alan and go in the way as the maintainer tag, why release has been removed? --Pierre

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