Can a single cite within a citation reference more than one url/accessed date pairs?

111 views Asked by At

Let's say that I have a reference such as:

title "Hello World"
urls
 - http://example.com/foo (accessed 20/03/2018)
 - http://example.com/bar (accessed 10/05/2015)

(And let's say that the above reference is processed into a form that a CSL processor can understand; citeproc-js in this case)

Does the CSL specification allow to produce a citation (from this only reference) that looks like this?

Hello World! http://example.com/foo (accessed 20/03/2018); http://example.com/bar (accessed 10/05/2015)

I know I could support one pair with this: (simplified style for the example)

<citation>
  <layout>
    <text variable="title" suffix=" "/>
    <group>
      <text variable="URL" suffix=" "/>
      <date variable="accessed" prefix="(" suffix=")">
        <date-part name="day" suffix="/"/>
        <date-part name="month" suffix="/"/>
        <date-part name="year"/>
      </date>
    </group>
  </layout>
</citation>

But how do I "iterate" over multiple pairs?

It doesn't seem that the CSL specification nor the schema for CSL data support this. Am I wrong?

1

There are 1 answers

2
adam.smith On BEST ANSWER

You can do this with two citations, e.g.:

- type: webpage
  URL:  http://example.com/foo (accessed 20/03/2018)
- type: webpage
  URL:  http://example.com/bar (accessed 10/05/2015)

Style snippet

<citation>
  <layout delimiter="; ">
    <group>
      <text variable="URL" suffix=" "/>
      <date variable="accessed" prefix="(" suffix=")">
        <date-part name="day" suffix="/"/>
        <date-part name="month" suffix="/"/>
        <date-part name="year"/>
      </date>
    </group>
  </layout>
</citation>

And then simply include "Hello World!" in the text. Note the delimiter in layout that determines how the two elements are separated.