UNPKG

typesxml

Version:

Open source XML library written in TypeScript

41 lines (40 loc) 1.69 kB
/******************************************************************************* * Copyright (c) 2023 - 2024 Maxprograms. * * This program and the accompanying materials * are made available under the terms of the Eclipse 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 { AttDecl } from "../dtd/AttDecl"; import { ElementDecl } from "../dtd/ElementDecl"; import { EntityDecl } from "../dtd/EntityDecl"; import { NotationDecl } from "../dtd/NotationDecl"; import { ContentModel } from "./ContentModel"; export declare class Grammar { private models; private entitiesMap; private attributesMap; private elementDeclMap; private notationsMap; constructor(); addPredefinedEntities(): void; getContentModel(elementName: string): ContentModel; toString(): string; addElement(elementDecl: ElementDecl): void; addAttributes(element: string, attributes: Map<string, AttDecl>): void; resolveParameterEntities(text: string): string; addEntity(entityDecl: EntityDecl): void; getEntity(entityName: string): EntityDecl; addNotation(notation: NotationDecl): void; merge(grammar: Grammar): void; getNotationsMap(): Map<string, NotationDecl>; getElementDeclMap(): Map<string, ElementDecl>; getEntitiesMap(): Map<string, EntityDecl>; processModels(): void; getAttributesMap(): Map<string, Map<string, AttDecl>>; getElementAttributesMap(element: string): Map<string, AttDecl>; }