Hi,
This is achievable by adding several additional lines of code into your xml schema.
Firstly, you need to advise the schema that that primary key will not be auto generated.
If you look at an out of the box schema (such as nms:recipient) you will notice this line of xml:
<element autopk="true"
In order to use your own primary key, you can add:
<element autopk="false"
So for example in my custom schema that I can create with my own primary key being generated: my line of code would look like this:
<element autopk="false" label="PK Demo" name="pkDemo">
Then, I just need to tell the schema which attribute would now become the primary key. So this is the attribute that i will use as my PK:
<attribute label="This is my Primary Key" name="id" type="long"/>
So i add the following xml :
<key internal="true" name="id">
<keyfield xpath="@id"/>
</key>
This should now result in the following:

If you need any further assistance let me know.
Dan Lewis
Tech Marketer Solutions
http://www.techmarketersolutions.com