W3C Validation

Validation based on W3C standards.

The Worldwide Web Consortium (W3C) provides standards for prefixes (i.e., NCName), CURIEs, and IRIs, but they are highly obfuscated and spread across many documents. This module attempts to operationalize these standards, along with best practices of documentation and testing.

Functions

is_w3c_curie(curie)

Return if the string is a valid CURIE under the W3C specification.

is_w3c_prefix(prefix)

Return if the string is a valid prefix under the W3C specification.

Variables

CURIE_PATTERN

A regex for CURIEs, based on https://www.w3.org/TR/2010/NOTE-curie-20101216.

LOCAL_UNIQUE_IDENTIFIER_PATTERN

A regex for local unique identifiers in CURIEs, based on https://www.ietf.org/rfc/rfc3987.txt

NCNAME_PATTERN

A regex for prefixes, from https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName.