473,289 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

restriction base invalid, error in VS.NET 2003 when loading schema

I started with the following error...
-------------------------------------------------------
An error occured while loading the schema with TargetNamespace
'http://www.w3.org/2001/XMLSchema' referenced in this document.

The value for the 'base' attribute is invalid - 'xsd:string'
is an invalid value for the 'base' attribute.
An error occured at the file:///C:Program Files/Microsoft Visual Studio
.NET 2003
/Common7/Packages/Schemas/XML/xsdschema.xsd.(516,16).

after trying to load this schema file:
-------------------------------------------------------
(fragment)

<?xml version="1.0" ?>

<!-- Filename: ownership4Document.xsd.xml -->

<!-- Purpose: Defines the elements specific to a 4 Ownership primary
document. -->

<!-- Version: X0202 -->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema"> <!-- Added for
SQLXMLBulkLoad Annotation purposes -->

<xs:include schemaLocation=".//ownershipDocumentCommon.xsd.xml" />

<!-- this schema applies exclusively to a "4" document -->

<xs:simpleType name="DOCUMENT_TYPE">

<xs:restriction base="xs:string">

<xs:pattern value="4" />

</xs:restriction>

</xs:simpleType>
Then I changed the offending line in the VS.NET 2003 xsdschema.xsd from:

<restriction base="xsd:string"> ....changed to <restriction
base="string">
--------------------------------------------------------

and now I get this error:

Dataset does not support "union' or 'list' as SimpleType.

================================================== =====

How do I get past this error so that I can load my schema file?

-------------------------------------------------

Here's the entire schema if anyone is interested.

<?xml version="1.0"?>

<!-- Filename: ownership4Document.xsd.xml -->
<!-- Purpose: Defines the elements specific to a 4 Ownership primary
document. -->
<!-- Version: X0202 -->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"

xmlns:sql="urn:schemas-microsoft-com:mapping-schema"> <!-- Added for
SQLXMLBulkLoad Annotation purposes -->

<xs:include schemaLocation=".//ownershipDocumentCommon.xsd.xml"/>

<!-- this schema applies exclusively to a "4" document -->
<xs:simpleType name="DOCUMENT_TYPE">
<xs:restriction base="xs:string">
<xs:pattern value="4"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="TRANS_FORM4_TYPE_PICKLIST">
<xs:annotation>
<xs:documentation>
A "4" document can have security transactions of types 4
and 5.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="4|5"/>
</xs:restriction>
</xs:simpleType>

