From: Simon K. <si...@si...> - 2007-03-26 04:20:29
|
On Mar 24, 2007, at 10:38 AM, Bruce D'Arcus wrote: >> I need to repeat publisher to do: >> >> <group prefix=" " delimiter=": "> >> <publisher><place/></publisher> >> <publisher><name/></publisher> >> </group> > > So what if we had this as a default? > > <publisher delimiter=": "> > <place/> > <name/> > </publisher> > > E.g. allow the delimiter attribute on publisher? > > I guess that doesn't help for the case where you include the date, but > maybe there's a similarly simple way to address that? How, then, do we handle what we could currently model as: <defaults> ... <publisher> <place/> </publisher> ... </defaults> ... <group delimiter=": "> <conditional> <if field="publisher"><publisher/></if> <else><text term-name="no place"/></else> </conditional> <publisher><name/></publisher> </group> Or, with top-level fields: <group delimiter=": "> <conditional> <if field="place"><place/></if> <else><text term-name="no place"/></else> </conditional> <publisher/> </group> (This issue doesn't exactly necessitate top-level fields, since we could also make the conditional more complex and deal with it that way, but top-level fields provide the most compact syntax. If we do add macros, we should make sure to offer an macro attribute on <if>.) ... >> This also explains why I prefer simple top-level fields. Once you >> remove <defaults>, is there any reason to have <publisher><place/></ >> publisher> and not just <place/>? > > One problem is that there may be other kinds of relevant "place" > variables? For example, the place of a conference, or a hearing. We could put an attribute on <place/> to accommodate these, or else use <place-published/>. As far as I can tell, CSL doesn't yet support these at all. ... > OK, let's look at the chicago-a style. We have stuff like: > > <issue prefix=", "> > <label form="short" text-transform="lowercase" > suffix=". "/> > <number/> > </issue> > > There's no way around needing to define the label and its location > relative to the number. Is there really a completely clean, simple, > way > to do this? Well, as long as you know it's <issue/>, you can use <text term- name="issue" form="short"/>. > Right now, we could define this in the defaults: > > <locator prefix=", "> > <label form="short" text-transform="lowercase" > suffix=". "/> > <number/> > </locator> ...which brings up a very important issue. What do we do with the <locator/> element in <citation/>, which just represents a generic locator? I'm not quite sure what to do in this case, but I would suggest either keeping the current syntax, or using: <label for="locator" form="short"/> <locator/> Finally, looking over the CSL schema, I realize that there are cases where my styles won't validate because you're very restrictive about what you let in the /style/citation/layout/item element. Why is this? There isn't any reason fields in the <citation> element need to be treated differently from fields in the <bibliography> element. It makes the language much less flexible without making it any easier to code a parser. I'd be happy to provide an updated schema that implements everything that I've mentioned here, and to provide an example of a style using the modified schema. If we agree that the approach is successful, I can write a tool to convert existing styles to the new format. Simon |