UNPKG

@krlwlfrt/xsdco

Version:
99 lines (98 loc) 2.06 kB
export type XSDNamespace = 'xsd:' | ''; export interface XSD { 'xsd:schema': XSDSchema; } export interface XSDSchema { $: { targetNamespace: string; [nameSpaceIdentifier: string]: string; }; 'xsd:complexType': XSDComplexType[]; 'xsd:import': XSDImport[]; 'xsd:include': XSDImport[]; 'xsd:simpleType': XSDSimpleType[]; 'xsd:group': XSDGroup[]; } export interface XSDImport { $: { namespace: string; schemaLocation: string; }; } export interface XSDSimpleType { $: { name: string; }; 'xsd:restriction'?: XSDRestriction[]; } export interface XSDRestriction { $: { base: string; }; 'xsd:maxLength': XSDRestrictionValue[]; 'xsd:pattern': XSDRestrictionValue[]; } export interface XSDRestrictionValue { $: { value: string; }; } export interface XSDComplexType { $: { name: string; }; 'xsd:attribute': XSDAttribute[]; 'xsd:sequence': XSDSequence[]; 'xsd:simpleContent': XSDSimpleContent[]; 'xsd:group': XSDGroupRef[]; } export interface XSDSequence { 'xsd:element': (XSDElement | XSDElementRef)[]; 'xsd:group': XSDGroup[]; } export interface XSDElement { $: { maxOccurs?: string; minOccurs?: string; name: string; type?: string; }; 'xsd:annotation'?: XSDAnnotation[]; 'xsd:complexType'?: XSDComplexType[]; 'xsd:simpleType'?: XSDSimpleType[]; } export interface XSDElementRef { $: { ref: string; }; } export interface XSDAnnotation { 'xsd:documentation': string[]; } export interface XSDAttribute { $: { name: string; type: string; ref: string; use: string; }; } export interface XSDGroup { $: { name: string; }; 'xsd:sequence': XSDSequence[]; } export interface XSDGroupRef { $: { ref: string; }; } export interface XSDSimpleContent { 'xsd:extension': XSDExtension[]; } export interface XSDExtension { $: { base: string; }; }