<xs:complexType name="TRANSACTION_CODING_FOR_4">
<xs:annotation>
<xs:documentation>
The transactionFormType can be 4 or 5.
The transactionCode is mandatory.
The equitySwapInvolved flag is mandatory.
A "4" transaction is assumed on-time.
A "5" transaction is assumed early.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="transactionFormType"
type="TRANS_FORM4_TYPE_PICKLIST" minOccurs="1"/>
<xs:element name="transactionCode"
type="TRANS_CODE_PICKLIST" minOccurs="1"/>
<xs:element name="equitySwapInvolved" type="xs:boolean"
minOccurs="1"/>
<xs:element name="footnoteId" type="FOOTNOTE_ID"
minOccurs="0" maxOccurs="99"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="NONDERIVATIVE_TRANSACTION"
sql:relation="ownershipDocument">
<xs:sequence>
<xs:element name="securityTitle"
sql:field="securityTitle" type="SECURITY_TITLE"
minOccurs="1"/>
<xs:element name="transactionDate"
sql:field="transactionDate" type="DATE_WITH_FOOTNOTE"
minOccurs="1"/>
<xs:element name="deemedExecutionDate"
sql:field="deemedExecutionDate" type="DATE_AND_OR_FOOTNOTE"
minOccurs="0"/>
<xs:element name="transactionCoding"
sql:field="transactionCoding" type="TRANSACTION_CODING_FOR_4"
minOccurs="0"/>
<xs:element name="transactionTimeliness"
sql:field="transactionTimeliness" type="TRANSACTION_TIMELINESS"
minOccurs="0"/>
<xs:element name="transactionAmounts"
sql:field="transactionAmounts" type="NONDERIV_TRANSACT_AMOUNTS"
minOccurs="1"/>
<xs:element name="postTransactionAmounts"
sql:field="postTransactionAmounts" type="POST_TRANSACTION_AMOUNTS"
minOccurs="1"/>
<xs:element name="ownershipNature"
sql:field="ownershipNature" type="OWNERSHIP_NATURE"
minOccurs="1"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="DERIVATIVE_TRANSACTION">
<xs:sequence>
<xs:element name="securityTitle"
type="SECURITY_TITLE" minOccurs="1"/>
<xs:element name="conversionOrExercisePrice"
type="OPT_NUMBER_WITH_FOOTNOTE" minOccurs="1"/>
<xs:element name="transactionDate"
type="DATE_WITH_FOOTNOTE" minOccurs="1"/>
<xs:element name="deemedExecutionDate"
type="DATE_AND_OR_FOOTNOTE" minOccurs="0"/>
<xs:element name="transactionCoding"
type="TRANSACTION_CODING_FOR_4" minOccurs="0"/>
<xs:element name="transactionTimeliness"
type="TRANSACTION_TIMELINESS" minOccurs="0"/>
<xs:element name="transactionAmounts"
type="DERIV_TRANSACT_AMOUNTS" minOccurs="1"/>
<xs:element name="exerciseDate"
type="OPT_DATE_WITH_FOOTNOTE" minOccurs="1"/>
<xs:element name="expirationDate"
type="OPT_DATE_WITH_FOOTNOTE" minOccurs="1"/>
<xs:element name="underlyingSecurity"
type="UNDERLYING_SECURITY" minOccurs="1"/>
<xs:element name="postTransactionAmounts"
type="POST_TRANSACTION_AMOUNTS" minOccurs="1"/>
<xs:element name="ownershipNature"
type="OWNERSHIP_NATURE" minOccurs="1"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="NONDERIVATIVE_HOLDING">
<xs:sequence>
<xs:element name="securityTitle"
type="SECURITY_TITLE" minOccurs="1"/>
<xs:element name="postTransactionAmounts"
type="POST_TRANSACTION_AMOUNTS" minOccurs="1"/>
<xs:element name="ownershipNature"
type="OWNERSHIP_NATURE" minOccurs="1"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="DERIVATIVE_HOLDING">
<xs:sequence>
<xs:element name="securityTitle"
type="SECURITY_TITLE" minOccurs="1"/>
<xs:element name="conversionOrExercisePrice"
type="OPT_NUMBER_WITH_FOOTNOTE" minOccurs="1"/>
<xs:element name="exerciseDate"
type="OPT_DATE_WITH_FOOTNOTE" minOccurs="1"/>
<xs:element name="expirationDate"
type="OPT_DATE_WITH_FOOTNOTE" minOccurs="1"/>
<xs:element name="underlyingSecurity"
type="UNDERLYING_SECURITY" minOccurs="1"/>
<xs:element name="postTransactionAmounts"
type="POST_TRANSACTION_AMOUNTS" minOccurs="1"/>
<xs:element name="ownershipNature"
type="OWNERSHIP_NATURE" minOccurs="1"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="NONDERIVATIVE_TABLE">
<xs:annotation>
<xs:documentation>
Can have up to 30 entries in the Non-Derivative Table.
This is Table 1 on the printed form.
Can have any combination of Transactions and Holdings in
any order.
</xs:documentation>
</xs:annotation>
<xs:choice minOccurs="0" maxOccurs="30">
<xs:element name="nonDerivativeTransaction"
type="NONDERIVATIVE_TRANSACTION"/>
<xs:element name="nonDerivativeHolding"
type="NONDERIVATIVE_HOLDING"/>
</xs:choice>
</xs:complexType>

