beta.xbrl.xule.RuleSet

The beta.xbrl.xule.RuleSet class represents a parsed XULE file or rule set that can be executed by the XULE processor.

class beta.xbrl.xule.RuleSet

Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a NotImplementedError exception.

Class methods

classmethod beta.xbrl.xule.RuleSet.compile_from_buffer(type buf, catalog=None, enable_static_checks=True, **kargs)

Returns a beta.xbrl.xule.RuleSet object that represents the rule set in the given XULE source file buffer. A beta.xbrl.xule.:obj:`ParseError` exception is raised if a syntax error is encountered during parsing.

classmethod beta.xbrl.xule.RuleSet.compile_from_json(type json, catalog=None, enable_static_checks=True, **kargs)

Returns a beta.xbrl.xule.RuleSet object that represents the preparsed JSON XULE parse tree.

classmethod beta.xbrl.xule.RuleSet.compile_from_url(type url, catalog=None, enable_static_checks=True, **kargs)

Returns a beta.xbrl.xule.RuleSet object that represents the rule set in the given XULE source file. A beta.xbrl.xule.:obj:`ParseError` exception is raised if a syntax error is encountered during parsing.

classmethod beta.xbrl.xule.RuleSet.create_from_buffer(type buf, catalog=None, enable_static_checks=True, **kargs)

Returns a beta.xbrl.xule.RuleSet, xml.ErrorLog tuple that represents the rule set archive in the given buffer. Rule set archives compiled with the Arelle DQC plugin (https://github.com/DataQualityCommittee/dqc_us_rules/releases) are supported.

classmethod beta.xbrl.xule.RuleSet.create_from_url(type url, catalog=None, enable_static_checks=True, **kargs)

Returns a beta.xbrl.xule.RuleSet, xml.ErrorLog tuple that represents the rule set archive at the given url. Rule set archives compiled with the Arelle DQC plugin (https://github.com/DataQualityCommittee/dqc_us_rules/releases) are supported.

classmethod beta.xbrl.xule.RuleSet.validate_buffer(type buf, catalog=None, enable_static_checks=True, **kargs)

Returns a beta.xbrl.xule.RuleSet object that represents the rule set in the given XULE source file buffer. A beta.xbrl.xule.:obj:`ParseError` exception is raised if a syntax error is encountered during parsing.

classmethod beta.xbrl.xule.RuleSet.validate_url(type url, catalog=None, enable_static_checks=True, **kargs)

Returns a beta.xbrl.xule.RuleSet object that represents the rule set in the given XULE source file. A beta.xbrl.xule.:obj:`ParseError` exception is raised if a syntax error is encountered during parsing.

Attributes

beta.xbrl.xule.RuleSet.assertions

Returns an iterator of beta.xbrl.xule.Assertion objects that represent the top-level assertion expressions in the XULE parse tree.

beta.xbrl.xule.RuleSet.constants

Returns an iterator of beta.xbrl.xule.ConstantDeclaration objects that represent the top-level constant expressions in the XULE parse tree.

beta.xbrl.xule.RuleSet.functions

Returns an iterator of beta.xbrl.xule.FunctionDeclaration objects that represent the top-level function expressions in the XULE parse tree.

beta.xbrl.xule.RuleSet.namespaces

Returns an iterator of beta.xbrl.xule.NamespaceDeclaration objects that represent the top-level namespace expressions in the XULE parse tree.

beta.xbrl.xule.RuleSet.output_attributes

Returns an iterator of beta.xbrl.xule.OutputAttribute objects that represent the top-level output attribute expressions in the XULE parse tree.

beta.xbrl.xule.RuleSet.output_rules

Returns an iterator of beta.xbrl.xule.OutputRule objects that represent the top-level output rule expressions in the XULE parse tree.

beta.xbrl.xule.RuleSet.rule_name_prefixes

Returns an iterator of beta.xbrl.xule.RuleNamePrefix objects that represent the top-level rule-name-prefix expressions in the XULE parse tree.

beta.xbrl.xule.RuleSet.rule_name_separators

Returns an iterator of beta.xbrl.xule.RuleNameSeparator objects that represent the top-level rule-name-separator expressions in the XULE parse tree.

beta.xbrl.xule.RuleSet.uri

Returns the URI of the original XULE source file or None if this information is not available.

beta.xbrl.xule.RuleSet.versions

Returns an iterator of beta.xbrl.xule.VersionDeclaration objects that represent the top-level version expressions in the XULE parse tree.

Methods

beta.xbrl.xule.RuleSet.assertion(name)

Returns an beta.xbrl.xule.Assertion object that represent the top-level assertion expression with the given name or None.

beta.xbrl.xule.RuleSet.constant(name)

Returns an beta.xbrl.xule.ConstantDeclaration object that represent the top-level constant expression with the given name or None.

beta.xbrl.xule.RuleSet.function(name)

Returns an beta.xbrl.xule.FunctionDeclaration object that represent the top-level function expression with the given name or None.

beta.xbrl.xule.RuleSet.namespace(prefix)

Returns an beta.xbrl.xule.NamespaceDeclaration object that represent the top-level namespace expression with the given prefix or None.

beta.xbrl.xule.RuleSet.output_attribute(name)

Returns an beta.xbrl.xule.OutputAttribute object that represent the top-level output attribute expression with the given name or None.

beta.xbrl.xule.RuleSet.output_rule(name)

Returns an beta.xbrl.xule.OutputRule object that represent the top-level output rule expression with the given name or None.

beta.xbrl.xule.RuleSet.to_json()

Returns an iterator of beta.xbrl.xule.VersionDeclaration objects that represent the top-level version expressions in the XULE parse tree.

Special methods

__eq__, __ge__, __gt__, __le__, __lt__, __ne__