Creating a Simple Document

There are two ways to start to make your own citation style. One is to start from scratch, and the other is to find an existing style from the Zotero style repository and save it to your working directory. Then open the document with your editor of choice.

Of course, it helps to use an existing style sheet that closely resembles the citation style you want to make (duh)! Most existing citation styles are quite elaborate and you may find it difficult to make sense of it. Here, I will start from scratch and point out the structure of the document. With this, hopefully the existing style sheets will be easier to understand.
The base structure of the document is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl"
  class="in-text" xml:lang="en" default-locale="en-US">
  
  <info>

   <title>My first style</title>
   <id>http://www.zotero.org/styles/my-style-name</id>
   <author>
     <name>My name</name>
     <email>my-address@wherever.com</email>
     <uri>http://wherever.com/</uri>
   </author>
   <category term="author-date"/>
   <category term="zoology"/>
   <updated>2008-10-29T21:01:24+00:00</updated>
   <summary>My great new style format.</summary>
   <rights>This work is licensed under a Creative Commons
         Attribution-Share Alike 3.0 Unported License
         http://creativecommons.org/licenses/by-sa/3.0/</rights>
  </info>
</style>
The base document consists of a preamble, which gives some general information about the document, and includes a pointer to a template. This template defines how fields as 'author', 'category', 'summary' are defined, which attributes are allowed, and so on. The 'info' field contains the information about the citation style that you want to develop.
As you can see, most of the elementary information is pretty straightforward. Most the fields can be adjusted accordingly. Only the 'category' field filled with 'zoology' is not freely adjustable, but restricted to a number of predefined fields. Details can be found here.

Change the attributes with your details, and save the results using a .csl extension, for instance test.csl.
Then you can validate your style sheet. Open the validator: The parser will validate your document and give invalid entries wherever appropriate. It will be clear that a lot of required fields are stll missing, so a few Required children missing from element errors will be given. Ignore these for now.

so far, the citation style does not contain any information on that what it is intended to do, that is to cite stuff. In order to do so, the style sheet needs to included information about citations (e.g. "According to Doe (Doe 1999)") and the bibliography (e.g. Doe, John (1999), "A History of Anonimity; A Personal Experience", Oxford University Press).
Extend your style sheet as follows:

<?xml version="1.0" encoding="UTF-8"?><style xmlns="http://purl.org/net/xbiblio/csl"
class="in-text" xml:lang="en" default-locale="en-US">

  <info>

    <title>My first style</title>
    <id>http://www.zotero.org/styles/my-style-name</id>
    <author>
      <name>My name</name>
      <email>my-address@wherever.com</email>
      <uri>http://wherever.com/</uri>
    </author>
    <category term="author-date"/>
    <category term="zoology"/>
    <updated>2008-10-29T21:01:24+00:00</updated>
    <summary>My great new style format.</summary>
    <rights>This work is licensed under a Creative Commons
         Attribution-Share Alike 3.0 Unported License
         http://creativecommons.org/licenses/by-sa/3.0/</rights>
  
  </info>
 
  <citation>
    <option />
    <layout>
      
    </layout>
  </citation>
  
  <bibliography>
    <option />
    <layout>
      
    </layout>
  </bibliography>
</style>

We can just as well fill in a few of the most used options while we're at it. The et. al options is very common and is used to to tell the system how many authors should maximally be listed before reverting to et. al.
In this exercise, we want to list maximally two authors in the citation and four in the bibliography.
Besides this, as starters we want a simple citation and a bibliography that lists author and title.
In order to achieve this, change the citation and bibliography as follows:
  <citation>
    <option name="et-al-min" value="3" />
    <layout>
      <names variable="author">
        <name font-weight="normal">
      </names>
     </layout>
  </citation>
  
  <bibliography>
    <option name="et-al-min" value="4" />
      <layout>
        <names variable="author">
          <name font-weight="normal">
        </names>
        <text variable="title">
     </layout>
  </bibliography>

With these changes, you should have your first citation style sheet that validates without problems. Don't worry about the 'name', 'names', 'text' and so on for now, these will be detailed later on. First see if everything is working ok: If all went well, you will something similar like the following:
  

Single Citations

Stanley H. Ambrose

Multi Citations

Stanley H. Ambrose

Bibliography

Stanley H. AmbrosePaleolithic Technology and Human Evolution
pre> It is still far from perfect, but you can already see that the citations are put nicely in braces, a comma (,) separates authors from dates and titles and that even pages are displayed nicely when an article is selected.
With this, a first simple citation style sheet has been made.
Home Next: Macros Citation Style Sheet (test_A.csl)