<div>hi, </div>
<div>can you provide some tutorials how to use ParsedXML?</div>
<div> </div>
<div>thankx in advance.</div><br><br>
<div><span class="gmail_quote">On 11/1/05, <b class="gmail_sendername"><a href="mailto:zope-request@zope.org">zope-request@zope.org</a></b> <<a href="mailto:zope-request@zope.org">zope-request@zope.org</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Send Zope mailing list submissions to<br> <a href="mailto:zope@zope.org">zope@zope.org</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit
<br> <a href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a><br>or, via email, send a message with subject or body 'help' to<br> <a href="mailto:zope-request@zope.org">
zope-request@zope.org</a><br><br>You can reach the person managing the list at<br> <a href="mailto:zope-owner@zope.org">zope-owner@zope.org</a><br><br>When replying, please edit your Subject line so it is more specific
<br>than "Re: Contents of Zope digest..."<br><br><br>Today's Topics:<br><br> 1. marshall zsql results (Christopher Rivard)<br> 2. Re: marshall zsql results (Tino Wildenhain)<br> 3. Silva (Piotr Konstanty)<br>
4. Re: Silva (bruno desthuilliers)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Sun, 30 Oct 2005 17:11:23 -0700<br>From: Christopher Rivard <<a href="mailto:chris@chrisrivard.com">
chris@chrisrivard.com</a>><br>Subject: [Zope] marshall zsql results<br>To: <a href="mailto:zope@zope.org">zope@zope.org</a><br>Message-ID: <<a href="mailto:4365612B.9060509@chrisrivard.com">4365612B.9060509@chrisrivard.com
</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br>Hello,<br><br>I am having a little difficulty with a result object from ZSQL.<br>The MySQL form input is a series of checkboxes that are creating a
<br>"mapping table".<br><br>I have gone round and round and landed here:<br><br>The checkboxes are marshalled as:<br>list_map_dir_id:list:int<br><br>SQL like this:<br><br><dtml-in list_map_dir_id><br>insert into listing_map (list_map_dir_id, list_map_list_id) values
<br>(<dtml-sqlvar sequence-item type=int>,<br><dtml-sqlvar list_map_list_id type=string><br>)<br><dtml-var sql_delimiter><br></dtml-in><br><br>MySQL data type is int for this column.<br><br>All of this works fine, but ideally I would like to manipulate the id's
<br>as a list.<br><br>I have tried a few variations and regularly run into "len of unsized<br>object" if I try to insert as a varchar or insert the full list as<br>[0,1,2,3,4]<br>I have tried a few different MySQL data types, but no luck.
<br><br>Retrieving the results like this:<br>select * from listing_map where list_map_list_id = <dtml-var list_id><br><br>And mapping them back to the directory table like this:<br><br>select t1.*<br>from directory as t1
<br>left join listing_map as t2<br>on t1.dir_id = t2.list_map_dir_id<br>where t1.dir_id = t2.list_map_dir_id && t2.list_map_list_id = <dtml-var<br>list_id><br><br>Is there a way to marshall the results of this ZSQL object back into a list?
<br><br>I am branching the subsequent forms based on the above query results.<br>The difficulty I am running into are exclusion situations<br><br>A and B not C<br><br>Seems like it would be easier if I could loop through and pull id's from
<br>a list. Maybe I'm asking the wrong question.<br><br><br>Thanks in advance,<br>Chris<br><br><br><br><br><br><br><br><br>------------------------------<br><br>Message: 2<br>Date: Mon, 31 Oct 2005 07:28:31 +0100<br>From: Tino Wildenhain <
<a href="mailto:tino@wildenhain.de">tino@wildenhain.de</a>><br>Subject: Re: [Zope] marshall zsql results<br>To: Christopher Rivard <<a href="mailto:chris@chrisrivard.com">chris@chrisrivard.com</a>><br>Cc: <a href="mailto:zope@zope.org">
zope@zope.org</a><br>Message-ID: <<a href="mailto:1130740112.9938.29.camel@Andrea.peacock.de">1130740112.9938.29.camel@Andrea.peacock.de</a>><br>Content-Type: text/plain<br><br>Am Sonntag, den 30.10.2005, 17:11 -0700 schrieb Christopher Rivard:
<br>> Hello,<br>><br>> I am having a little difficulty with a result object from ZSQL.<br>> The MySQL form input is a series of checkboxes that are creating a<br>> "mapping table".<br>><br>> I have gone round and round and landed here:
<br>><br>> The checkboxes are marshalled as:<br>> list_map_dir_id:list:int<br>><br>> SQL like this:<br>><br>> <dtml-in list_map_dir_id><br>> insert into listing_map (list_map_dir_id, list_map_list_id) values
<br>> (<dtml-sqlvar sequence-item type=int>,<br>> <dtml-sqlvar list_map_list_id type=string><br>> )<br>> <dtml-var sql_delimiter><br>> </dtml-in><br><br>This isnt that bad - you just get a bounch of insert statements
<br>which should work.<br><br>> MySQL data type is int for this column.<br>><br>> All of this works fine, but ideally I would like to manipulate the id's<br>> as a list.<br><br>SQL knows no list, so the above is probably best you can do.
<br>Otoh, you could manipulate the values as ARRAY and use the<br>database functions to select from array to table - depending<br>on your database.<br><br>> I have tried a few variations and regularly run into "len of unsized
<br>> object" if I try to insert as a varchar or insert the full list as<br>> [0,1,2,3,4]<br>> I have tried a few different MySQL data types, but no luck.<br>><br>> Retrieving the results like this:<br>
> select * from listing_map where list_map_list_id = <dtml-var list_id><br><br>You should get into the habit of specifying the column names<br>literally to avoid changes of order and case of your columns<br>as they come from the database. Also you dont retrieve columns
<br>you might not need (if you extend the table later).<br><br>> And mapping them back to the directory table like this:<br>><br>> select t1.*<br>> from directory as t1<br>> left join listing_map as t2<br>> on
t1.dir_id = t2.list_map_dir_id<br>> where t1.dir_id = t2.list_map_dir_id && t2.list_map_list_id = <dtml-var<br>> list_id><br><br>Write AND instead of && - && isnt SQL standard and makes it harder for
<br>you to change the database.<br><br>> Is there a way to marshall the results of this ZSQL object back into a list?<br><br>ZSQL objects is a bit confusing. You probably mean the DTML elements of<br>the ZSQL Methods. As I said, there is no list in SQL and Array
<br>is a bit specific to databases. For example you could do something<br>like<br><br><dtml-sqlvar expr="'{%s}' % ','.join([str(x) for x in list_id])"<br>type=string><br><br>would render '{1,3,4,5,6}' to the database which in Postgres would
<br>be an array.<br><br>> I am branching the subsequent forms based on the above query results.<br>> The difficulty I am running into are exclusion situations<br>><br>> A and B not C<br>><br>> Seems like it would be easier if I could loop through and pull id's from
<br>> a list. Maybe I'm asking the wrong question.<br><br>You should be able to optimize this by means of stored functions in your<br>database.<br><br><br><br>------------------------------<br><br>Message: 3<br>Date: Mon, 31 Oct 2005 09:22:12 +0000 (UTC)
<br>From: Piotr Konstanty <<a href="mailto:P.Konstanty@man.torun.pl">P.Konstanty@man.torun.pl</a>><br>Subject: [Zope] Silva<br>To: <a href="mailto:zope@zope.org">zope@zope.org</a><br>Message-ID: <<a href="mailto:loom.20051031T101246-232@post.gmane.org">
loom.20051031T101246-232@post.gmane.org</a>><br>Content-Type: text/plain; charset=us-ascii<br><br>I'm new in zope world. I would like to install Silva as a product in zope. When<br>I put all core silva product to lib/python/Products cataloge unpack it an
<br>restart zope again every think seems to be good but when I want to do next step<br>from INSALL.txt of Silva namely on "add list" of ZMI I choose Slva root and<br>want to add it to zope root folder after I feed Id and Title on the "Add Silva
<br>Root" page and I push "Add" button I receive "HTTP 500 - Inside Error of server<br>Internet Explorer". Where is an reason of this error? Any hints?<br><br><br><br>------------------------------
<br><br>Message: 4<br>Date: Mon, 31 Oct 2005 11:37:05 +0100<br>From: bruno desthuilliers <<a href="mailto:bruno@modulix.org">bruno@modulix.org</a>><br>Subject: Re: [Zope] Silva<br>To: Piotr Konstanty <<a href="mailto:P.Konstanty@man.torun.pl">
P.Konstanty@man.torun.pl</a>><br>Cc: <a href="mailto:zope@zope.org">zope@zope.org</a><br>Message-ID: <<a href="mailto:4365F3D1.5000006@modulix.org">4365F3D1.5000006@modulix.org</a>><br>Content-Type: text/plain; charset=ISO-8859-1
<br><br>Piotr Konstanty wrote:<br>> I'm new in zope world. I would like to install Silva as a product in zope. When<br>> I put all core silva product to lib/python/Products cataloge unpack it an<br>> restart zope again every think seems to be good
<br><br>How did you restart your zope instance ? If you want to make sure you<br>see start-time errors, you may want to use <ZOPE-INSTANCE>/bin/runzope<br>instead of <ZOPE-INSTANCE>/bin/zopectl start.<br><br>> but when I want to do next step
<br>> from INSALL.txt of Silva namely on "add list" of ZMI I choose Slva root and<br>> want to add it to zope root folder after I feed Id and Title on the "Add Silva<br>> Root" page and I push "Add" button I receive "HTTP 500 - Inside Error of server
<br>> Internet Explorer". Where is an reason of this error? Any hints?<br><br>I'd say that some required dependencies are missing.<br><br>To check this, you can either:<br>- have a look at <ZOPE-INSTANCE>/log/Z2.log
<br>- stop your zope instance and restart it with runzope<br>- goto Control_Panel/Products in the ZMI and check if some products are<br>'broken' (they have a special icon)<br><br>HTH<br>--<br>bruno desthuilliers<br>développeur
<br><a href="mailto:bruno@modulix.org">bruno@modulix.org</a><br><a href="http://www.modulix.com">http://www.modulix.com</a><br><br><br>------------------------------<br><br>_______________________________________________<br>
Zope maillist - <a href="mailto:Zope@zope.org">Zope@zope.org</a><br><br><br><br>End of Zope Digest, Vol 17, Issue 37<br>************************************<br></blockquote></div><br>