[Zope] Problems with nested ZClasses
Robert Roy
rjroy@takingcontrol.com
Thu, 16 Mar 2000 22:54:46 -0500
--=====_95326528641=_
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Overview
I am trying to put an XML structure into a Zope product that mirrors the=
hierarchy.
The dtd for the XML is roughly of the form
<!ELEMENT nodes (node)*>
<!ELEMENT node (node|leaf)*>
<!ELEMENT leaf (object)*>
<!ELEMENT object EMPTY>
The 4 elements share several attributes and each has some unique=
attributes. So the intent is to group the common attributes in a couple of=
property pages and create an property page for each individual element.
The desired ZClass representation is as follows:
container (object manager)
base () {to contain common property pages}
nodes (object manager, base)
node (object manager, base)
leaf (object manager, base)
object()
I build the hierarchy, set permissions as follows and do the factory edit=
button trick
container - add_nodes
nodes - add_node
node - add_node, add_twigs
twigs - add_objects
I instantiate a container,
add a nodes object to the container,
add a node to th nodes.
At this point I can only add twigs though I think I should be able to add=
nodes. I thought I would look at the SubOjbects list however the only=
object that appears in the Subobjects list is nodes.
Am I missing something here? I have tried countless permutations with and=
without the base class, deriving base from object manager etc... I think=
one of my prior iterations actually worked but without the base class=
concept though I seem unable to reproduce it now...
Does anyone have any ideas?
Thanks
Bob
--=====_95326528641=_
Content-Type: text/html; charset="us-ascii"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<META content="MSHTML 5.00.2919.6307" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff text=#000000>
<DIV>Overview</DIV>
<DIV> </DIV>
<DIV>I am trying to put an XML structure into a Zope product that mirrors the
hierarchy.</DIV>
<DIV> </DIV>
<DIV>The dtd for the XML is roughly of the form</DIV>
<DIV><!ELEMENT nodes (node)*></DIV>
<DIV><!ELEMENT node (node|leaf)*></DIV>
<DIV><!ELEMENT leaf (object)*></DIV>
<DIV><!ELEMENT object EMPTY> </DIV>
<DIV> </DIV>
<DIV>The 4 elements share several attributes and each has some unique
attributes. So the intent is to group the common attributes in a couple of
property pages and create an property page for each individual element.</DIV>
<DIV> </DIV>
<DIV>The desired ZClass representation is as follows:</DIV>
<DIV>container (object manager)</DIV>
<DIV> base () {to contain common property pages}</DIV>
<DIV>
<DIV> nodes (object manager, base)
<DIV> node (object manager, base)
<DIV> leaf
(object manager, base)</DIV>
<DIV>
object()</DIV>
<DIV> </DIV>
<DIV>I build the hierarchy, set permissions as follows and do the factory edit
button trick</DIV>
<DIV>container - add_nodes</DIV>
<DIV>nodes - add_node</DIV>
<DIV>node - add_node, add_twigs</DIV>
<DIV>twigs - add_objects</DIV>
<DIV> </DIV>
<DIV>I instantiate a container, </DIV>
<DIV>add a nodes object to the container, </DIV>
<DIV>add a node to th nodes.</DIV>
<DIV> </DIV>
<DIV>At this point I can only add twigs though I think I should be able to add
nodes. I thought I would look at the SubOjbects list however the only object
that appears in the Subobjects list is nodes.</DIV>
<DIV> </DIV>
<DIV>Am I missing something here? I have tried countless permutations with and
without the base class, deriving base from object manager etc... I
think one of my prior iterations actually worked but without the base class
concept though I seem unable to reproduce it now...</DIV>
<DIV> </DIV>
<DIV>Does anyone have any ideas?</DIV>
<DIV> </DIV>
<DIV>Thanks </DIV>
<DIV>Bob</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV></DIV></DIV></DIV>
<DIV> </DIV></BODY></HTML>
--=====_95326528641=_--