[sc34wg3] Wildcards, proposed solution

Lars Marius Garshol larsga at garshol.priv.no
Mon Mar 16 06:33:54 EDT 2009


The way wildcards are specified right now, if we have a.ctm saying
   %include <b.ctm>

and we have b.ctm saying
   ?foo.

then we get a single topic with two item identifiers:
   a.ctm#$__1.foo
   b.ctm#$__1.foo


The solution I propose is that we add to the definition of %include  
that all topic item identifiers of the form b.ctm#$__<something> be  
stripped before merging in. (In practice, implementors could of course  
handle this by never adding these identifiers at all.)


Note that this implies that in the case where we have a deeper chain  
of includes, like a.ctm -> b.ctm -> c.ctm, the result will be the same  
as though a.ctm had included c.ctm directly. So the wildcard-generated  
item identifiers will always be of the form
   a.ctm#$__<whatever>

when you load a.ctm.

As far as I can tell this is actually easier to implement than the  
current solution, and the only case where you can get problems is if  
you load a.ctm, then change it, then reload and merge with the  
original. My advice would be to not do that.

Thoughts on this?

--Lars M.
http://www.garshol.priv.no/blog/
http://www.garshol.priv.no/tmphoto/





More information about the sc34wg3 mailing list