TypeError: CSL.Attributes [attrname] не определено - PullRequest
0 голосов
/ 12 октября 2018

Я немного расстроен каким-то языком цитирования.Zotero недавно обновился, и после исправления возникающих ошибок (CSL был обновлен до версии 1.0.1) и получения зеленого индикатора в CSL Validator, я получаю ошибку Zotero: TypeError: CSL.Attributes [attrname] не определено

Кто-нибудь знает, как решить эту проблему?

При попытке сообщить об ошибке я получаю [Ошибка JavaScript: "CSL.Attributes [attrname] не определено" {file: "chrome: // zotero /content / xpcom / citeproc.js "line: 2778}]

Вот код (имена были отредактированы до X, но больше ничего не трогалось)

<?xml version="1.0"?>
<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" class="note" xmlns:lang="sp">
  <info>
    <title>X</title>
    <author>
      <name>X Y</name>
      <email>X.Y@noos.fr</email>
    </author>
    <id>C:/Users/X/Documents/CSL/X_final.csl</id>
    <category field="law"/>
    <category field="science"/>
    <updated>2010-06-28T21:01:24+00:00</updated>
  </info>

    <macro name="arret">
        <text variable="title" suffix=" "/>
    <date variable="issued">
            <date-part name="day" suffix=" "/>
      <date-part name="month" suffix=" " text-case="lowercase"/>
      <date-part name="year" suffix=", "/>
    </date>
        <text variable="container-title"/>
    </macro>

    <macro name="editor-translator">
    <names variable="editor translator" delimiter=", ">
        <label form="verb"/>
        <name and="text" delimiter=", " prefix=" " delimiter-precedes-last="never"/>
    </names>
  </macro>

  <macro name="author">
    <choose>
    <if type="legal_case">
<names variable="author">
<name name-as-sort-order="all" form="long" delimiter=", " and="text"
initialize-with="." delimiter-precedes-last="never" sort-separator=" "
font-variant="normal"/>
<label form="short" prefix=" (" suffix=".)"/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text macro="title"/>
</substitute>
</names>
  </if>
</choose>
</macro>


    <macro name="author-bibliography">
    <choose>
      <if type="legal_case">
<names variable="author">
<name name-as-sort-order="all" form="long" delimiter=", " and="text"
initialize-with="." delimiter-precedes-last="never" sort-separator="  "
font-variant="normal"/>
<label form="short" prefix=" (" suffix=".)"/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text macro="title"/>
</substitute>
</names>
</if>
</choose>
</macro>


  <macro name="access">
    <group>
        <text term="accessed" suffix=" "/>
        <date variable="accessed" suffix=", ">
        <date-part name="day" suffix=" "/>
        <date-part name="month" suffix=" " text-case="lowercase"/>
        <date-part name="year"/>
      </date>
        <group>
                <text term="at" suffix=" "/>
            <text variable="URL"/>
        </group>
    </group>
  </macro>

  <macro name="title">
    <choose>
        <if type="book">
        <text variable="title" text-case="capitalize-first" font-style="italic"/>
      </if>
      <else>
        <text variable="title" text-case="capitalize-first" prefix="« " suffix=" »"/>
      </else>
    </choose>
  </macro>

  <macro name="title-short">
    <choose>
      <if type="book">
        <text variable="title" text-case="capitalize-first" font-style="italic" suffix=", op. cit." form="short"/>
      </if>
      <else>
        <text variable="title" text-case="capitalize-first" prefix="&#x201C;" suffix="&#x201D;, op. cit." form="short"/>
      </else>
    </choose>
  </macro>

  <macro name="publisher">
    <group delimiter=", ">
        <text variable="publisher-place"/>
      <text variable="publisher"/>
    </group>
  </macro>

  <citation et-al-min="6" et-al-use-first="1" et-al-subsequent-min="3" et-al-subsequent-use-first="1" collapse="year">
    <sort>
      <key variable="issued"/>
      <key macro="author"/>
    </sort>
    <layout suffix="" delimiter="; ">
      <choose>
        <if position="first">
          <choose>
            <if type="legal_case">
            <text macro="arret"/>
            </if>
            <else-if type="book">
              <group delimiter=", ">
                <text macro="author" font-variant="normal"/>
                <group delimiter=" ">
                  <text macro="title"/>
                </group>
                <group delimiter=" ">
                  <text term="volume" form="short" text-case="lowercase"/>
                  <text variable="volume"/>
                </group>
                <text variable="edition"/>
                <text macro="publisher"/>
                                <text variable="collection-title" prefix=" coll. «" suffix="»"/>
                <date variable="issued">
                  <date-part name="year"/>
                </date>
                <group>
                  <label variable="locator" form="short"/>
                  <text variable="locator" prefix=" "/>
                </group>
                <text macro="access"/>
              </group>
            </else-if>
            <else-if type="chapter">
                            <group delimiter=", ">
                <text macro="author" font-variant="normal"/>
                <text macro="title"/>
                <group delimiter=" ">
                  <text term="in"/>
                  <names variable="editor translator" suffix=" (dir.)" delimiter=", ">
                    <name sort-separator=", "/>
                  </names>
                  <text variable="container-title" font-style="italic"/>
                </group>
                <group delimiter=" ">
                  <text term="volume" form="short" text-case="lowercase"/>
                  <text variable="volume"/>
                </group>
                <text variable="edition"/>
                <text macro="publisher"/>
                <group>
                  <date variable="issued">
                    <date-part name="year"/>
                  </date>
                  <text variable="collection-title" prefix=" coll. «" suffix="»"/>
                </group>
                                <group>
                            <text variable="page"  prefix="p. "/>
                    </group>
                  <group>
                    <label variable="locator"  form="short"/>
                    <text variable="locator" prefix=" "/>
                  </group>
                <text macro="access"/>
                </group>
            </else-if>
            <else-if type="article">
              <group delimiter=", ">
                <text macro="author" font-variant="normal"/>
                <text macro="title"/>
                <text variable="container-title" font-style="italic"/>
                <group delimiter=" ">
                  <text term="volume" form="short"  text-case="lowercase"/>
                  <text variable="volume"/>
                </group>
                <text variable="issue"/>
                <date variable="issued">
                  <date-part name="year"/>
                </date>
                <text macro="editor-translator"/>
                <text variable="edition"/>
                <group delimiter=" ">
                  <text macro="publisher"/>
                  <text variable="collection-title" prefix=" coll. «" suffix="»"/>
                </group>
                <group>
                  <label variable="locator"  form="short"/>
                  <text variable="locator" prefix=" "/>
                                    <group>
                        <text variable="page"  prefix="p. "/>
                        </group>
                    <text macro="access"/>
                                </group>
              </group>
            </else-if>
            <else>
              <group delimiter=", ">
                <text macro="author" font-variant="normal"/>
                <text macro="title"/>
                <text macro="editor-translator" font-variant="normal"/>
                <group delimiter=", ">
                  <text variable="container-title" font-style="italic"/>
                  <group delimiter=" ">
                    <text term="volume" form="short"  text-case="lowercase"/>
                    <text variable="volume"/>
                  </group>
                  <text variable="issue"/>
                </group>
                <group>
                  <label variable="locator"  form="short"/>
                  <text variable="locator" prefix=" "/>
                </group>
              </group>
            </else>
          </choose>
        </if>
        <else-if position="ibid-with-locator">
          <group delimiter=", ">
            <text term="ibid" form="long" font-style="italic" text-case="capitalize-first"/>
            <group>
              <label variable="locator"  form="short"/>
              <text variable="locator" prefix=" "/>
            </group>
          </group>
        </else-if>
        <else-if position="ibid">
          <text term="ibid" form="long" font-style="italic" text-case="capitalize-first"/>
        </else-if>
        <else-if position="subsequent">
          <choose>
              <if type="legal_case">
            <text macro="arret"/>
                        </if>
            <else-if type="book">
              <group delimiter=", ">
                <text macro="author" font-variant="normal"/>
                <text macro="title-short"/>
                <group delimiter=" ">
                  <text term="volume" form="short"  text-case="lowercase"/>
                  <text variable="volume"/>
                </group>
                <group>
                  <label variable="locator"  form="short"/>
                  <text variable="locator" prefix=" "/>
                </group>
              </group>
            </else-if>
            <else>
              <group delimiter=", ">
                <text macro="author" font-variant="normal"/>
                <text macro="title-short"/>
                <group>
                  <label variable="locator"  form="short"/>
                  <text variable="locator" prefix=" "/>
                </group>
              </group>
            </else>
          </choose>
        </else-if>
      </choose>
    </layout>
  </citation>

  <bibliography hanging-indent="true" et-al-min="6" et-al-use-first="6">
    <sort>
            <key variable="issued"/>
      <key macro="author-bibliography"/>
      <key variable="title"/>
    </sort>
    <layout suffix=".">
      <choose>
      <if type="legal_case">
        <text macro="arret"/>
            </if>
            <else>
      <text macro="author-bibliography" suffix=", "/>
      <choose>
                <if type="book">
                  <group delimiter=", ">
            <group delimiter=" ">
              <text macro="title"/>
            </group>
            <group delimiter=" ">
              <text term="volume" form="short"  text-case="lowercase"/>
              <text variable="volume"/>
            </group>
            <text variable="edition"/>
            <text macro="publisher"/>
                        <text variable="collection-title" prefix=" coll. «" suffix="»"/>
            <date variable="issued">
              <date-part name="year"/>
            </date>
          </group>
        </if>
        <else-if type="chapter">
          <group delimiter=", ">
            <text macro="title"/>
            <group delimiter=" ">
              <text term="in"/>
              <names variable="editor translator" suffix=" (dir.)" delimiter=", ">
                <name sort-separator=", "/>
                </names>
              <text variable="container-title" font-style="italic"/>
            </group>
            <group delimiter=" ">
              <text term="volume" form="short"  text-case="lowercase"/>
              <text variable="volume"/>
            </group>
            <text variable="edition"/>
            <text macro="publisher"/>
            <group>
              <date variable="issued">
                <date-part name="year"/>
              </date>
              <text variable="collection-title" prefix=" coll. «" suffix="»"/>
            </group>
            <group>
                <text variable="page"  prefix="p. "/>
            </group>
          </group>
        </else-if>
        <else-if type="article">
          <group delimiter=", ">
            <text macro="title"/>
            <text variable="container-title" font-style="italic"/>
            <group delimiter=" ">
              <text term="volume" form="short"  text-case="lowercase"/>
              <text variable="volume"/>
            </group>
            <group delimiter=" ">
              <text term="issue" form="short"  text-case="lowercase"/>
              <text variable="issue"/>
            </group>
            <date variable="issued">
              <date-part name="year"/>
            </date>
            <text variable="edition"/>
            <group delimiter=" ">
              <text macro="publisher"/>
              <text variable="collection-title" prefix="(" suffix=")"/>
            </group>
            <group>
                            <text variable="page"  prefix="p. "/>
            </group>
          </group>
        </else-if>
                <else>
          <group delimiter=", ">
                <text macro="title"/>
            <text macro="editor-translator"/>
            <text variable="container-title" font-style="italic"/>
            <group delimiter=" ">
              <text term="volume" form="short" text-case="lowercase"/>
              <text variable="volume"/>
            </group>
            <group>
              <text term="issue" form="short" text-case="lowercase"/>
              <text variable="issue"/>
            </group>
            <group>
              <text variable="page"  prefix="p. "/>
            </group>
          </group>
        </else>
      </choose>
      <text prefix=", " macro="access"/>
            </else>
        </choose>
   </layout>
  </bibliography>
</style>

1 Ответ

0 голосов
/ 16 октября 2018

Ошибка: xmlns: lang = "sp" в стиле xml:Удалите это, и это работает.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...