[Zope3-checkins] CVS: Zope3/src/zope/app/xml - metadirectives.py:1.1 configure.zcml:1.3 meta.zcml:1.2 metaconfigure.py:1.3
Stephan Richter
srichter@cosmos.phy.tufts.edu
Fri, 1 Aug 2003 16:18:42 -0400
Update of /cvs-repository/Zope3/src/zope/app/xml
In directory cvs.zope.org:/tmp/cvs-serv5225/src/zope/app/xml
Modified Files:
configure.zcml meta.zcml metaconfigure.py
Added Files:
metadirectives.py
Log Message:
Converted to new way of doing things.
=== Added File Zope3/src/zope/app/xml/metadirectives.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""'xml' namespace directives schema
$Id: metadirectives.py,v 1.1 2003/08/01 20:18:05 srichter Exp $
"""
from zope.configuration.fields import URI
from zope.interface import Interface
class ISchemaInterfaceDirective(Interface):
"""This directive creates an interface from an XML Schema definition,
which is specifed by the URI."""
uri = URI(
title=u"URI",
description=u"Specifies the URI of the XML Schema.",
required=True)
=== Zope3/src/zope/app/xml/configure.zcml 1.2 => 1.3 ===
--- Zope3/src/zope/app/xml/configure.zcml:1.2 Sat May 3 12:33:59 2003
+++ Zope3/src/zope/app/xml/configure.zcml Fri Aug 1 16:18:05 2003
@@ -1,6 +1,4 @@
-<zopeConfigure
- xmlns="http://namespaces.zope.org/zope"
- xmlns:browser="http://namespaces.zope.org/browser">
+<configure xmlns="http://namespaces.zope.org/zope">
<!-- we need to allow methods of XMLSchemaInterfaceClass so we can access them
through the security proxy -->
@@ -8,4 +6,4 @@
<allow interface="zope.interface.interfaces.IInterface" />
</content>
-</zopeConfigure>
+</configure>
=== Zope3/src/zope/app/xml/meta.zcml 1.1 => 1.2 ===
--- Zope3/src/zope/app/xml/meta.zcml:1.1 Wed Apr 9 16:51:33 2003
+++ Zope3/src/zope/app/xml/meta.zcml Fri Aug 1 16:18:05 2003
@@ -1,11 +1,9 @@
-<zopeConfigure xmlns='http://namespaces.zope.org/zope'>
+<configure xmlns:meta="http://namespaces.zope.org/meta">
- <directives namespace="http://namespaces.zope.org/zope-xml">
- <directive name="schemaInterface"
- attributes="uri"
- handler="
- zope.app.xml.metaconfigure.schemaInterface"
- />
- </directives>
+ <meta:directive
+ namespace="http://namespaces.zope.org/xml"
+ name="schemaInterface"
+ schema=".metadirectives.ISchemaInterfaceDirective"
+ handler=".metaconfigure.schemaInterface" />
-</zopeConfigure>
+</configure>
=== Zope3/src/zope/app/xml/metaconfigure.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/xml/metaconfigure.py:1.2 Thu Apr 10 12:07:45 2003
+++ Zope3/src/zope/app/xml/metaconfigure.py Fri Aug 1 16:18:05 2003
@@ -15,13 +15,11 @@
$Id$
"""
-
from zope.app.xml.schemainterface import XMLSchemaInterfaceClass
from zope.app.component.globalinterfaceservice import interfaceService
def schemaInterface(_context, uri):
schema_interface = XMLSchemaInterfaceClass(uri)
- # XXX normally we would return an Action here, but then the interface would
+ # XXX normally we would create an Action here, but then the interface would
# not be resolvable if other configuration directives make references to it
interfaceService.provideInterface(uri, schema_interface)
- return []