[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: RE: [relax-ng-comment] Re: recursive inlusion
Wait, I did not read this through and just glanced at it. Now that I am reading it again it does look like what I want, sorry for the previous mailing. thanks, -Rob > -----Original Message----- > From: Robert Koberg [mailto:rob@livestoryboard.com] > Sent: Tuesday, October 08, 2002 1:42 AM > To: didier demany; relax-ng-comment@lists.oasis-open.org > Subject: RE: [relax-ng-comment] Re: recursive inlusion > > > Yes, I realize that - it is how I have it now. But in addition to > defining the strong and em in abc, I also have , say, 'def' amd 'ghi' > which also use strong and em. I have to define strong and em in each. > I was hoping there was a way i could define them once and include > them wherever they are needed. This works fine unless it is like the > case I posted originally (where strong external-ref's an em and vice versa. > > I also want to keep them separate so users can easily add elements to > other elements, while definning them in just one place. > > thanks, > -Rob > > > -----Original Message----- > > From: didier demany [mailto:didierdemany@yahoo.fr] > > Sent: Tuesday, October 08, 2002 1:34 AM > > To: relax-ng-comment@lists.oasis-open.org > > Subject: [relax-ng-comment] Re: recursive inlusion > > > > > > You can alternate including "strong" and "em" elements > > in separate documents by this way : > > ------------------------------------ > > abc.rng > > > > <grammar> > > <start> > > <element name="abc"> > > <zeroOrMore> > > <choice> > > <text/> > > <ref name="strong"/> > > <ref name="em"/> > > </choice> > > </zeroOrMore> > > </element> > > </start> > > <define name="strong"> > > <grammar> > > <include href="strong.rng"> > > <define name="content"> > > <parentRef name="em"/> > > </define> > > </include> > > </grammar> > > </define> > > <define name="em"> > > <grammar> > > <include href="em.rng"> > > <define name="content"> > > <parentRef name="strong"/> > > </define> > > </include> > > </grammar> > > </define> > > </grammar> > > ------------------------------------ > > strong.rng > > > > <grammar> > > <define name="content"> > > <notAllowed/> > > </define> > > <start> > > <element name="strong"> > > <oneOrMore> > > <choice> > > <text/> > > <ref name="content"/> > > </choice> > > </oneOrMore> > > </element> > > </start> > > </grammar> > > ------------------------------------ > > em.rng > > > > <grammar> > > <define name="content"> > > <notAllowed/> > > </define> > > <start> > > <element name="em"> > > <oneOrMore> > > <choice> > > <text/> > > <ref name="content"/> > > </choice> > > </oneOrMore> > > </element> > > </start> > > </grammar> > > ------------------------------------ > > > > The construct is the object of the "Nested grammars" > > section of the tutorial > > http://www.oasis-open.org/committees/relax-ng/tutorial-20011203.html#IDA3PZR > > > > Best regards, > > > > Didier Demany > > didier.demany@xmloperator.net > > http://www.xmloperator.net/ : an XML editor > > > > > > ___________________________________________________________ > > Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! > > Yahoo! Mail : http://fr.mail.yahoo.com > > > > ---------------------------------------------------------------- > > To subscribe or unsubscribe from this elist use the subscription > > manager: <http://lists.oasis-open.org/ob/adm.pl> > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC