[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: [relax-ng-comment] Re: recursive inlusion
> I am having trouble figuring out how to handle a problem I have with recursive > inclusion. I want to be able to validate: > > <abc>This is a <strong><em>sentence</em></strong>.</abc> > > I have broken up all of my elements into individual .rng files to ease my > writing of a schema editor. I want to make it easy for a user to modify their > schema in small chunks. > > When I try the two below I get a recursive inclusion error. Is it a bad strategy > to break all the elements up like this? Is there a valid way to handle this > while still using externalRef's? What you can do is to define a hub module: <grammar> <start> ... </start> <define name="strong"> <externalRef href="strong.rng"/> </define> <define name="em"> <externalRef href="em.rng"/> </define> ... </grammar> and inside "strong.rng", change <externalRef href="em.rng" /> to <ref name="em"/> Or you could write <grammar> <include href="strong.rng"/> <include href="em.rng"/> ... <start> ... </start> </grammar> and change your em.rng to <grammar> <define name="strong"> <element name="strong"> ... <ref name="em"/> regards, -- Kohsuke KAWAGUCHI Sun Microsystems kohsuke.kawaguchi@sun.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC