TypeError: CSL.Attributes[attrname] is undefined

TypeError: CSL.Attributes[attrname] is undefined

我对一些引文样式语言有点头疼。 Zotero 最近进行了更新,在更正了由此产生的错误(CSL 已更新到版本 1.0.1)并在 CSL Validator 中获得绿灯后,我收到了 Zotero 错误:TypeError: CSL.Attributes[attrname] is undefined

有人知道怎么解决吗?

尝试报告错误时,我收到 [JavaScript 错误:"CSL.Attributes[attrname] is undefined" {文件:"chrome://zotero/content/xpcom/citeproc.js" 行: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>

错误是 xml:style 中的 xmlns:lang="sp"。删除它即可。