<xs:complexType name="DERIVATIVE_TABLE">
<xs:annotation>
<xs:documentation>
Can have up to 30 entries in the Derivative Table. This
is Table 2 on the printed form.
Can have any combination of Transactions and Holdings in
any order.
</xs:documentation>
</xs:annotation>
<xs:choice minOccurs="0" maxOccurs="30">
<xs:element name="derivativeTransaction"
type="DERIVATIVE_TRANSACTION"/>
<xs:element name="derivativeHolding"
type="DERIVATIVE_HOLDING"/>
</xs:choice>
</xs:complexType>

<xs:element name="ownershipDocument"
sql:relation="ownershipDocument">
<xs:complexType>
<xs:sequence>
<xs:element name="schemaVersion"
sql:field="schemaVersion" type="SCHEMA_VERSION" minOccurs="0"
maxOccurs="1"/>
<xs:element name="documentType"
sql:field="documentType" type="DOCUMENT_TYPE" minOccurs="1"
maxOccurs="1"/>
<xs:element name="periodOfReport"
sql:field="periodOfReport" type="xs:date" minOccurs="1"
maxOccurs="1"/>
<xs:element
name="notSubjectToSection16"sql:field="notSubjectT oSection16"
type="xs:boolean" minOccurs="0" maxOccurs="1"/>
<xs:element name="issuer"
sql:field="issuer" type="ISSUER" minOccurs="1"
maxOccurs="1"/>
<xs:element name="reportingOwner"
sql:field="reportingOwner" type="REPORTING_OWNER" minOccurs="1"
maxOccurs="10"/>
<xs:element name="nonDerivativeTable"
sql:field="nonDerivativeTable" type="NONDERIVATIVE_TABLE"
minOccurs="0" maxOccurs="1"/>
<xs:element name="derivativeTable"
sql:field="derivativeTable" type="DERIVATIVE_TABLE" minOccurs="0"
maxOccurs="1"/>
<xs:element name="footnotes"
sql:field="footnotes" type="FOOTNOTE_GROUP" minOccurs="0"
maxOccurs="1"/>
<xs:element name="remarks"
sql:field="remarks" type="STRING_2000" minOccurs="0"
maxOccurs="1"/>
<xs:element name="ownerSignature"
sql:field="ownerSignature" type="SIGNATURE" minOccurs="1"
maxOccurs="10"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

*** Sent via Developersdex http://www.developersdex.com ***
Nov 12 '05 #1
0 1547

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Cat | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm having trouble getting my head around the reason the that following file won't validate with the following error output in Xerces version...
4
by: Lars Geldner | last post by:
Hello, I'm searching for a possibility to define a complex type using xml schema that can only be derived by restriction. The sub-complex type should have a content model that only contains...
1
by: hre1 | last post by:
hello stan, thank you very much for your fast replay! your solution will help to solve my problem. but i try to understand !why! sqc and xmlspy produce this messages: SQC means:TYPE...
1
by: mahanatti_net | last post by:
Greetings. Below is the schema snippet I am trying to explore attributegroups and attribute's use property. However I am getting a validation error saying "undefined value for base encountered",...
5
by: bclark76 | last post by:
I am getting a strange error, maybe someone knows why it is occurring.. I get the following error when I try to validate Untitled8.xml in Altova XMLSPY: Validation error in another file:...
1
by: Mac | last post by:
I'm trying to validate input from an xml source to a dataset in dotnet2.0. As far as I can see, type errors correctly cause an exception, but values that are the correct type but do not satisify...
1
by: brucepickford001 | last post by:
Hi, I have a not simple problem. I want the following XML to be schema valid <PopulationDemographic> <PersonName>Joe Blogs</PersonName> <Age>2</Age> <Category>baby</Category>...
6
by: burkley | last post by:
In XML Schema, is it possible to derive a complex type via restriction and have the new derived type be in a different namespace than the original base type? I've banged on this for 2 days now...
3
by: Kai Schlamp | last post by:
Hello! In my schema I have the following: <xs:complexType name="textareaType"> <xs:simpleContent> <xs:restriction base="xs:string"> <xs:attribute ref="label" use="required" />...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.