Biểu ngữ

Sử dụng BallotSelection để xác định các lựa chọn trên phiếu bầu trong một cuộc tranh cử, chẳng hạn như khi bạn liên kết các ứng cử viên và đảng với số phiếu bầu của họ.

Tài liệu này thảo luận về BallotSelection và các thực thể phụ của nó:

  • BallotSelection
    • CandidateSelection
    • PartySelection
    • BallotMeasureSelection
    • SpecialBallotSelection

Chọn một trong các loại nguồn cấp dữ liệu sau để tìm hiểu thêm về cách sử dụng BallotSelection và các phần tử vốn có của loại nguồn cấp dữ liệu đó.


SpecialBallotSelection

Loại BallotSelection này được dùng để tổng hợp số phiếu bầu (ví dụ: tổng hợp nhiều ứng cử viên thành "Khác") và các loại phiếu không hợp lệ (tức là phiếu bầu trống, phiếu bầu vô hiệu hoặc phiếu bầu bị hỏng và phiếu bầu "không có lựa chọn nào ở trên").

SpecialBallotSelection không được dùng trong phần tử con BallotSelection chung của Contest mà thay vào đó có các trường riêng biệt trên Contest, cụ thể là AggregateBallotSelection, BlankBallotSelection, NoneOfTheAboveBallotSelectionNullBallotSelection. Hãy xem các phần tử Contest để biết thêm thông tin chi tiết.

Thành phần

Bảng sau đây mô tả các phần tử cho SpecialBallotSelection:

Phần tử Số bội Loại Mô tả
CountedInTotal 0 hoặc 1 boolean Liệu số phiếu bầu của lựa chọn thực thể có được tính vào tổng số phiếu bầu được coi là đáng chú ý hay không. Được giả định là true nếu bạn không chỉ định.
ExternalIdentifiers 0 hoặc 1 ExternalIdentifiers Liên kết một mã nhận dạng với lựa chọn về dự luật cần bỏ phiếu. Bạn phải có giá trị nhận dạng ổn định.
Selection 1 InternationalizedText Cung cấp tên cho lựa chọn này trong phiếu bầu, chẳng hạn như "Khác" hoặc "Không có lựa chọn nào ở trên".

Ví dụ

XML

    <AggregateBallotSelection objectId="selection3">
      <Selection>
        <Text language="en">Other Candidates</Text>
      </Selection>
      <ExternalIdentifiers>
        <ExternalIdentifier>
          <Type>other</Type>
          <OtherType>stable</OtherType>
          <Value>selection3</Value>
        </ExternalIdentifier>
      </ExternalIdentifiers>
    </AggregateBallotSelection>
    <!-- Counts of ballots left blank -->
    <BlankBallotSelection objectId="selection4">
      <Selection>
        <Text language="en">Blank ballots</Text>
      </Selection>
      <!-- These ballots count in the total and can affect majorities -->
      <CountedInTotal>true</CountedInTotal>
      <ExternalIdentifiers>
        <ExternalIdentifier>
          <Type>other</Type>
          <OtherType>stable</OtherType>
          <Value>selection4</Value>
        </ExternalIdentifier>
      </ExternalIdentifiers>
    </BlankBallotSelection>
    <!-- Votes for "None of the above" option on the ballot -->
    <NoneOfTheAboveBallotSelection objectId="selection5">
      <!--
        The NOTA selection optiona as it appears on the ballot, often
        "None of the above", "None", or "Uncommitted"
      -->
      <Selection>
        <Text language="en">None</Text>
      </Selection>
      <!-- These ballots count in the total and can affect majorities -->
      <CountedInTotal>true</CountedInTotal>
      <ExternalIdentifiers>
        <ExternalIdentifier>
          <Type>other</Type>
          <OtherType>stable</OtherType>
          <Value>selection5</Value>
        </ExternalIdentifier>
      </ExternalIdentifiers>
    </NoneOfTheAboveBallotSelection>
    <!--
      Counts of null or spoiled ballots, i.e. ballots that have been marked in
      a way that the vote cannot be counted
    -->
    <NullBallotSelection objectId="selection5">
      <!--
        How these ballots are often called in a given country, often
        "null" or "spoiled"
      -->
      <Selection>
        <Text language="en">Spoiled ballots</Text>
      </Selection>
      <!--
        These ballots do count in the total and are treated as the same as
        if this vote did not happen at all
      -->
      <CountedInTotal>false</CountedInTotal>
      <ExternalIdentifiers>
        <ExternalIdentifier>
          <Type>other</Type>
          <OtherType>stable</OtherType>
          <Value>selection5</Value>
        </ExternalIdentifier>
      </ExternalIdentifiers>
    </NullBallotSelection>
      

JSON

    "AggregateBallotSelection": {
      "objectId": "selection3",
      "Selection": {
        "Text": {
          "@language": "en",
          "#text": "Other Candidates"
        }
      },
      "ExternalIdentifiers": {
        "ExternalIdentifier": {
          "Type": "other",
          "OtherType": "stable",
          "Value": "selection3"
        }
      },
    },
    "BlankBallotSelection": {
      "objectId": "selection4",
      "Selection": {
        "Text": {
          "@language": "en",
          "#text": "Blank Ballots"
        }
      },
      "CountedInTotal": true,
      "ExternalIdentifiers": {
        "ExternalIdentifier": {
          "Type": "other",
          "OtherType": "stable",
          "Value": "selection4"
        }
      }
    },
    "NoneOfTheAboveBallotSelection": {
      "objectId": "selection5",
      "Selection": {
        "Text": {
          "@language": "en",
          "#text": "None"
        }
      },
      "CountedInTotal": true,
      "ExternalIdentifiers": {
        "ExternalIdentifier": {
          "Type": "other",
          "OtherType": "stable",
          "Value": "selection5"
        }
      }
    },
    "NullBallotSelection": {
      "objectId": "selection5",
      "Selection": {
        "Text": {
          "@language": "en",
          "#text": "Spoiled ballots"
        }
      },
      "CountedInTotal": false,
      "ExternalIdentifiers": {
        "ExternalIdentifier": {
          "Type": "other",
          "OtherType": "stable",
          "Value": "selection5"
        }
      }
    }