<commit_before>import os
from zeroinstall.injector import model, namespaces
from zeroinstall.injector.reader import InvalidInterface, update
from xml.dom import minidom, Node, XMLNS_NAMESPACE
import tempfile
from logging import warn, info, debug

group_impl_attribs = ['version', 'version-modifier', 'released', 'main', 'stability', 'arch', 'license', 'doc-dir', 'self-test']

known_elements = {
	'interface' : ['uri', 'min-injector-version', 'main'],	# (main is deprecated)
	'name' : [],
	'summary' : [],
	'description' : [],
	'needs-terminal' : [],
	'homepage' : [],
	'category' : ['type'],
	'icon' : ['type', 'href'],
	'feed' : ['src', 'arch'],
	'feed-for' : ['interface'],

	'group' : group_impl_attribs,
	'implementation' : ['id'] + group_impl_attribs,
	'package-implementation' : ['package', 'main'],

	'archive' : ['href', 'size', 'extract', 'type', 'start-offset'],
	'recipe' : [],
	'requires' : ['interface'],
	'version' : ['not-before', 'before'],
	'environment' : ['name', 'insert', 'default', 'mode'],
}

def checkElement(elem):
	if elem.namespaceURI != namespaces.XMLNS_IFACE:
		info("Note: Skipping unknown (but namespaced) element <%s>", elem.localName)
		return	# Namespaces elements are OK

	if elem.localName not in known_elements:<commit_msg>Added <overlay> element to validation schema.<commit_after>import os
from zeroinstall.injector import model, namespaces
from zeroinstall.injector.reader import InvalidInterface, update
from xml.dom import minidom, Node, XMLNS_NAMESPACE
import tempfile
from logging import warn, info, debug

group_impl_attribs = ['version', 'version-modifier', 'released', 'main', 'stability', 'arch', 'license', 'doc-dir', 'self-test']

known_elements = {
	'interface' : ['uri', 'min-injector-version', 'main'],	# (main is deprecated)
	'name' : [],
	'summary' : [],
	'description' : [],
	'needs-terminal' : [],
	'homepage' : [],
	'category' : ['type'],
	'icon' : ['type', 'href'],
	'feed' : ['src', 'arch'],
	'feed-for' : ['interface'],

	'group' : group_impl_attribs,
	'implementation' : ['id'] + group_impl_attribs,
	'package-implementation' : ['package', 'main'],

	'archive' : ['href', 'size', 'extract', 'type', 'start-offset'],
	'recipe' : [],
	'requires' : ['interface'],
	'version' : ['not-before', 'before'],
	'environment' : ['name', 'insert', 'default', 'mode'],
	'overlay' : ['src', 'mount-point'],
}

def checkElement(elem):
	if elem.namespaceURI != namespaces.XMLNS_IFACE:
		info("Note: Skipping unknown (but namespaced) element <%s>", elem.localName)
		return	# Namespaces elements are OK

	if elem.localName not in known_elements:
{'fraction_non_alphanumeric': 0.1979930528753377, 'fraction_numerical': 0.0, 'mean_word_length': 5.732467532467532, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1915535', 'n_tokens_mistral': 886, 'n_tokens_neox': 867, 'n_words': 221}