UNPKG

typesxml

Version:

Open source XML library written in TypeScript

36 lines (35 loc) 1.59 kB
/******************************************************************************* * Copyright (c) 2023-2026 Maxprograms. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 1.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/org/documents/epl-v10.html * * Contributors: * Maxprograms - initial API and implementation *******************************************************************************/ import { ValidationResult } from '../grammar/Grammar.js'; import { SchemaParticle } from './SchemaParticle.js'; export declare enum SchemaContentModelType { EMPTY = "EMPTY", ANY = "ANY", MIXED = "MIXED", ELEMENT = "ELEMENT" } export declare class SchemaContentModel { private type; private rootParticle; constructor(type: SchemaContentModelType, rootParticle?: SchemaParticle); getType(): SchemaContentModelType; getRootParticle(): SchemaParticle | undefined; static empty(): SchemaContentModel; static any(): SchemaContentModel; static mixed(rootParticle?: SchemaParticle): SchemaContentModel; static element(rootParticle: SchemaParticle): SchemaContentModel; hasAnyWildcard(): boolean; private static particleHasWildcard; findCoveringWildcard(childName: string, nsMap?: Map<string, string>): 'strict' | 'lax' | 'skip' | undefined; private static walkParticleForWildcard; validateChildren(elementName: string, children: string[], nsMap?: Map<string, string>, childNamespaces?: string[]): ValidationResult; }