[Zope-CMF] Re: Generic Setup Delta Profiles

Matt matt at elyt.com
Thu Feb 15 02:56:45 EST 2007


Hi Yuppie.

On 2/14/07, yuppie <y.2007- at wcm-solutions.de> wrote:
> Hi Matt!
>
>
> Matt wrote:
> > Are there any RelaxNG or W3C XML Schemas for the Generic Setup XML formats?
>
> No. Don't think so.
>
> > Also, I presume by looking at the latest revision of differ
> > http://svn.zope.org/GenericSetup/trunk/differ.py?rev=41383&view=auto
> > that DeltaProfiles are going to start off being unified diffs.
> >
> > If useful, I would like to contribute by developing an XML diff based
> > solution using a RelaxNG schema that can define when elements are
> > ordered or not, and to normalize out whitespace, which seem to be the
> > two most recurring problems in doing generic setup export diffs.
>
> Did you see this thread?
> http://mail.zope.org/pipermail/zope-cmf/2006-July/024665.html


I have read through the thread(s), thanks for pointing it out. The
motivation is to make it easier to compare export profiles (or exports
to the resident filesystem base profile for a site) to examine what
changed when installing or uninstalling third party products that only
has quickinstaller functionality, and then also to apply these changes
with some algebra. But more and more I find myself building what would
be the equivalent extension profiles for these including any code that
needs to be copied from an Extensions/Install.py into an importVarious
handler.

While I rely on quick install uninstall to do the right thing for a
product and the export of the site profile then to be fine as the new
base profile for the site, it would be nice to be able to start with a
fresh site profile without addon products and rebuild it out to be the
site I had minus the product I uninstalled. The thread you pointed me
to mentioned this too, and basically that relies on having a good
extension profile for a product and a good diff of this against an
existing profile and the tool to apply them.

I have to admit that some amount of hand editing I have done on
profiles means that I should have been more rigourous about getting
canonical forms of these as produced by the export and that would help
the text diffs somewhat.

> What kind of XML diff do you have in mind? Which libraries would this
> depend on?

I guess I had something in mind along the lines of being able to
represent an algebra (maybe a form of set algebra) for profiles.

So at a broad level maybe something like:

intersection(a,b)
union(a,b)
intersection(a.skins.layers,b.skins.layers)
union(a,b) - intersection(b,c)
... these haven't been well thought out.

Considering order is important in various places, then these amount to
fragments of comparison rather than single element by element
comparison, which is sort of amounting to your idea of lots of small
files and layers.

So this is different than a line by line diff of canonical forms.

If I were actually try something like this, my toolist would be lxml which
offers up libxml's XSLT and RelaxNG support. I would hope that anyone
creating their own export import handler with an associated xml form
would also supply a relaxng schema of this.

Do consider I've only really had most of my experience with Generic
Setup in merging and diffing base profiles, so I am probably missing
something fundamental here.

cheers
Matt

>
> Cheers,
>
>         Yuppie>
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF at lists.zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests
>


More information about the Zope-CMF mailing list