Biểu ngữ

Sử dụng BallotSelection để xác định các lựa chọn trong 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 nó với 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 bị hỏng và phiếu bầu "không có lựa chọn nào ở trên").

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

Phần tử

Bảng sau đây mô tả các phần tử của 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 đáng chú ý hay không. Hệ thống sẽ 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 biện pháp trong phiếu bầu. Bạn phải có một giá trị nhận dạng ổn định ổn định.
Selection 1 InternationalizedText Cung cấp tên cho lựa chọn trong phiếu bầu này, 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="sbs-3">
      <Selection>
        <Text language="en">Other Candidates</Text>
      </Selection>
      <ExternalIdentifiers>
        <ExternalIdentifier>
          <Type>other</Type>
          <OtherType>stable</OtherType>
          <Value>sbs-3</Value>
        </ExternalIdentifier>
      </ExternalIdentifiers>
    </AggregateBallotSelection>
    <!-- Counts of ballots left blank -->
    <BlankBallotSelection objectId="sbs-4">
      <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>sbs-4</Value>
        </ExternalIdentifier>
      </ExternalIdentifiers>
    </BlankBallotSelection>
    <!-- Votes for "None of the above" option on the ballot -->
    <NoneOfTheAboveBallotSelection objectId="sbs-5">
      <!--
        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>sbs-5</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="sbs-6">
      <!--
        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>sbs-6</Value>
        </ExternalIdentifier>
      </ExternalIdentifiers>
    </NullBallotSelection>