選擇球

使用 BallotSelection 識別選舉中的選票選項,例如將候選人和政黨連結至得票數。

本文將討論 BallotSelection 及其子實體:

  • BallotSelection
    • CandidateSelection
    • PartySelection
    • BallotMeasureSelection
    • SpecialBallotSelection

選取下列其中一種動態饋給類型,進一步瞭解如何使用BallotSelection,以及該類型動態饋給的固有元素。


SpecialBallotSelection

這類 BallotSelection 用於彙整票數 (例如將多位候選人彙整為「其他」),以及各種非選票 (即空白選票、無效或廢票,以及「以上皆非」票)。

SpecialBallotSelection 不應在 Contest 的一般 BallotSelection 子元素中使用,而應在 Contest 上有自己的專屬欄位,即 AggregateBallotSelectionBlankBallotSelectionNoneOfTheAboveBallotSelectionNullBallotSelection。詳情請參閱Contest 元素

元素

下表說明 SpecialBallotSelection 的元素:

元素 多重性 類型 說明
CountedInTotal 0 或 1 boolean 實體選取項目的票數是否計入總票數,並視為值得注意。如未指定,則假設為 true
ExternalIdentifiers 0 或 1 ExternalIdentifiers 將 ID 與投票議案選項建立關聯。必須提供穩定 ID
Selection 1 InternationalizedText 提供這項選票選項的名稱,例如「其他」或「以上皆非」。

範例

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"
        }
      }
    }