ใช้ BallotSelection เพื่อระบุตัวเลือกในบัตรลงคะแนนในการแข่งขัน เช่น
เมื่อคุณลิงก์ผู้สมัครรับเลือกตั้งและพรรคการเมืองกับจำนวนคะแนนเสียง
เอกสารนี้จะกล่าวถึง BallotSelection และเอนทิตีย่อยของ BallotSelection ดังนี้
BallotSelectionCandidateSelectionPartySelectionBallotMeasureSelectionSpecialBallotSelection
เลือกประเภทฟีดต่อไปนี้เพื่อดูข้อมูลเพิ่มเติมเกี่ยวกับวิธีใช้
BallotSelection และองค์ประกอบที่มีอยู่ในฟีดประเภทนั้น
BallotSelection
BallotSelection เป็นองค์ประกอบนามธรรมที่มี 3 ประเภทซึ่งใช้ตาม
ประเภทการแข่งขัน
CandidateSelection: ใช้typeของBallotSelectionนี้เมื่อการแข่งขันมีผู้สมัครรับเลือกตั้งตั้งแต่ 1 คนขึ้นไป โดยจะลิงก์ การเลือกบัตรลงคะแนนกับองค์ประกอบCandidatePartySelection: ใช้typeนี้จากBallotSelectionเมื่อประเภทการแข่งขันเป็นPartyเช่น การแข่งขันแบบสัดส่วนของพรรคBallotMeasureSelection: ใช้BallotSelectionประเภทนี้เพื่อแสดงตัวเลือกที่เป็นไปได้ในBallotMeasureContestSpecialBallotSelection:BallotSelectionประเภทนี้ใช้สำหรับการรวบรวมจำนวนคะแนน (เช่น การรวบรวมผู้สมัครหลายคนเป็น "อื่นๆ") และคะแนนประเภทต่างๆ ที่ไม่ใช่คะแนน (เช่น บัตรลงคะแนนเปล่า บัตรลงคะแนนที่ไม่มีผลหรือบัตรลงคะแนนที่เสีย และคะแนน "ไม่มีตัวเลือกที่กล่าวมาข้างต้น")
Attributes
ตารางต่อไปนี้อธิบายแอตทริบิวต์สำหรับ BallotSelection
| แอตทริบิวต์ | จำเป็นหรือไม่ | ประเภท | คำอธิบาย |
|---|---|---|---|
objectId
|
ต้องระบุ | ID |
ตัวระบุภายในที่ไม่ซ้ำกันซึ่งองค์ประกอบอื่นๆ ใช้เพื่ออ้างอิงถึง องค์ประกอบนี้ |
องค์ประกอบ
ตารางต่อไปนี้จะอธิบายองค์ประกอบสำหรับ BallotSelection
| องค์ประกอบ | ความหลากหลาย | ประเภท | คำอธิบาย |
|---|---|---|---|
SequenceOrder |
0 หรือ 1 | integer |
ระบุลำดับเริ่มต้นสำหรับการเลือกบัตรลงคะแนนเพื่อวัตถุประสงค์ในการแสดง หากไม่มี |
CandidateSelection
ใช้ CandidateSelection เพื่อระบุตัวเลือกในบัตรเลือกตั้งในการแข่งขันของผู้สมัครรับเลือกตั้ง รวมถึงผู้สมัครรับเลือกตั้งที่เขียนชื่อลงในบัตร
CandidateSelection จะรับค่าแอตทริบิวต์
และองค์ประกอบของ BallotSelection คุณอาจรวมการอ้างอิงถึงองค์ประกอบ Candidate หลายรายการได้หากจำเป็น เช่น เมื่อเลือกบัตรลงคะแนนสำหรับตั๋วที่มีผู้สมัครรับเลือกตั้งหลายคน
เมื่อมีการอ้างอิงผู้สมัครหลายคนสำหรับบัตร บางครั้งการรักษาลำดับของผู้สมัครก็เป็นสิ่งสำคัญ ในกรณีเหล่านี้ เราคาดหวังให้แอปพลิเคชันที่สร้างระบุการอ้างอิงถึงองค์ประกอบ Candidate ภายใน CandidateIds ตามรูปแบบการจัดลำดับที่มีอยู่ เช่น ลำดับของผู้สมัครจะต้องตรงกับลำดับเดียวกันของการอ้างอิงองค์ประกอบ Office ภายใน OfficeIds ใน Contest ของประเภท CandidateContest
หากมีการอ้างอิงออบเจ็กต์ Candidate มากกว่า 1 รายการ ระบบจะแสดงออบเจ็กต์ต่อผู้ใช้
ตามลำดับต่อไปนี้
- ระบบจะจัดลำดับผู้สมัครที่มี
IsTopTicketตั้งค่าเป็นtrueก่อนผู้สมัครทั้งหมดที่ไม่มีค่าIsTopTicketและจะมีการจัดลำดับก่อนผู้สมัครรับเลือกตั้งทั้งหมดที่มีIsTopTicketตั้งค่าเป็นfalseในอุดมคติแล้ว การเลือก จะตั้งค่าโดยมีผู้สมัครรับเลือก 1 คนที่ไม่มีค่าIsTopTicketหรือมี ผู้สมัครรับเลือก 2 คน และคนใดคนหนึ่งมีค่าIsTopTicketเป็นtrueหากไม่เป็นไปตามเงื่อนไขเหล่านี้ จะเกิดสิ่งต่อไปนี้- ตัวเลือกทั้งหมดที่มี
IsTopTicketตั้งค่าเป็นtrueจะแสดงตาม ลำดับที่ไม่ได้กำหนด - ผู้สมัครทั้งหมดที่
IsTopTicketไม่ได้ระบุจะแสดงตาม ลำดับที่ไม่ได้กำหนด - ตัวเลือกทั้งหมดที่มี
IsTopTicketตั้งค่าเป็นfalseจะแสดงตามลำดับ undefined
- ตัวเลือกทั้งหมดที่มี
ไวยากรณ์ XML สำหรับ CandidateSelection มีดังนี้
<BallotSelection xsi:type="CandidateSelection">
องค์ประกอบ
ตารางต่อไปนี้จะอธิบายองค์ประกอบสำหรับ CandidateSelection
| องค์ประกอบ | ความหลากหลาย | ประเภท | คำอธิบาย |
|---|---|---|---|
CandidateIds |
1 | IDREFS |
ตัวระบุที่ไม่ซ้ำกันสำหรับองค์ประกอบ
Candidate
อย่างน้อย 1 รายการ ใช้เพื่อเชื่อมโยงผู้สมัครรับเลือกตั้งกับการเลือกผู้สมัครรับเลือกตั้งใน
บัตรเลือกตั้ง นอกจากนี้ ยังมีประโยชน์เมื่อมีการเลือกผู้สมัครหลายคนในบัตรเลือกตั้ง เช่น บัตรเลือกตั้งที่มีการเลือกประธานาธิบดีและรองประธานาธิบดีพร้อมกัน |
EndorsementPartyIds |
0 ขึ้นไป | IDREFS |
ตัวระบุที่ไม่ซ้ำกันสำหรับเอนทิตี Party ตั้งแต่ 2 รายการขึ้นไป
ซึ่งแสดงถึงข้อตกลงที่พรรคการเมืองระบุชื่อผู้สมัครรับเลือกตั้งคนเดียวกันในบัตรเลือกตั้ง
|
IncludedInAggregation |
0 หรือ 1 | boolean |
รวมคะแนนโหวตของตัวเลือกไว้ในAggregateBallotSelectionสำหรับการแข่งขันหรือไม่ ระบบจะถือว่าเป็น
false หากไม่ได้ระบุ
|
IsWriteIn |
0 หรือ 1 | boolean |
ระบุว่าผู้สมัครเป็นผู้สมัครรับเลือกตั้งที่ได้คะแนนเสียงจากการเขียนชื่อลงในบัตรเลือกตั้งหรือไม่ ค่าเริ่มต้นคือ
false |
ตัวอย่าง
XML
<BallotSelection objectId="cs10861" xsi:type="CandidateSelection"> <CandidateIds>can10861a can10861b</CandidateIds> </BallotSelection>
JSON
"BallotSelection": [ { "@type": "CandidateSelection", "objectId": "cs10861", "CandidateIds": [ "can10861a", "can10861b" ] } ]
PartySelection
ใช้ PartySelection เพื่อระบุตัวเลือกในบัตรลงคะแนนที่เกี่ยวข้องกับพรรคการเมือง เช่น
การเลือกรายชื่อพรรคการเมืองในบัตรลงคะแนน
PartySelection จะรับค่าแอตทริบิวต์และองค์ประกอบของ BallotSelection ไวยากรณ์ XML สำหรับ PartySelection มีดังนี้
<BallotSelection xsi:type="PartySelection" ... />
องค์ประกอบ
ตารางต่อไปนี้จะอธิบายองค์ประกอบสำหรับ PartySelection
| องค์ประกอบ | ความหลากหลาย | ประเภท | คำอธิบาย |
|---|---|---|---|
IncludedInAggregation |
0 หรือ 1 | boolean |
รวมคะแนนโหวตของตัวเลือกไว้ในAggregateBallotSelectionสำหรับการแข่งขันหรือไม่ ระบบจะถือว่าเป็น
false หากไม่ได้ระบุ
|
PartyIds |
1 | IDREFS |
ตัวระบุที่ไม่ซ้ำกันสำหรับองค์ประกอบ
Party
อย่างน้อย 1 รายการ ใช้เพื่อเชื่อมโยงบุคคลอย่างน้อย 1 คนกับบุคคลที่เลือก
|
ตัวอย่าง
XML
<BallotSelection objectId="ps150" xsi:type="PartySelection"> <PartyIds>par100</PartyIds> </BallotSelection>
JSON
"BallotSelection": [ { "@type": "PartySelection", "objectId": "ps150", "PartyIds": [ "par100" ] } ]
BallotMeasureSelection
ใช้ BallotMeasureSelection เพื่อระบุการเลือกบัตรลงคะแนนที่เกี่ยวข้องกับ
มาตรการลงคะแนน เช่น การลงประชามติ
BallotMeasureSelection จะรับค่าแอตทริบิวต์และองค์ประกอบของ
BallotSelection ไวยากรณ์ XML สำหรับ BallotMeasureSelection มีดังนี้
<BallotSelection xsi:type="BallotMeasureSelection" ... />
องค์ประกอบ
ตารางต่อไปนี้จะอธิบายองค์ประกอบสำหรับ BallotMeasureSelection
| องค์ประกอบ | ความหลากหลาย | ประเภท | คำอธิบาย |
|---|---|---|---|
ExternalIdentifiers |
0 หรือ 1 | ExternalIdentifiers |
เชื่อมโยงรหัสกับการเลือกมาตรการลงคะแนน ต้องมี ตัวระบุที่เสถียร |
Selection |
1 | InternationalizedText |
ระบุตัวเลือกที่มีให้สำหรับบัตรลงคะแนน เช่น Yes
หรือ No |
ตัวอย่าง
XML
<BallotSelection objectId="bms00" xsi:type="BallotMeasureSelection"> <ExternalIdentifiers> <ExternalIdentifier> <Type>other</Type> <OtherType>stable</OtherType> <Value>bmc0_yes</Value> </ExternalIdentifier> </ExternalIdentifiers> <Selection> <Text language="en">Yes</Text> </Selection> </BallotSelection>
JSON
"BallotSelection": [ { "@type": "BallotMeasureSelection", "objectId": "bms00", "ExternalIdentifiers": { "ExternalIdentifier" : [ { "Type": "other", "OtherType": "stable", "Value": "bmc0_yes" } ] }, "Selection": { "Text": [ { "value": "Yes", "language": "en" } ] } } ]
XML
<BallotSelection objectId="bms00" xsi:type="BallotMeasureSelection"> <ExternalIdentifiers> <ExternalIdentifier> <Type>other</Type> <OtherType>stable</OtherType> <Value>bmc0_yes</Value> </ExternalIdentifier> </ExternalIdentifiers> <Selection> <Text language="en">Yes</Text> </Selection> </BallotSelection>
JSON
"BallotSelection": [ { "@type": "BallotMeasureSelection", "objectId": "bms00", "ExternalIdentifiers": { "ExternalIdentifier" : [ { "Type": "other", "OtherType": "stable", "Value": "bmc0_yes" } ] }, "Selection": { "Text": [ { "value": "Yes", "language": "en" } ] } } ]
SpecialBallotSelection
BallotSelectionประเภทนี้ใช้สำหรับการรวบรวมจำนวนคะแนนเสียง (เช่น
การรวบรวมผู้สมัครรับเลือกตั้งหลายคนเป็น "อื่นๆ") และคะแนนเสียงประเภทต่างๆ ที่ไม่ใช่คะแนนเสียง
(เช่น บัตรลงคะแนนเปล่า บัตรลงคะแนนที่เป็นโมฆะหรือบัตรลงคะแนนที่เสีย และคะแนนเสียง "ไม่มีตัวเลือกข้างต้น")
ไม่ควรใช้ SpecialBallotSelection ในองค์ประกอบย่อย BallotSelection
ทั่วไปของ Contest แต่ควรมีฟิลด์ที่แตกต่างกันของตัวเองใน Contest
ได้แก่ AggregateBallotSelection, BlankBallotSelection, NoneOfTheAboveBallotSelection และ NullBallotSelection ดูรายละเอียดเพิ่มเติมได้ที่
Contest elements
องค์ประกอบ
ตารางต่อไปนี้จะอธิบายองค์ประกอบสำหรับ SpecialBallotSelection
| องค์ประกอบ | ความหลากหลาย | ประเภท | คำอธิบาย |
|---|---|---|---|
CountedInTotal |
0 หรือ 1 | boolean |
ไม่ว่าจะนับคะแนนโหวตของการเลือกเอนทิตีในคะแนนโหวตทั้งหมด
ที่ถือว่าน่าสนใจหรือไม่ ระบบจะถือว่าเป็น true หากไม่ได้ระบุ
|
ExternalIdentifiers |
0 หรือ 1 | ExternalIdentifiers |
เชื่อมโยงรหัสกับการเลือกมาตรการลงคะแนน ต้องมี ตัวระบุที่เสถียร |
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" } } }