>>===== MODE =====>>
citation
<<===== MODE =====<<


The semicolon after the phrase "for a detailed discussion." should be suppressed.


>>===== RESULT =====>>
>>[0] See <span style="font-variant:small-caps;">John Smith</span>, <span style="font-variant:small-caps;">First Book</span> (1990) for a detailed discussion. See also <span style="font-variant:small-caps;">John Brown</span>, <span style="font-variant:small-caps;">Second Book</span> (2010); <span style="font-variant:small-caps;">John Green</span>, <span style="font-variant:small-caps;">Third Book</span> (2010).
<<===== RESULT =====<<

>>===== CITATIONS =====>>
[
    [
        {
            "citationID": "CITATION-1", 
            "citationItems": [
                {
                    "id": "ITEM-1", 
                    "prefix": "See", 
                    "suffix": "for a detailed discussion."
                }, 
                {
                    "id": "ITEM-2", 
                    "prefix": "See also"
                }, 
                {
                    "id": "ITEM-3"
                }
            ], 
            "properties": {
                "noteIndex": 1
            }
        }, 
        [], 
        []
    ]
]
<<===== CITATIONS =====<<



>>===== CSL =====>>
<style
       xmlns="http://purl.org/net/xbiblio/csl"
      class="note"
      version="1.1mlz1"
      page-range-format="chicago">
  <info>
    <title>Test fixture</title>
    <id>http://citationstyles.org/tests/fixture</id>
    <link href="http://citationstyles.org/tests/fixture" rel="self"/>
    <link href="http://citationstyles.org/documentation/text" rel="documentation"/>
    <category citation-format="author-date"/>
    <updated>2014-04-30T13:19:38+00:00</updated>
    <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
  </info>
  <locale>
	<terms>
	  <term name="ibid">id.</term>
	</terms>
  </locale>
  <macro name="bb-author">
	<names variable="author">
	  <name/>
	</names>
  </macro>
  <macro name="bb-author-short">
	<names variable="author">
	  <name form="short"/>
	</names>
  </macro>
  <macro name="bb-issued">
	<group prefix="(" suffix=")">
	  <date variable="issued" form="text" date-parts="year"/>
	</group>
  </macro>
  <macro name="bb-ibid">
	<choose> 
	  <if position="ibid-with-locator">
		<text term="ibid" font-style="italic"/>
		<group delimiter=" ">
		  <choose>
			<if locator="page">
			  <text value=" at"/>
			</if>
			<else>
			  <text value=", "/>
			  <label form="short" variable="locator"/>
			</else>
		  </choose>
		  <text variable="locator"/>
		</group>
	  </if>
	  <else-if position="ibid">
		<text term="ibid" font-style="italic"/>
	  </else-if>
	</choose>
  </macro>
  <macro name="bb-point-locator-comma">
	<group delimiter=" ">
	  <choose>
        <if variable="number page" position="ibid" match="any">
		  <text value=","/>
        </if>
	  </choose>
	  <choose>
        <if locator="page" match="none">
		  <label form="symbol" variable="locator"/>
	    </if>
	  </choose>
	  <text variable="locator"/>
	</group>
  </macro>
  <macro name="bb-point-locator-base">
    <group delimiter=" ">
  	  <choose>
        <if locator="page" match="none">
		  <label form="symbol" variable="locator"/>
	    </if>
	  </choose>
    </group>
	<text variable="locator"/>
  </macro>
  <macro name="bb-legal-case">
	<choose>
	  <if position="first">
		<text macro="bb-legal-case-first"/>
	  </if>
	  <else-if position="ibid">
		<text macro="bb-ibid"/>
	  </else-if>
	  <else-if position="near-note">
		<text macro="bb-legal-case-subsequent"/>
	  </else-if>
	  <else>
		<text macro="bb-legal-case-first"/>
	  </else>
	</choose>
  </macro>
  <macro name="bb-legal-case-first">
    <choose>
      <if variable="title">
        <!-- Common law cases -->
		<group delimiter=", ">
		  <text variable="title"/>
		  <group delimiter=" ">
			<choose>
			  <if variable="issue">
				<number variable="volume" prefix="[" suffix="]"/>
				<number variable="issue"/>
			  </if>
			  <else>
				<number variable="volume"/>
			  </else>
			</choose>
			<text variable="container-title" form="short"/>
			<group>
			  <number variable="page"/>
			  <text macro="bb-point-locator-comma"/>
			</group>
			<group prefix="(" suffix=")" delimiter=" ">
              <names variable="authority">
                <name form="short"/>
              </names>
			  <date variable="issued">
				<date-part name="year"/>	
			  </date>
			</group>	
		  </group>
		</group>
	  </if>
      <else>
		<group delimiter=", ">
              <names variable="authority">
                <name/>
              </names>
		  <text variable="title" form="short"/>
		  <date variable="issued" form="text"/>
		  <text variable="container-title" font-style="italic" strip-periods="true"/>
		  <number variable="volume"/>
          <group delimiter=" ">
			<text variable="section"/>
            <label variable="page" form="short"/>
            <number variable="page"/>
		  </group>
          <number variable="number"/>
          <group delimiter=" ">
            <text variable="genre"/>
  		    <names variable="author">
			  <name initialize-with="." font-variant="small-caps"/>
		    </names>
		  </group>
		</group>
	  </else>
	</choose>
  </macro>
  <macro name="bb-legal-case-subsequent">
    <group delimiter=", ">
      <text variable="title" form="short"/>
      <group delimiter=" ">
		<choose>
		  <if variable="issue">
			<number variable="volume" prefix="[" suffix="]"/>
			<number variable="issue"/>
		  </if>
		  <else>
			<number variable="volume"/>
		  </else>
		</choose>
        <text variable="container-title" form="short"/>
		<choose>
          <if variable="locator">
            <text macro="bb-point-locator-base"/>
		  </if>
		  <else>
		    <number variable="page"/>
		  </else>
		</choose>
      </group>
	</group>
  </macro>
  <macro name="bb-legislation">
	<choose>
	  <if position="first">
		<text macro="bb-legislation-first"/>
	  </if>
	  <else-if position="near-note">
		<text macro="bb-legislation-subsequent"/>
	  </else-if>
	  <else>
		<text macro="bb-legislation-first"/>
	  </else>
	</choose>
  </macro>
  <macro name="bb-legislation-first">
	<choose>
	  <if variable="container-title">
		<text macro="bb-statute-first"/>
	  </if>
	  <else>
		<text macro="bb-code-first"/>
	  </else>
	</choose>
  </macro>
  <macro name="bb-legislation-subsequent">
	<choose>
	  <if variable="container-title">
		<text macro="bb-statute-subsequent"/>
	  </if>
	  <else>
		<text macro="bb-code-subsequent"/>
	  </else>
	</choose>
  </macro>
  <macro name="bb-statute-first">
	<group delimiter=", ">
	  <text variable="title"/>
	  <text macro="bb-statute-subsequent"/>
	</group>
  </macro>
  <macro name="bb-statute-subsequent">
   <group delimiter=" ">
	<group delimiter="">
	  <group delimiter=" ">
		<number variable="volume"/>
		<text variable="container-title"/>
		<number variable="number"/>
		<number variable="page"/>
		<choose>
		  <if is-numeric="section">
			<text term="section" form="symbol"/>
			<text variable="section"/>
		  </if>
		</choose>
	  </group>
	  <text macro="bb-point-locator-comma"/>
     </group>
	 <date prefix="(" variable="issued" date-parts="year" form="text" suffix=")"/>
	</group>
  </macro>
  <macro name="bb-code-first">
	<group delimiter=" ">
	  <text variable="title" font-variant="small-caps"/>
	  <group delimiter=" ">
		<label variable="locator" form="symbol"/>
		<text variable="locator"/>
	  </group>
	</group>
  </macro>
  <macro name="bb-code-subsequent">
	<group delimiter=" ">
	  <text variable="title" form="short" font-variant="small-caps"/>
	  <group delimiter=" ">
		<label variable="locator" form="symbol"/>
		<text variable="locator"/>
	  </group>
	</group>
  </macro>
  <macro name="bb-book">
	<choose>
	  <if position="first">
		<text macro="bb-book-first"/>
	  </if>
	  <else-if position="ibid">
		<text macro="bb-ibid"/>
	  </else-if>
	  <else-if position="subsequent">
		<text macro="bb-book-subsequent"/>
	  </else-if>
	</choose>
  </macro>
  <macro name="bb-book-first">
    <group delimiter=" ">
	<group delimiter=", ">
	  <text macro="bb-author" font-variant="small-caps"/>
	  <group delimiter=" ">
		<text variable="title" font-variant="small-caps"/>
		<group delimiter=" ">
		  <choose>
			<if locator="page" match="none">
			  <label variable="locator" form="symbol"/>
			</if>
		  </choose>
		  <text variable="locator"/>
		</group>
		<text macro="bb-issued"/>
	  </group>
	</group>
    <text variable="references" prefix="[" suffix="]"/>
    </group>
  </macro>
  <macro name="bb-book-subsequent">
    <group delimiter=", ">
	  <text macro="bb-author-short" font-variant="small-caps"/>
	  <choose>
		<if disambiguate="true">
		  <text variable="title" font-variant="small-caps"/>
		</if>
	  </choose>
	  <group delimiter="">
		<group delimiter=" ">
		  <text value="supra" font-style="italic"/>
		  <choose>
			<if variable="first-reference-note-number">
			  <text value="note"/>
			  <text variable="first-reference-note-number"/>
			</if>
		  </choose>
		</group>
		<group delimiter=" ">
		  <choose>
			<if locator="page">
			  <text value=","/>
			  <text value="at"/>
			</if>
			<else>
			  <label variable="locator"/>
			</else>
		  </choose>
		  <text variable="locator"/>
		</group>
	  </group>
	</group>
  </macro>
  <macro name="bb-periodical">
	<choose>
	  <if position="first">
		<text macro="bb-periodical-first"/>
	  </if>
	  <else-if position="ibid">
		<text term="ibid" font-style="italic"/>
	  </else-if>
	  <else-if position="subsequent">
		<text macro="bb-periodical-subsequent"/>
	  </else-if>
	</choose>
  </macro>
  <macro name="bb-periodical-first">
	<group delimiter=" ">
	  <group delimiter=", ">
		<names variable="author">
		  <name/>
		</names>
		<text variable="title" font-style="italic"/>
		<group delimiter=" ">
		  <number variable="volume"/>
		  <text variable="container-title" form="short" font-variant="small-caps"/>
		  <number variable="page-first"/>
		</group>
	  </group>
	  <text macro="bb-issued"/>
	</group>
  </macro>
  <macro name="bb-periodical-subsequent">
	<text value="bb-periodical-subsequent"/>
  </macro>
  <citation
         near-note-distance="5"
         et-al-min="2"
         et-al-subsequent-min="4"
         et-al-subsequent-use-first="2"
         et-al-use-first="1">
    <layout delimiter="; " suffix=".">
      <choose>
        <if type="legal_case">
          <text macro="bb-legal-case"/>
        </if>
		<else-if type="legislation">
		  <text macro="bb-legislation"/>
		</else-if>
		<else-if type="book" match="any">
		  <text macro="bb-book"/>
		</else-if>
        <else>
		  <text macro="bb-periodical"/>
		</else>
	  </choose>
    </layout>
  </citation>
</style>
<<===== CSL =====<<


>>===== INPUT =====>>
[
    {
        "author": [
            {
                "family": "Smith", 
                "given": "John"
            }
        ], 
        "id": "ITEM-1", 
        "issued": {
            "date-parts": [
                [
                    "1990"
                ]
            ]
        }, 
        "title": "First Book", 
        "type": "book"
    },
    {
        "author": [
            {
                "family": "Brown", 
                "given": "John"
            }
        ], 
        "id": "ITEM-2", 
        "issued": {
            "date-parts": [
                [
                    "2010"
                ]
            ]
        }, 
        "title": "Second Book", 
        "type": "book"
    },
    {
        "author": [
            {
                "family": "Green", 
                "given": "John"
            }
        ], 
        "id": "ITEM-3", 
        "issued": {
            "date-parts": [
                [
                    "2010"
                ]
            ]
        }, 
        "title": "Third Book", 
        "type": "book"
    }
]
<<===== INPUT =====<<
