[PEAK] a potential patch for zconfig_loader
Dave Peticolas
dave at krondo.com
Wed Jun 16 13:54:51 EDT 2004
Ah, gotcha, thanks for the tip. Using a schema like:
<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE schema SYSTEM '../peak/src/ZConfig/doc/schema.dtd'>
<schema datatype="peak.running.commands.EventDriven.fromZConfig"
extends="file:peak/src/peak/running/EventDriven.xml">
<import package="hello"/>
</schema>
I can start my hello Task with a config file like:
stopAfter 5
<Hello>
RunEvery 1
Priority 1
</Hello>
That works fine.
dave
---- Original Message ----
From: Phillip J. Eby
Date: Wed 6/16/04 5:56
To: Dave Peticolas, peak at eby-sarna.com
Subject: Re: [PEAK] a potential patch for zconfig_loader
At 11:30 AM 6/15/04 -0700, Dave Peticolas wrote:
>Ah, I'm afraid I don't know how to 'use my schema directly'. :(
>I'm just starting to learn peak, I'm afraid. Is there some
>way to tell 'peak EventDriven' to use a different schema?
Yes. If you look at 'peak.ini', under the 'peak.running.shortcuts'
section, you'll see that 'peak EventDriven' is just short for:
peak zconfig.schema:pkgfile:peak.running/EventDriven.xml
So, if your schema was "myschema.xml" in "mypackage", you could do:
peak zconfig.schema:pkgfile:mypackage/myschema.xml myconfigfile
to run "myconfigfile" using that schema.
Note, by the way, that your schema will need to "extend" the EventDriven
schema; see the ZConfig docs for more details.
More information about the PEAK
mailing list