[Zope3-dev] ZCML alternative

Tim Peters tim@zope.com
Tue, 4 Jun 2002 19:54:38 -0400


[Shane Hathaway]
> Here's your example rewritten in more conventional XML.  If we're using
> XML to make ZCML familiar, we'll gain the most mileage by using a
> familiar style of XML.
>
> <permission id="Zope.Manage">Manage Contacts</permission>
>
> <content class="Zope.Contact.">
>   <require permission="Zope.View">
>    <attribute>name</attribute>
>    <attribute>first</attribute>
>    <attribute>last</attribute>
>    <attribute>email</attribute>
>    <attribute>address</attribute>
>    <attribute>postal_code</attribute>
>   </require>
>   <require permission="Zope.Manage">
>    <zmi-factory id="Zope.Contact">
>     <title>Contact</title>
>    </zmi-factory>
>   </require>
> </content>

[Jim Fulton]
> You find that more readable than:
>
>    <security:permission
>        id="Zope.Manage"
>        title="Manage Contacts"/>
>
>    <content class="Zope.Contact.">
>      <security:require
>          permission="Zope.View"
>          attributes="name first last email address postal_code" />
>      <zmi:factory
>          id="Zope.Contact"
>          permission="Zope.Manage"
>          title="Contact" />
>    </content>
>
> I find this unfathomable.

I also find it unfathomable.  Then again, we're not site managers -- it's
possible their brains are wired incorrectly <wink>.