On Nov 17, 2011, at 10:37 PM, Rintze Zelle wrote:

> On Thu, Nov 17, 2011 at 4:17 PM, andrea rossato <[email protected]> 
> wrote:
> there is an issue with a style (chicago-author-date shipped with pandoc,
> which comes from the test-suite repository) and the way is uses
> <substitute>.
> 
> This is the issue, from the citeproc-hs perspective: according to the
> specification "[s]ubstituted variables are suppressed in the rest of the
> output to prevent duplication." This style uses the variable "editor" as
> a substitute and then checks if it is set, or if it is set the variable
> "author" or the variable "translator". If none of them is set then
> "Anon." is printed. Author and translator are not set and editor has
> been suppressed. Which, in citeproc-hs sense means unset.
> 
> I think it is a style bug (I do not think chicago-author-date belongs to
> the best coded styles), but it may also be my wrong interpretation of
> what "suppressed" means. What do you think?
> 
> First, I think the style should just use
> 
>      <substitute>
>        <text macro="editor" />
>        <text macro="translator" />
>        <text macro="anon"/>
>      </substitute>
>    </names>
>    
> which eliminates the need for the conditional in the "anon" macro.
> 
> I don't think we have ever discussed what the behavior of the conditional 
> should be in case of a suppressed variable, and I think a case can be made 
> for both choices. Assuming that suppressed variables are "unset" in 
> conditionals gives a bit more flexibility in coding style logic, but ignoring 
> suppression would make styles easier to debug.

If we are going to specify this, then it will be necessary to define when 
exactly a variable is substituted. Looking at the style in question, the first 
substitution is a text macro (!) called 'editor'  – at what point should a 
processor decide which variable was used as a substitute? IMO the repression of 
substituted variables should be limited to a case like:

<macro name="author">
  <names variable="author">
    <name/>
    <substitute>
      <names variable="editor"/>
      <text macro="title"/>
    </substitute>
  </names>
</macro>

Here it is immediately clear that the editor variable is used for the author 
variable; is it necessary to force the processor to expand nested macros to 
infer which variable was used as a substitute? Frank and Andrea seem taken the 
effort to implemented it this way, however, I wonder if that isn't too 
complicated.

Another issue I noticed: if editor is used as a substitute for author (and is 
subsequently repressed), I still think that the conditional check 'author or 
editor or translator' should equal true, because we do have one value: either 
the editor, or, if we say that editor is unset/repressed it follows that we now 
have a valid author value, because that's what editor was used for.

Sylvester



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
xbiblio-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel

Reply via email to