[sc34wg3] CTM draft dtd. 2007-09-09 - Templates

Steve Pepper pepper.steve at gmail.com
Mon Sep 24 13:01:44 EDT 2007


* Lars Heuer
|
| > We could avoid this if template names and
| > identifiers were not allowed to overlap.
| 
| Yes, I thought about distinct template names and topic identifiers,
| but I don't think that it is a good solution: The template names have
| to be known a priori before a parser can detect that there is an
| overlap, which seems to be hard since the user can define a template
| everywhere.

I'm not sure why this should be a problem. Why can't the parser just
report an error when it either

1) encounters an identifier that is identical to the name of an already
   defined template, or

2) encounters a template definition whose name has already been used
   as an identifier?

| And distinct template names and topic identifiers wouldn't help if the
| document contains a typo:

Well, we can't do much about typos in other contexts, so I don't
think that should be an issue here. In short, I think distinct names
goes a long way to mitigating the problem.

Steve




More information about the sc34wg3 mailing list