OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

election-services message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: RE: BML - first cut discussion document


Title: BML - first cut discussion document
Gregg,
My experience shows that when trying to define a structured token, such as a ballot, semantics are of much higher importance than the notation used to express them. Therefore we should probably start by describing "what" goes into a token, and only after that start thinking about the actual tags and identifiers. Tags/IDs are easy and will come rather natural, once you know what they are to contain.
 
Doing it another way - i.e. by hacking an XML/XSL before there is an agreement on the content, would be simply wrong and wasteful, IMHO.
 
And another one - should we be using xml schemas (XSD) instead of DTDs? In addition to the obvious advantages offered by the schemas, I found them being a much greater presentation tool (using XMLSpy).
 
Best regards
Michael
-----Original Message-----
From: McGilvray, Gregg [mailto:gregg@election.com]
Sent: Tuesday, 12 June 2001 8:45
To: Election Services Committee (E-mail)
Subject: 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 )>




This footnote confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


-----------------------------------------------------------------------------------------------------------------
"How can I make sure the right people get access to the right resources
and business applications, with a user base that's constantly growing and
changing?"
The answer...
Baltimore SelectAccess
Next Generation Authorisation Management
http://www.baltimore.com/selectaccess/index.html
-----------------------------------------------------------------------------------------------------------------
The information contained in this message is confidential and is intended
for the addressee(s) only. If you have received this message in error or
there are any problems please notify the originator immediately. The
unauthorized use, disclosure, copying or alteration of this message is
strictly forbidden. Baltimore Technologies plc will not be liable for direct,
special, indirect or consequential damages arising from alteration of the
contents of this message by a third party or as a result of any virus being
passed on.

In addition, certain Marketing collateral may be added from time to time to
promote Baltimore Technologies products, services, Global e-Security or
appearance at trade shows and conferences.

This footnote confirms that this email message has been swept by
Baltimore MIMEsweeper for Content Security threats, including
computer viruses.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC