UNPKG

typesxml

Version:

Open source XML library written in TypeScript

43 lines (42 loc) 1.71 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 { Catalog } from "../Catalog"; import { Grammar } from "../grammar/Grammar"; import { AttListDecl } from "./AttListDecl"; import { ElementDecl } from "./ElementDecl"; import { EntityDecl } from "./EntityDecl"; import { NotationDecl } from "./NotationDecl"; export declare class DTDParser { private grammar; private catalog; private pointer; private source; private currentFile; constructor(grammar?: Grammar); setCatalog(catalog: Catalog): void; parseDTD(file: string): Grammar; parseFile(file: string): Grammar; parseString(source: string): Grammar; parse(): Grammar; endConditionalSection(): void; parseConditionalSection(): void; skipIgnoreSection(): void; resolveEntities(fragment: string): string; parseEntityDeclaration(declaration: string): EntityDecl; parseNotationDeclaration(declaration: string): NotationDecl; parseAttributesListDeclaration(declaration: string): AttListDecl; parseElementDeclaration(declaration: string): ElementDecl; lookingAt(text: string): boolean; resolveEntity(publicId: string, systemId: string): string; makeAbsolute(uri: string): string; getGrammar(): Grammar; }