Index: src/xmltables-sqlserver.sql
===================================================================
--- src/xmltables-sqlserver.sql	(revision 771)
+++ src/xmltables-sqlserver.sql	(revision 772)
@@ -31,15 +31,15 @@
  * ACL -- table to store ACL for XML documents by principals
  */
 CREATE TABLE [dbo].[xml_access] (
-  [docid] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [accessfileid] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [principal_name] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [permission] [int] NULL ,
-  [perm_type] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [perm_order] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [begin_time] [datetime] NULL ,
-  [end_time] [datetime] NULL ,
-  [ticket_count] [int] NULL 
+  [docid]		[varchar] (250) NULL ,
+  [accessfileid]	[varchar] (250) NULL ,
+  [principal_name]	[varchar] (100) NULL ,
+  [permission]		[int] NULL ,
+  [perm_type]		[varchar] (50) NULL ,
+  [perm_order]		[varchar] (50) NULL ,
+  [begin_time]		[datetime] NULL ,
+  [end_time]		[datetime] NULL ,
+  [ticket_count]	[int] NULL 
 ) ON [PRIMARY]
 GO
 
@@ -47,12 +47,12 @@
  * XML Catalog -- table to store all external sources for XML documents
  */
 CREATE TABLE [dbo].[xml_catalog] (
-  [catalog_id] [bigint] IDENTITY (1, 1) NOT NULL ,
-  [entry_type] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [source_doctype] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [target_doctype] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [public_id] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [system_id] [varchar] (512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
+  [catalog_id]		[bigint] IDENTITY (1, 1) NOT NULL ,
+  [entry_type]		[varchar] (50) NULL ,
+  [source_doctype]	[varchar] (250) NULL ,
+  [target_doctype]	[varchar] (250) NULL ,
+  [public_id]		[varchar] (250) NULL ,
+  [system_id]		[varchar] (512) NULL 
 ) ON [PRIMARY]
 GO
 
@@ -60,18 +60,18 @@
  * Documents -- table to store XML documents
  */
 CREATE TABLE [dbo].[xml_documents] (
-  [docid] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
-  [rootnodeid] [bigint] NULL ,
-  [docname] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [doctype] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [user_owner] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [user_updated] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [server_location] [bigint] NULL ,
-  [rev] [int] NULL ,
-  [date_created] [datetime] NULL ,
-  [date_updated] [datetime] NULL ,
-  [public_access] [bit] NULL ,
-  [catalog_id] [bigint] NULL 
+  [docid]		[varchar] (250) NOT NULL ,
+  [rootnodeid]		[bigint] NULL ,
+  [docname]		[varchar] (100) NULL ,
+  [doctype]		[varchar] (100) NULL ,
+  [user_owner]		[varchar] (100) NULL ,
+  [user_updated]	[varchar] (100) NULL ,
+  [server_location]	[bigint] NULL ,
+  [rev]			[int] NULL ,
+  [date_created]	[datetime] NULL ,
+  [date_updated]	[datetime] NULL ,
+  [public_access]	[bit] NULL ,
+  [catalog_id]		[bigint] NULL 
 ) ON [PRIMARY]
 GO
 
@@ -80,11 +80,11 @@
  * quick searching in structured searches
  */
 CREATE TABLE [dbo].[xml_index] (
-  [nodeid] [bigint] NOT NULL ,
-  [path] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
-  [docid] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [doctype] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [parentnodeid] [bigint] NULL 
+  [nodeid]		[bigint] NOT NULL ,
+  [path]		[varchar] (200) NOT NULL ,
+  [docid]		[varchar] (250) NULL ,
+  [doctype]		[varchar] (100) NULL ,
+  [parentnodeid]	[bigint] NULL 
 ) ON [PRIMARY]
 GO
 
@@ -92,16 +92,16 @@
  * Nodes -- table to store XML Nodes (both elements and attributes)
  */
 CREATE TABLE [dbo].[xml_nodes] (
-  [nodeid] [bigint] IDENTITY (1, 1) NOT NULL ,
-  [nodeindex] [int] NULL ,
-  [nodetype] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [nodename] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [nodedata] [varchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [parentnodeid] [bigint] NULL ,
-  [rootnodeid] [bigint] NULL ,
-  [docid] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [date_created] [datetime] NULL ,
-  [date_updated] [datetime] NULL 
+  [nodeid]		[bigint] IDENTITY (1, 1) NOT NULL ,
+  [nodeindex]		[int] NULL ,
+  [nodetype]		[varchar] (20) NULL ,
+  [nodename]		[varchar] (250) NULL ,
+  [nodedata]		[varchar] (4000) NULL ,
+  [parentnodeid]	[bigint] NULL ,
+  [rootnodeid]		[bigint] NULL ,
+  [docid]		[varchar] (250) NULL ,
+  [date_created]	[datetime] NULL ,
+  [date_updated]	[datetime] NULL 
 ) ON [PRIMARY]
 GO
 
@@ -109,14 +109,14 @@
  * Relations -- table to store relations of form <subject,relationship,object>
  */
 CREATE TABLE [dbo].[xml_relation] (
-  [relationid] [bigint] IDENTITY (1, 1) NOT NULL ,
-  [docid] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [packagetype] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [subject] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
-  [subdoctype] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [relationship] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
-  [object] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
-  [objdoctype] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
+  [relationid]		[bigint] IDENTITY (1, 1) NOT NULL ,
+  [docid]		[varchar] (250) NULL ,
+  [packagetype]		[varchar] (250) NULL ,
+  [subject]		[varchar] (250) NOT NULL ,
+  [subdoctype]		[varchar] (128) NULL ,
+  [relationship]	[varchar] (128) NOT NULL ,
+  [object]		[varchar] (250) NOT NULL ,
+  [objdoctype]		[varchar] (128) NULL 
 ) ON [PRIMARY]
 GO
 
@@ -124,10 +124,10 @@
  * Replication -- table to store servers that metacat is replicated to
  */
 CREATE TABLE [dbo].[xml_replication] (
-  [serverid] [bigint] IDENTITY (1, 1) NOT NULL ,
-  [server] [varchar] (512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [last_checked] [datetime] NULL ,
-  [replicate] [bit] NULL 
+  [serverid]		[bigint] IDENTITY (1, 1) NOT NULL ,
+  [server]		[varchar] (512) NULL ,
+  [last_checked]	[datetime] NULL ,
+  [replicate]		[bit] NULL 
 ) ON [PRIMARY]
 GO
      
@@ -140,19 +140,19 @@
  *                    or DELETE
  */
 CREATE TABLE [dbo].[xml_revisions] (
-  [revisionid] [bigint] IDENTITY (1, 1) NOT NULL ,
-  [docid] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [rootnodeid] [bigint] NULL ,
-  [docname] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [doctype] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [user_owner] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [user_updated] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-  [server_location] [bigint] NULL ,
-  [rev] [int] NULL ,
-  [date_created] [datetime] NULL ,
-  [date_updated] [datetime] NULL ,
-  [public_access] [bit] NULL ,
-  [catalog_id] [bigint] NULL 
+  [revisionid]		[bigint] IDENTITY (1, 1) NOT NULL ,
+  [docid]		[varchar] (250) NULL ,
+  [rootnodeid]		[bigint] NULL ,
+  [docname]		[varchar] (100) NULL ,
+  [doctype]		[varchar] (100) NULL ,
+  [user_owner]		[varchar] (100) NULL ,
+  [user_updated]	[varchar] (100) NULL ,
+  [server_location]	[bigint] NULL ,
+  [rev]			[int] NULL ,
+  [date_created]	[datetime] NULL ,
+  [date_updated]	[datetime] NULL ,
+  [public_access]	[bit] NULL ,
+  [catalog_id]		[bigint] NULL 
 ) ON [PRIMARY]
 GO                                
 
@@ -160,9 +160,9 @@
  * Table used as Unique ID generator for the uniqueid part of Accession#
  */
 CREATE TABLE [dbo].[accession_number] (
-  [uniqueid] [int] IDENTITY (1, 1) NOT NULL,
-  [site_code] [varchar] (100),
-  [date_created] [datetime],
+  [uniqueid]		[int] IDENTITY (1, 1) NOT NULL,
+  [site_code]		[varchar] (100),
+  [date_created]	[datetime],
   CONSTRAINT [PK_accession_number] PRIMARY KEY CLUSTERED ([uniqueid])
 ) ON [PRIMARY]
 GO
