March 30, 2009 at 8:24 am
Pretty straightforward - I can't find any other people having this issue, and the XMLSCHEMA I'm using was validated by the w3c XML Schema validtator http://www.w3.org/2001/03/webdata/xsv
CREATE XML SCHEMA COLLECTION XMLXSD_PENDING_MODIFICATION_TABLE AS
'<xsd:schema version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="\\Dbbackup\intern\Doug\eBSOLUTIONS\PENDING_MODIFICATION table">
<xsd:complexType name="COLUMNType">
<xsd:attribute name="NAME" type="xsd:string" use="required" />
<xsd:attribute name="CLAUSE" type="xsd:string" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="VALUES"/>
<xsd:enumeration value="WHERE"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="VALUE" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="UPDATEType">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="COLUMN" type="COLUMNType" />
</xsd:sequence>
<xsd:attribute name="ID" type="xsd:dateTime" use="required" />
<xsd:attribute name="TBL" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="INSERTType">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="COLUMN" type="COLUMNType" />
</xsd:sequence>
<xsd:attribute name="ID" type="xsd:dateTime" use="required" />
<xsd:attribute name="TBL" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="DELETEType">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="COLUMN" type="COLUMNType" />
</xsd:sequence>
<xsd:attribute name="ID" type="xsd:dateTime" use="required" />
<xsd:attribute name="TBL" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="PENDING_MODSType">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="DELETE" type="DELETEType" />
<xsd:element maxOccurs="unbounded" name="INSERT" type="INSERTType" />
<xsd:element maxOccurs="unbounded" name="UPDATE" type="UPDATEType" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="PENDING_MODS" type="PENDING_MODSType" />
</xsd:schema>'
Msg 2305, Level 16, State 1, Line 1
An element or attribute type was specified more than once.
Attempting to narrow the error now
---
Dlongnecker
March 30, 2009 at 12:35 pm
edit: Narrowing the error more:
Anyone know how you're supposed to enumerate an attribute list?
Also, everytime I post XML it disappears in the post, and I have to search and replace the brackets with ampersand gt; and ampersand lt;
CREATE XML SCHEMA COLLECTION XMLXSD_PENDING_MODIFICATION_TABLE AS
'<xsd:schema version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="\\Dbbackup\intern\Doug\eBSOLUTIONS\PENDING_MODIFICATION table">
<xsd:simpleType name="CLAUSEType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="WHERE"/>
<xsd:enumeration value="VALUES"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="COLUMNType">
<xsd:attribute name="NAME" type="xsd:string" use="required" />
<xsd:attribute name="CLAUSE" type="CLAUSEType" use="required" />
<xsd:attribute name="VALUE" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="UPDATEType">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="COLUMN" type="COLUMNType" />
</xsd:sequence>
<xsd:attribute name="ID" type="xsd:dateTime" use="required" />
<xsd:attribute name="TBL" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="INSERTType">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="COLUMN" type="COLUMNType" />
</xsd:sequence>
<xsd:attribute name="ID" type="xsd:dateTime" use="required" />
<xsd:attribute name="TBL" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="DELETEType">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="COLUMN" type="COLUMNType" />
</xsd:sequence>
<xsd:attribute name="ID" type="xsd:dateTime" use="required" />
<xsd:attribute name="TBL" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="PENDING_MODSType">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="DELETE" type="DELETEType" />
<xsd:element maxOccurs="unbounded" name="INSERT" type="INSERTType" />
<xsd:element maxOccurs="unbounded" name="UPDATE" type="UPDATEType" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="PENDING_MODS" type="PENDING_MODSType" />
</xsd:schema>'
Msg 2307, Level 16, State 1, Line 1
Reference to an undefined name 'CLAUSEType'
---
Dlongnecker
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply