示例#1
0
        public bool mustImplementCollection(
            string schemaName_in,
            out ComplexTypeItem[] complexTypeCollection_out
            )
        {
            complexTypeCollection_out = null;

            XS_Schema _schema = root_ref_.SchemaCollection[schemaName_in];

            for (int c = 0; c < _schema.ComplexType.Count; c++)
            {
                for (int e = 0; e < _schema.ComplexType[c].Sequence.Element.Count; e++)
                {
                    if (
                        // if there's an Element pointing this ComplexType
                        (_schema.ComplexType[c].Sequence.Element[e].Type == Name)
                        &&
                        // and if this Element occurance is unbounded
                        (_schema.ComplexType[c].Sequence.Element[e].MaxOccurs
                         == XS_Element.MaxOccursEnum.unbounded)
                        )
                    {
                        // then this ComplexType must implement a Collection

                        ExtendedMetadata_complexType _complextype
                            = root_ref_.ExtendedMetadata.ComplexType[
                                  Name
                              ];

                        if (_complextype != null)
                        {
                            complexTypeCollection_out = new ComplexTypeItem[_complextype.ComplexTypeKey.Count];
                            for (int k = 0; k < _complextype.ComplexTypeKey.Count; k++)
                            {
                                for (int a = 0; a < Attribute.Count; a++)
                                {
                                    if (
                                        Attribute[a].Name
                                        ==
                                        _complextype.ComplexTypeKey[k].Name
                                        )
                                    {
                                        complexTypeCollection_out[k] = new ComplexTypeItem(
                                            Attribute[a].Name,
                                            Attribute[a].NType,
                                            _complextype.ComplexTypeKey[k].caseSensitive
                                            );
                                        break;
                                    }
                                }
                            }
                        }

                        return(true);
                    }
                }
            }
            return(false);
        }
示例#2
0
        public bool isCollection(
            string schemaName_in,
            out ComplexTypeItem[] complexTypeCollection_out
            )
        {
            complexTypeCollection_out = null;

            ExtendedMetadata_complexType _complextype
                = root_ref.ExtendedMetadata.ComplexType[
                      Type
                  ];

            if (_complextype != null)
            {
                XS_Schema _schema = root_ref_.SchemaCollection[schemaName_in];

                for (int c = 0; c < _schema.ComplexType.Count; c++)
                {
                    if (
                        _schema.ComplexType[c].Name
                        ==
                        _complextype.Name
                        )
                    {
                        complexTypeCollection_out = new ComplexTypeItem[_complextype.ComplexTypeKey.Count];
                        for (int k = 0; k < _complextype.ComplexTypeKey.Count; k++)
                        {
                            for (int a = 0; a < _schema.ComplexType[c].Attribute.Count; a++)
                            {
                                if (
                                    _schema.ComplexType[c].Attribute[a].Name
                                    ==
                                    _complextype.ComplexTypeKey[k].Name
                                    )
                                {
                                    complexTypeCollection_out[k] = new ComplexTypeItem(
                                        _schema.ComplexType[c].Attribute[a].Name,
                                        _schema.ComplexType[c].Attribute[a].NType,
                                        _complextype.ComplexTypeKey[k].caseSensitive
                                        );
                                    break;
                                }
                            }
                        }
                        return(true);
                    }
                }
            }
            return(false);
        }
示例#3
0
		public bool isCollection(
			string schemaName_in, 
			out ComplexTypeItem[] complexTypeCollection_out
		) {
			complexTypeCollection_out = null;

			ExtendedMetadata_complexType _complextype
				= root_ref.ExtendedMetadata.ComplexType[
					Type
				];

			if (_complextype != null) {
				XS_Schema _schema = root_ref_.SchemaCollection[schemaName_in];

				for (int c = 0; c < _schema.ComplexType.Count; c++) {
					if (
						_schema.ComplexType[c].Name
						==
						_complextype.Name
					) {
						complexTypeCollection_out = new ComplexTypeItem[_complextype.ComplexTypeKey.Count];
						for (int k = 0; k < _complextype.ComplexTypeKey.Count; k++) {
							for (int a = 0; a < _schema.ComplexType[c].Attribute.Count; a++) {
								if (
									_schema.ComplexType[c].Attribute[a].Name 
									== 
									_complextype.ComplexTypeKey[k].Name
								) {
									complexTypeCollection_out[k] = new ComplexTypeItem(
										_schema.ComplexType[c].Attribute[a].Name,
										_schema.ComplexType[c].Attribute[a].NType,
										_complextype.ComplexTypeKey[k].caseSensitive
									);
									break;
								}
							}
						}
						return true;
					}
				}
			}
			return false;
		}
示例#4
0
		public bool mustImplementCollection(
			string schemaName_in, 
			out ComplexTypeItem[] complexTypeCollection_out
		) {
			complexTypeCollection_out = null;

			XS_Schema _schema = root_ref_.SchemaCollection[schemaName_in];
			for (int c = 0; c < _schema.ComplexType.Count; c++) {
				for (int e = 0; e < _schema.ComplexType[c].Sequence.Element.Count; e++) {
					if (
						// if there's an Element pointing this ComplexType
						(_schema.ComplexType[c].Sequence.Element[e].Type == Name)
						&&
						// and if this Element occurance is unbounded
						(_schema.ComplexType[c].Sequence.Element[e].MaxOccurs
							== XS_Element.MaxOccursEnum.unbounded)
					) {
						// then this ComplexType must implement a Collection

						ExtendedMetadata_complexType _complextype
							= root_ref_.ExtendedMetadata.ComplexType[
								Name
							];

						if (_complextype != null) {
							complexTypeCollection_out = new ComplexTypeItem[_complextype.ComplexTypeKey.Count];
							for (int k = 0; k < _complextype.ComplexTypeKey.Count; k++) {
								for (int a = 0; a < Attribute.Count; a++) {
									if (
										Attribute[a].Name 
										== 
										_complextype.ComplexTypeKey[k].Name
									) {
										complexTypeCollection_out[k] = new ComplexTypeItem(
											Attribute[a].Name,
											Attribute[a].NType,
											_complextype.ComplexTypeKey[k].caseSensitive
										);
										break;
									}
								}
							}
						}

						return true;
					}
				}
			}
			return false;
		}