From: Eric B. <er...@go...> - 2007-02-21 19:08:53
|
Jocelyn wrote: > I quickly made some changes and addition to geant to be able to have > <group /> task > the addition and changes are in the attached zip file. > > I could have commited it, but first I wanted to know your feeling about > this. > And ... I made small changes to geant to handle this, maybe this could > be better by having a common ancestor GEANT_GROUP > for GEANT_TARGET and GEANT_GROUP_TASK for instance ... > > But for now, my changes are safe and do not break any code. It is just > addition. > > So I'll wait for your comments, and if none, I guess I'll commit the > changes to the svn repository. > > an example is: > > <?xml version="1.0"?> > <project name="test_group" default="test"> > <target name="test" > > <echo message="test group..." /> > <input variable="cont" message="Continue ?" validargs="y,n" > defaultvalue="y" answer_required="true" /> > <group if="${cont}=y" > > <echo message="group started" /> > <echo message=" ### Select group ### " /> > <input variable="selection" message="Select a group (a|b|c)" > validargs="a,b,c" defaultvalue="a" answer_required="true" /> > <group name="A" if="$selection=a" > > <echo message="group A.1" /> > <echo message="group A.2" /> > <echo message="group A.3" /> > </group> > <group name="B" if="$selection=b" > > <echo message="group B.1" /> > <echo message="group B.2" /> > <echo message="group B.3" /> > </group> > <echo message="Group C" if="$selection=c" /> > <echo message="group terminated" /> > </group> > </target> > </project> How does it look in the schema? Is there a way to express that when <group> appears where a task is expected, then it should contain tasks. And when it appears in places where a foo is expected then it should contain foos, and not tasks. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
From: Jocelyn <li...@dj...> - 2007-02-22 13:30:44
|
For now, I made the GEANT_GROUP_TASK and GEANT_GROUP_COMMAND. So this is a basic geant task, which can be used as any task. It doesn't have any extra semantic appart from being a tasks containing a sequential group of tasks. The schema should looks like <define name="group"> <element name="group"> <ref name="dir_if_unless"/> <optional> <attribute name="name"/> </optional> <ref name="tasks"/> </element> </define> so a group can include another group and so on, as the example in my previous post. Does it answer the question ? Jocelyn On 2/21/2007 20:08 PM, Eric Bezault wrote: > > How does it look in the schema? Is there a way to express > > that when <group> appears where a task is expected, then > > it should contain tasks. And when it appears in places > > where a foo is expected then it should contain foos, and > > not tasks. > > > |
From: Eric B. <er...@go...> - 2007-02-22 14:16:12
|
Jocelyn wrote: > For now, I made the GEANT_GROUP_TASK and GEANT_GROUP_COMMAND. > So this is a basic geant task, which can be used as any task. > It doesn't have any extra semantic appart from being a tasks containing > a sequential group of tasks. > > The schema should looks like > <define name="group"> > <element name="group"> > <ref name="dir_if_unless"/> > <optional> > <attribute name="name"/> > </optional> > <ref name="tasks"/> > </element> > </define> > > so a group can include another group and so on, as the example in my > previous post. > Does it answer the question ? Yes, but it's more restrictive than I thought. It would be great if there was a mean to use groups as a kind of parentheses to group any kind of elements. Now that <group> is used to group tasks, will it be possible to use it later on to group other kinds of elements? Or will we be out of luck because <group> is already used for tasks? -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
From: Jocelyn <li...@dj...> - 2007-02-22 15:15:11
|
May be we can not define a proper RND "define" for this "group" but use it whenever needed with <element name="group" /> <element name="target"> ... <zeroOrMore> <ref name="tasks" /> <element name="group"> <zeroOrMore> <ref name="tasks" /> </zeroOrMore> </element> </zeroOrMore> </element> Except the RNG point, I guess we could try to have a notion of group in geant .. and then do not have a specific "group" task. In my (test) code, the group task and command were almost empty ... so we could create a GEANT_GROUP and handle this for tasks, or even group of options, group of .. whatever Jocelyn On 2/22/2007 15:16 PM, Eric Bezault wrote: > Jocelyn wrote: >> For now, I made the GEANT_GROUP_TASK and GEANT_GROUP_COMMAND. >> So this is a basic geant task, which can be used as any task. >> It doesn't have any extra semantic appart from being a tasks containing >> a sequential group of tasks. >> >> The schema should looks like >> <define name="group"> >> <element name="group"> >> <ref name="dir_if_unless"/> >> <optional> >> <attribute name="name"/> >> </optional> >> <ref name="tasks"/> >> </element> >> </define> >> >> so a group can include another group and so on, as the example in my >> previous post. >> Does it answer the question ? > > Yes, but it's more restrictive than I thought. It would > be great if there was a mean to use groups as a kind of > parentheses to group any kind of elements. Now that <group> > is used to group tasks, will it be possible to use it > later on to group other kinds of elements? Or will we be > out of luck because <group> is already used for tasks? > |
From: Jocelyn <ei...@dj...> - 2007-02-22 07:30:49
|
For now, I made the GEANT_GROUP_TASK and GEANT_GROUP_COMMAND. So this is a basic geant task, which can be used as any task. It doesn't have any extra semantic appart from being a tasks containing a sequential group of tasks. The schema should looks like <define name="group"> <element name="group"> <ref name="dir_if_unless"/> <optional> <attribute name="name"/> </optional> <ref name="tasks"/> </element> </define> so a group can include another group and so on, as the example in my previous post. Does it answer the question ? Jocelyn On 2/21/2007 20:08 PM, Eric Bezault wrote: > How does it look in the schema? Is there a way to express > that when <group> appears where a task is expected, then > it should contain tasks. And when it appears in places > where a foo is expected then it should contain foos, and > not tasks. > |