![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Error when creating a restriction? [Thread Next] Re: Error when creating a restriction?To: NULL Date: 6/6/2006 9:09:00 AM Bummer, I actually originally designed the schema with LOTs of globally defined types instead of doing the local type declarations. I moved away from that because, I generally used the types in only one or two places so it seemed to make the schema more complicated than it needed to be (especially when I ran it through tools to make VB.Net classes.... Created a HUGE, wide and shallow class tree that really didn't seem necessary). I really appreciate the feedback and I can see where what your saying could contribute to the problem (though I'm not sure how my redfinitions are different since I literally copied and pasted the original definition in). At this point I'm not sure I'll bother to make the recommended changes. For the application I'm dealing with, the compromise between a better Schema for validation verses a simpler schema probably needs to lean more towards the "simpler schema" option. Thanks again. Tom Malia "Stan Kitsis [MSFT]" <skits@m...> wrote in message news:44847343@n...... > You have a lot of locally defined types in the base type, which you > redefine later. Here's an example > > <xs:element name="empID" nillable="true" > id="com.ttdsinc.dda.global.ToAcctAPDoc_Type.empID"> > <xs:simpleType> > <xs:restriction base="xs:string"> > <xs:maxLength value="30"/> > </xs:restriction> > </xs:simpleType> > </xs:element> > > While in your restricted type you define empID element to be of the > similar type, it's not the same. You need to make the simple type global > and reference it from both places. If you still get errors after fixing > all the types, post an updated schema here. > > -- > Stan Kitsis > Program Manager, XML Technologies > Microsoft Corporation > > This posting is provided "AS IS" with no warranties, and confers no > rights. > > > "Thomas Malia" <tommalia@w...> wrote in message > news:%23QqY3OmhGHA.3868@T...... >> It's kinda long but here it is. I've tried with and without the id >> attributes... thought maybe that might have had something to do with it. >> Obviously, created an exact copy isn't my end goal, the restricted type >> should require the empID element among other changes. However, I figured >> I should first confirm that an exact copy would work... which it doesn't >> so far. Thanks in advance.: >> >> <xs:complexType name="ToAcctAPDoc_Type" >> id="com.ttdsinc.dda.global.ToAcctAPDoc_Type"> >> >> <xs:sequence> >> >> <xs:choice minOccurs="0"> >> >> <xs:sequence> >> >> <xs:choice minOccurs="0"> >> >> <xs:element name="empID" nillable="true" >> id="com.ttdsinc.dda.global.ToAcctAPDoc_Type.empID"> >> >> <xs:simpleType> >> >> <xs:restriction base="xs:string"> >> >> <xs:maxLength value="30"/> >> >> </xs:restriction> >> >> </xs:simpleType> >> >> </xs:element> >> >> <xs:element name="vendID" nillable="true" >> id="com.ttdsinc.dda.global.ToAcctAPDoc_Type.vendID"> >> >> <xs:simpleType> >> >> <xs:restriction base="xs:string"> >> >> <xs:maxLength value="30"/> >> >> </xs:restriction> >> >> </xs:simpleType> >> >> </xs:element> >> >> </xs:choice> >> >> <xs:choice minOccurs="0"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> When the activity being transmitted in the document is NOT related to an >> employee, then the Pay to the order of details are optional information >> that the accounting system doesn't used. >> >> (2006-06-01) the system is being designed to support the receipt of the >> full name and address information into the accounting as it is stored in >> the DMS. Accept for some of the fields, in the case of employee related >> documents, the accounting system does not at this time use this >> information in any way, but, if the information is supplied, it will >> retain these details with the history of what was imported. >> >> </xs:documentation> >> >> </xs:annotation> >> >> <xs:element name="PayToOrderOfPerson" type="DMSPersonInfo_Type" >> nillable="true" >> id="com.ttdsinc.dda.global.ToAcctAPDoc_Type.PayToOrderOfPerson"/> >> >> <xs:element name="PayToOrderOfCompany" type="DMSCpnyInfo_Type" >> nillable="true" >> id="com.ttdsinc.dda.global.ToAcctAPDoc_Type.PayToOrderOfCompany"/> >> >> </xs:choice> >> >> </xs:sequence> >> >> <xs:element name="ChkNbrToVoid" type="AcctChkNbr_Type" nillable="false" >> id="com.ttdsinc.dda.global.ToAcctAPDoc_Type.ChkNbrToVoid"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> The initial design of the DMS to Accounting interface didn't not specify >> the need to be able to transmit a request for a voiding of a check. >> However, it seems reasonable that this may be desirable future >> enhancement and subsequently the XML schema is being designed to support >> this future need. >> >> </xs:documentation> >> >> </xs:annotation> >> >> </xs:element> >> >> </xs:choice> >> >> <xs:element name="AcctAddress" type="AcctAddress_Type" nillable="false" >> id="com.ttdsinc.dda.global.ToAcctAPDoc_Type.AcctAddress"/> >> >> <xs:element name="InvoiceDate" nillable="true" >> id="com.ttdsinc.dda.global.ToAcctAPDoc_Type.InvoiceDate" minOccurs="0"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> Invoice is optional information. >> >> </xs:documentation> >> >> </xs:annotation> >> >> <xs:simpleType> >> >> <xs:restriction base="xs:date"/> >> >> </xs:simpleType> >> >> </xs:element> >> >> <xs:element name="Descr" nillable="true" >> id="com.ttdsinc.dda.global.ToAcctAPDoc_Type.Descr" minOccurs="0"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> Invoice is optional information. >> >> </xs:documentation> >> >> </xs:annotation> >> >> <xs:simpleType> >> >> <xs:restriction base="xs:string"> >> >> <xs:maxLength value="30"/> >> >> </xs:restriction> >> >> </xs:simpleType> >> >> </xs:element> >> >> <xs:element name="DocAmt" nillable="true" >> id="com.ttdsinc.dda.global.ToAcctAPDoc_Type.AcctChkNbr_Type.DocAmt"> >> >> <xs:simpleType> >> >> <xs:restriction base="xs:float"/> >> >> </xs:simpleType> >> >> </xs:element> >> >> <xs:element name="ToAcctAPTran" type="ToAcctAPTran_Type" nillable="false" >> id="com.ttdsinc.dda.global.ToAcctAPDoc_Type.ToAcctAPTran" >> maxOccurs="unbounded"/> >> >> <xs:element name="Other" type="Other_Type" nillable="true" >> id="com.ttdsinc.dda.global.ToAcctAPDoc_Type.Other" minOccurs="0"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> schema is being designed to anticipate a need for more information to be >> transmitted. This element is intended to support this puposes. >> >> </xs:documentation> >> >> </xs:annotation> >> >> </xs:element> >> >> </xs:sequence> >> >> <xs:attribute ref="DMSDocType" use="required"/> >> >> <xs:attribute ref="DataSourceEntityID" use="required"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> is intended to be the unqiue identifier for the given document in the >> source (i.e. DMS) system. The value from this field will be passed back >> when check information is sent back to the source system. >> >> </xs:documentation> >> >> </xs:annotation> >> >> </xs:attribute> >> >> <xs:attribute ref="DataSourceID" use="required"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> attribute is supplied to facilitate the possibility that the import >> processes that are being created to import information about AP activity >> from DMS to the accounting system could conceivably be used to import >> information from other sources as well. This attributes allows the >> identification of the actual source of the data. >> >> </xs:documentation> >> >> </xs:annotation> >> >> </xs:attribute> >> >> <xs:attribute ref="DataSourceUserID" use="optional"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> attribute is supplied as an audit trail add. If it is at all possible for >> the source system to include the user ID of the user that generated the >> source document, it is encouraged that this attribute be populated. >> >> </xs:documentation> >> >> </xs:annotation> >> >> </xs:attribute> >> >> <xs:attribute ref="DataSourceComputerName" use="optional"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> attribute is supplied as an audit trail add. If it is at all possible for >> the source system to include the computer name of the user that generated >> the source document, or next best thing, the xml file, it is encouraged >> that this attribute be populated. >> >> </xs:documentation> >> >> </xs:annotation> >> >> </xs:attribute> >> >> </xs:complexType> >> >> >> >> <xs:complexType name="ToAcctEmpExpense_Type" >> id="com.ttdsinc.dda.global.ToAcctEmpExpense_Type"> >> >> <xs:complexContent> >> >> <xs:restriction base="ToAcctAPDoc_Type"> >> >> <xs:sequence> >> >> <xs:choice minOccurs="0"> >> >> <xs:sequence> >> >> <xs:choice minOccurs="0"> >> >> <xs:element name="empID" nillable="true" >> id="com.ttdsinc.dda.global.ToAcctEmpExpense_Type.empID"> >> >> <xs:simpleType> >> >> <xs:restriction base="xs:string"> >> >> <xs:maxLength value="30"/> >> >> </xs:restriction> >> >> </xs:simpleType> >> >> </xs:element> >> >> <xs:element name="vendID" nillable="true" >> id="com.ttdsinc.dda.global.ToAcctEmpExpense_Type.vendID"> >> >> <xs:simpleType> >> >> <xs:restriction base="xs:string"> >> >> <xs:maxLength value="30"/> >> >> </xs:restriction> >> >> </xs:simpleType> >> >> </xs:element> >> >> </xs:choice> >> >> <xs:choice minOccurs="0"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> When the activity being transmitted in the document is NOT related to an >> employee, then the Pay to the order of details are optional information >> that the accounting system doesn't used. >> >> (2006-06-01) the system is being designed to support the receipt of the >> full name and address information into the accounting as it is stored in >> the DMS. Accept for some of the fields, in the case of employee related >> documents, the accounting system does not at this time use this >> information in any way, but, if the information is supplied, it will >> retain these details with the history of what was imported. >> >> </xs:documentation> >> >> </xs:annotation> >> >> <xs:element name="PayToOrderOfPerson" type="DMSPersonInfo_Type" >> nillable="true" >> id="com.ttdsinc.dda.global.ToAcctEmpExpense_Type.PayToOrderOfPerson"/> >> >> <xs:element name="PayToOrderOfCompany" type="DMSCpnyInfo_Type" >> nillable="true" >> id="com.ttdsinc.dda.global.ToAcctEmpExpense_Type.PayToOrderOfCompany"/> >> >> </xs:choice> >> >> </xs:sequence> >> >> <xs:element name="ChkNbrToVoid" type="AcctChkNbr_Type" nillable="false" >> id="com.ttdsinc.dda.global.ToAcctEmpExpense_Type.ChkNbrToVoid"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> The initial design of the DMS to Accounting interface didn't not specify >> the need to be able to transmit a request for a voiding of a check. >> However, it seems reasonable that this may be desirable future >> enhancement and subsequently the XML schema is being designed to support >> this future need. >> >> </xs:documentation> >> >> </xs:annotation> >> >> </xs:element> >> >> </xs:choice> >> >> <xs:element name="AcctAddress" type="AcctAddress_Type" nillable="false" >> id="com.ttdsinc.dda.global.ToAcctEmpExpense_Type.AcctAddress"/> >> >> <xs:element name="InvoiceDate" nillable="true" >> id="com.ttdsinc.dda.global.ToAcctEmpExpense_Type.InvoiceDate" >> minOccurs="0"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> Invoice is optional information. >> >> </xs:documentation> >> >> </xs:annotation> >> >> <xs:simpleType> >> >> <xs:restriction base="xs:date"/> >> >> </xs:simpleType> >> >> </xs:element> >> >> <xs:element name="Descr" nillable="true" >> id="com.ttdsinc.dda.global.ToAcctEmpExpense_Type.Descr" minOccurs="0"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> Invoice is optional information. >> >> </xs:documentation> >> >> </xs:annotation> >> >> <xs:simpleType> >> >> <xs:restriction base="xs:string"> >> >> <xs:maxLength value="30"/> >> >> </xs:restriction> >> >> </xs:simpleType> >> >> </xs:element> >> >> <xs:element name="DocAmt" nillable="true" >> id="com.ttdsinc.dda.global.ToAcctEmpExpense_Type.DocAmt"> >> >> <xs:simpleType> >> >> <xs:restriction base="xs:float"/> >> >> </xs:simpleType> >> >> </xs:element> >> >> <xs:element name="ToAcctAPTran" type="ToAcctAPTran_Type" nillable="false" >> id="com.ttdsinc.dda.global.ToAcctEmpExpense_Type.ToAcctAPTran" >> maxOccurs="unbounded"/> >> >> <xs:element name="Other" type="Other_Type" nillable="true" >> id="com.ttdsinc.dda.global.ToAcctEmpExpense_Type.Other" minOccurs="0"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> schema is being designed to anticipate a need for more information to be >> transmitted. This element is intended to support this puposes. >> >> </xs:documentation> >> >> </xs:annotation> >> >> </xs:element> >> >> </xs:sequence> >> >> <xs:attribute ref="DMSDocType" use="required"/> >> >> <xs:attribute ref="DataSourceEntityID" use="required"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> is intended to be the unqiue identifier for the given document in the >> source (i.e. DMS) system. The value from this field will be passed back >> when check information is sent back to the source system. >> >> </xs:documentation> >> >> </xs:annotation> >> >> </xs:attribute> >> >> <xs:attribute ref="DataSourceID" use="required"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> attribute is supplied to facilitate the possibility that the import >> processes that are being created to import information about AP activity >> from DMS to the accounting system could conceivably be used to import >> information from other sources as well. This attributes allows the >> identification of the actual source of the data. >> >> </xs:documentation> >> >> </xs:annotation> >> >> </xs:attribute> >> >> <xs:attribute ref="DataSourceUserID" use="optional"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> attribute is supplied as an audit trail add. If it is at all possible for >> the source system to include the user ID of the user that generated the >> source document, it is encouraged that this attribute be populated. >> >> </xs:documentation> >> >> </xs:annotation> >> >> </xs:attribute> >> >> <xs:attribute ref="DataSourceComputerName" use="optional"> >> >> <xs:annotation> >> >> <xs:documentation> >> >> attribute is supplied as an audit trail add. If it is at all possible for >> the source system to include the computer name of the user that generated >> the source document, or next best thing, the xml file, it is encouraged >> that this attribute be populated. >> >> </xs:documentation> >> >> </xs:annotation> >> >> </xs:attribute> >> >> </xs:restriction> >> >> </xs:complexContent> >> >> </xs:complexType> >> >> "Stan Kitsis [MSFT]" <skits@m...> wrote in message >> news:447f30c7$1@n...... >>> Can you post your xsd snippet (both base and derived types)? >>> >>> -- >>> Stan Kitsis >>> Program Manager, XML Technologies >>> Microsoft Corporation >>> >>> This posting is provided "AS IS" with no warranties, and confers no >>> rights. >>> >>> >>> "Thomas Malia" <tommalia@w...> wrote in message >>> news:%23VqWbFZhGHA.4276@T...... >>>> I'm trying to create a type by creating a restiction on another type. >>>> >>>> I'm starting off by just copying the entire content of the base type >>>> directly into the <xs:restriction> element of the derived type... XML >>>> Spy says my derived type is not a valid restiction of the base type.... >>>> How the heck can that be if it's an exact copy of the base type? What >>>> am I doing wrong? >>>> >>> >>> >> >> > > | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
