| From | Sent On | Attachments |
|---|---|---|
| McGilvray, Gregg | Jun 11, 2001 3:47 pm | |
| Michael Zolotarev | Jun 12, 2001 12:12 am | |
| Tim Bovee | Jun 12, 2001 6:58 am |
| Subject: | BML - first cut discussion document | |
|---|---|---|
| From: | McGilvray, Gregg (gre...@election.com) | |
| Date: | Jun 11, 2001 3:47:23 pm | |
| List: | org.oasis-open.lists.election-services | |
Title: BML - first cut discussion document
Here is a first cut for the Ballot Markup Language (BML). There is a sample XML, DTD, and XSL file at the end. The sylesheet ballot.xsl will display a simple ballot in HTML format. If you create separate files for each of them with the proper names you may try to open ballot.xml in an XML compliant browser. I used IE 5.5 to view the results.
Please use this as a starting point for discussions about how to start the development and approval of the EML standard. This is not a comprehensive description and will need to be embellished. We will formalize the document as we go along.
I used a DTD for this example which is not to imply that DTD's will be used instead of schemas. I also used only elements in favor of attributes which does not necessarily mean it is the best method.
A few definitions:
The term ITEM is meant to represent the thing voted upon whether it is an office, position-elect or referendum. This is a very generic term and can be replaced if necessary. The term SELECTION refers to the candidate, answer, etc which is the option or choice for election. Each ballot has a unique ID as do the ITEMS and SELECTIONS. The VOTELIMIT defines the number of vacancies to be filled in that particulat ITEM. The UNDERVOTE element indicates whether it is allowable to vote for fewer than the allowable SELECTIONS. The WRITEIN element describes the number of write in candidates allowed. The ITEM_TYPE element describes the type of ITEM (such as first-past-the-post, plurality, proportional vote, etc.) and will need to be discussed further.
Structure:
Each ballot will be enclosed with the tags <ballot>...</ballot>. The ballot has a description (such as Nassau County, ED1,SD1) and a unique number. There are as many <item>...</item> pairs as there are offices to be voted upon. Each has a unique number, a description, an ID which describes the voting characteristics of this ITEM, the number of vacancies (VOTELIMIT), whether the number of selections may be less than the number to be voted upon, and if write in votes are accepted. There will be a number of <selection>...</selection> pairs as there are candidates (selections) running for that office. Each SELECTION has a unique number and description.
This structure will generically accommodate a large number of eletion possibilities.
Ballot.xml
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="ballot.xsl"?> <!DOCTYPE ballot SYSTEM "ballot.dtd"> <ballot> <ballot_id>1</ballot_id> <ballot_description>US Election 2000 Test</ballot_description> <item> <item_id>1</item_id> <item_type>1</item_type> <item_description>President of the United States</item_description> <votelimit>1</votelimit> <undervote>Y</undervote> <writeins>0</writeins> <selection> <selection_id>10</selection_id> <selection_description>Al Gore</selection_description> </selection> <selection> <selection_id>11</selection_id> <selection_description>George W. Bush</selection_description> </selection> </item> </ballot>
Ballot.xsl
<?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <html> <H1><CENTER><xsl:value-of select="/ballot/ballot_description"/></CENTER></H1> <body bgcolor = "TEAL"> <table border="2" bgcolor="yellow"> <xsl:for-each select="/ballot/item"> <tr> <th> <xsl:value-of select="item_description"/> </th> </tr> <xsl:for-each select="/ballot/item/selection"> <tr> <th> <xsl:value-of select="selection_description"/> </th> </tr> </xsl:for-each> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet>
Ballot.dtd
<!ELEMENT ballot (ballot_id , ballot_description , item+ )>
<!ELEMENT ballot_id (#PCDATA )>
<!ELEMENT ballot_description (#PCDATA )>
<!ELEMENT item (item_id , item_type , item_input_type , item_description , votelimit , undervote , writeins , selection+ )>
<!ELEMENT item_id (#PCDATA )>
<!ELEMENT item_type (#PCDATA )>
<!ELEMENT item_input_type (#PCDATA )>
<!ELEMENT item_description (#PCDATA )>
<!ELEMENT votelimit (#PCDATA )>
<!ELEMENT undervote (#PCDATA )>
<!ELEMENT writeins (#PCDATA )>
<!ELEMENT selection (selection_id , selection_description )>
<!ELEMENT selection_id (#PCDATA )>
<!ELEMENT selection_description (#PCDATA )>





