typesxml
Version:
Open source XML library written in TypeScript
51 lines (50 loc) • 1.94 kB
TypeScript
/*******************************************************************************
* 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 { AttributeInfo, AttributeUse } from '../grammar/Grammar.js';
import { SchemaFacets } from './SchemaTypeValidator.js';
export declare class SchemaAttributeDecl {
private name;
private namespace;
private type;
private use;
private defaultValue;
private fixedValue;
private facets;
private unionAlternatives;
constructor(name: string, type?: string, use?: AttributeUse, defaultValue?: string, fixedValue?: string, namespace?: string);
getName(): string;
getNamespace(): string | undefined;
getType(): string;
getUse(): AttributeUse;
getDefaultValue(): string | undefined;
getFixedValue(): string | undefined;
setEnumeration(values: string[]): void;
getEnumeration(): string[];
setPatterns(values: string[][]): void;
setMinInclusive(value: string): void;
setMaxInclusive(value: string): void;
setMinExclusive(value: string): void;
setMaxExclusive(value: string): void;
setLength(value: number): void;
setMinLength(value: number): void;
setMaxLength(value: number): void;
setTotalDigits(value: number): void;
setFractionDigits(value: number): void;
setWhiteSpace(value: string): void;
setIsList(value: boolean): void;
setUnionAlternatives(alts: Array<{
facets: SchemaFacets;
baseType: string;
}>): void;
isValid(value: string): boolean;
toAttributeInfo(): AttributeInfo;
}