[Zope3-checkins] CVS: zopeproducts/xml/examples - README.txt:1.1 __init__.py:1.1 apple.pt:1.1 configure.zcml:1.1 pear.pt:1.1

Philipp von Weitershausen philikon@philikon.de
Fri, 20 Jun 2003 11:11:41 -0400


Update of /cvs-repository/zopeproducts/xml/examples
In directory cvs.zope.org:/tmp/cvs-serv15767/xml/examples

Added Files:
	README.txt __init__.py apple.pt configure.zcml pear.pt 
Log Message:
Moved the xml_examples, xslt, xslt_examples and xmldom products to one
xml product.


=== Added File zopeproducts/xml/examples/README.txt ===

Zope3 XML Examples

  Installation

    In order to use these examples, you will have to include the package in your
    products.zcml file.

  Views

    Create an XML Document called 'apple.xml' or similar and edit its contents to
    the following::

      <fruit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://xml.zope.org/zopeproducts/xml_examples/apple">
      </fruit>

    Then point your browser at the URL of this XML document. You will see the
    view for apples. If you change the schema declaration to
    http://xml.zope.org/zopeproducts/xml_examples/pear and view the object, you
    will see the view for pears.


=== Added File zopeproducts/xml/examples/__init__.py ===
##############################################################################
#
# Copyright (c) 2003 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.
#
##############################################################################
"""
$Id: __init__.py,v 1.1 2003/06/20 15:11:40 philikon Exp $
"""


=== Added File zopeproducts/xml/examples/apple.pt ===
<html>
<body>
This is an XML Apple at <p tal:content="context/@@absolute_url"></p>.
</body>
</html>


=== Added File zopeproducts/xml/examples/configure.zcml ===
<zopeConfigure
   xmlns="http://namespaces.zope.org/zope"
   xmlns:browser="http://namespaces.zope.org/browser"
   xmlns:zopexml="http://namespaces.zope.org/zope-xml">

<!-- First, we define two schema interfaces. They don't have to exist at their
     specified URIs for this application (they have to for more advanced
     uses) -->

<zopexml:schemaInterface
    uri="http://xml.zope.org/zopeproducts/xml.examples/apple" />

<zopexml:schemaInterface
    uri="http://xml.zope.org/zopeproducts/xml.examples/pear" />

<!-- Then we define a view for each one -->

<browser:page
    name="apple.html"
    for="http://xml.zope.org/zopeproducts/xml.examples/apple"
    template="apple.pt"
    permission="zope.View" />

<browser:page
    name="pear.html"
    for="http://xml.zope.org/zopeproducts/xml.examples/pear"
    template="pear.pt"
    permission="zope.View" />

<!-- Now we set the views to the default views -->

<browser:defaultView
    for="http://xml.zope.org/zopeproducts/xml.examples/apple"
    name="apple.html" />

<browser:defaultView
    for="http://xml.zope.org/zopeproducts/xml.examples/pear"
    name="pear.html" />

</zopeConfigure>


=== Added File zopeproducts/xml/examples/pear.pt ===
<html>
<body>
This is an XML Pear at <p tal:content="context/@@absolute_url"></p>
Hmmm, juicy.
</body>
</html>