seboettg / citeproc-php

Full-featured CSL 1.0.1 processor for PHP
MIT License
75 stars 39 forks source link

Match "any" not working in Variable #69

Closed ghost closed 4 years ago

ghost commented 4 years ago

Bug reports:

Unlike, for example, the constraint Type(.php), which supports something like

<else-if type="bill book graphic legislation motion_picture report song" match="any">

the constraint Variable(.php) does not support something like

<else-if variable="publisher-place publisher" match="any">

... and from what I understand in http://docs.citationstyles.org/en/stable/specification.html#choose (near the end of this section) it should ->

With the exception of disambiguate, all conditions allow for multiple test values (separated with spaces, e.g. “book thesis”).

Used CSL stylesheet:

modern-humanities-research-association.csl

Used CSL metadata

[{
   "id":"7021352\/UTSP92QZ",
   "type":"book",
   "title":"Early Sixteenth-Century Sacred Music from the Papal Chapel",
   "collection-title":"Corpus Mensurabilis Musicae",
   "collection-number":"95-2",
   "publisher":"American Institute of Musicology, Ha\u0308nssler-Verlag",
   "publisher-place":"Neuhausen-Stuttgart",
   "volume":"II",
   "event-place":"Neuhausen-Stuttgart",
   "language":"en",
   "editor":[
      {
         "family":"Josephson",
         "given":"Nors S."
      }
   ],
   "issued":{
      "date-parts":[
         [
            1982
         ]
      ]
   }
}]
seboettg commented 4 years ago

Hi @tiago-sb Nice catch... Thank you for finding this and yes, you're absolutely right with this issue. I'm wondering a bit why nobody noticed this before. Anyhow, I'm going to fix it soon.

seboettg commented 4 years ago

Hi @tiago-sb, I fixed this issue and also #70 and #71. I will prepare a new release soon. If you are curious, you are welcome to checkout the master branch for some tests.

ghost commented 4 years ago

Hi Sebastian,

That is great news, thanks! I’ll test the master branch later today or tomorrow and will let you know how it goes.

Thanks again for this great tool and for the quick response.

Tiago

On 28 Oct 2019, at 11:17, Sebastian Böttger notifications@github.com wrote:

 Hi @tiago-sb, I fixed this issue and also #70 and #71. I will prepare a new release soon. If you are curious, you are welcome to checkout the master branch for some tests.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

ghost commented 4 years ago

Hi @seboettg,

tested with master branch and this fix is working as expected, at least for the scenario of this issue :)

Thanks