Linux premium155.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
LiteSpeed
: 162.0.235.200 | : 18.117.8.177
Cant Read [ /etc/named.conf ]
7.4.33
varifktc
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
opt /
hc_python /
lib /
python3.8 /
site-packages /
lxml /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
html
[ DIR ]
drwxr-xr-x
includes
[ DIR ]
drwxr-xr-x
isoschematron
[ DIR ]
drwxr-xr-x
ElementInclude.py
8.36
KB
-rw-r--r--
__init__.py
574
B
-rw-r--r--
_elementpath.cpython-38-x86_64...
490.06
KB
-rwxr-xr-x
_elementpath.py
10.63
KB
-rw-r--r--
apihelpers.pxi
62.12
KB
-rw-r--r--
builder.cpython-38-x86_64-linu...
252.29
KB
-rwxr-xr-x
builder.py
7.91
KB
-rw-r--r--
classlookup.pxi
21.91
KB
-rw-r--r--
cleanup.pxi
8.26
KB
-rw-r--r--
cssselect.py
3.23
KB
-rw-r--r--
debug.pxi
3.21
KB
-rw-r--r--
docloader.pxi
5.64
KB
-rw-r--r--
doctestcompare.py
17.32
KB
-rw-r--r--
dtd.pxi
14.87
KB
-rw-r--r--
etree.cpython-38-x86_64-linux-...
10.02
MB
-rwxr-xr-x
etree.h
9.68
KB
-rw-r--r--
etree.pyx
129.52
KB
-rw-r--r--
etree_api.h
16.62
KB
-rw-r--r--
extensions.pxi
32.56
KB
-rw-r--r--
iterparse.pxi
16.14
KB
-rw-r--r--
lxml.etree.h
9.68
KB
-rw-r--r--
lxml.etree_api.h
16.62
KB
-rw-r--r--
nsclasses.pxi
8.92
KB
-rw-r--r--
objectify.cpython-38-x86_64-li...
4.84
MB
-rwxr-xr-x
objectify.pyx
74
KB
-rw-r--r--
objectpath.pxi
11.18
KB
-rw-r--r--
parser.pxi
79.95
KB
-rw-r--r--
parsertarget.pxi
6.18
KB
-rw-r--r--
proxy.pxi
23.14
KB
-rw-r--r--
public-api.pxi
6.51
KB
-rw-r--r--
pyclasslookup.py
92
B
-rw-r--r--
readonlytree.pxi
18.53
KB
-rw-r--r--
relaxng.pxi
6.19
KB
-rw-r--r--
sax.cpython-38-x86_64-linux-gn...
419.46
KB
-rwxr-xr-x
sax.py
9.08
KB
-rw-r--r--
saxparser.pxi
32.78
KB
-rw-r--r--
schematron.pxi
5.77
KB
-rw-r--r--
serializer.pxi
66.36
KB
-rw-r--r--
usedoctest.py
230
B
-rw-r--r--
xinclude.pxi
2.4
KB
-rw-r--r--
xmlerror.pxi
48.54
KB
-rw-r--r--
xmlid.pxi
5.93
KB
-rw-r--r--
xmlschema.pxi
8.29
KB
-rw-r--r--
xpath.pxi
18.68
KB
-rw-r--r--
xslt.pxi
35.18
KB
-rw-r--r--
xsltext.pxi
10.83
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : schematron.pxi
# support for Schematron validation from lxml.includes cimport schematron cdef class SchematronError(LxmlError): """Base class of all Schematron errors. """ cdef class SchematronParseError(SchematronError): """Error while parsing an XML document as Schematron schema. """ cdef class SchematronValidateError(SchematronError): """Error while validating an XML document with a Schematron schema. """ ################################################################################ # Schematron cdef class Schematron(_Validator): """Schematron(self, etree=None, file=None) A Schematron validator. Pass a root Element or an ElementTree to turn it into a validator. Alternatively, pass a filename as keyword argument 'file' to parse from the file system. Schematron is a less well known, but very powerful schema language. The main idea is to use the capabilities of XPath to put restrictions on the structure and the content of XML documents. Here is a simple example:: >>> schematron = Schematron(XML(''' ... <schema xmlns="http://www.ascc.net/xml/schematron" > ... <pattern name="id is the only permitted attribute name"> ... <rule context="*"> ... <report test="@*[not(name()='id')]">Attribute ... <name path="@*[not(name()='id')]"/> is forbidden<name/> ... </report> ... </rule> ... </pattern> ... </schema> ... ''')) >>> xml = XML(''' ... <AAA name="aaa"> ... <BBB id="bbb"/> ... <CCC color="ccc"/> ... </AAA> ... ''') >>> schematron.validate(xml) 0 >>> xml = XML(''' ... <AAA id="aaa"> ... <BBB id="bbb"/> ... <CCC/> ... </AAA> ... ''') >>> schematron.validate(xml) 1 Schematron was added to libxml2 in version 2.6.21. Before version 2.6.32, however, Schematron lacked support for error reporting other than to stderr. This version is therefore required to retrieve validation warnings and errors in lxml. """ cdef schematron.xmlSchematron* _c_schema cdef xmlDoc* _c_schema_doc def __cinit__(self): self._c_schema = NULL self._c_schema_doc = NULL def __init__(self, etree=None, *, file=None): cdef _Document doc cdef _Element root_node cdef xmlNode* c_node cdef char* c_href cdef schematron.xmlSchematronParserCtxt* parser_ctxt = NULL _Validator.__init__(self) if not config.ENABLE_SCHEMATRON: raise SchematronError, \ "lxml.etree was compiled without Schematron support." if etree is not None: doc = _documentOrRaise(etree) root_node = _rootNodeOrRaise(etree) self._c_schema_doc = _copyDocRoot(doc._c_doc, root_node._c_node) parser_ctxt = schematron.xmlSchematronNewDocParserCtxt(self._c_schema_doc) elif file is not None: filename = _getFilenameForFile(file) if filename is None: # XXX assume a string object filename = file filename = _encodeFilename(filename) with self._error_log: orig_loader = _register_document_loader() parser_ctxt = schematron.xmlSchematronNewParserCtxt(_cstr(filename)) _reset_document_loader(orig_loader) else: raise SchematronParseError, "No tree or file given" if parser_ctxt is NULL: if self._c_schema_doc is not NULL: tree.xmlFreeDoc(self._c_schema_doc) self._c_schema_doc = NULL raise MemoryError() try: with self._error_log: orig_loader = _register_document_loader() self._c_schema = schematron.xmlSchematronParse(parser_ctxt) _reset_document_loader(orig_loader) finally: schematron.xmlSchematronFreeParserCtxt(parser_ctxt) if self._c_schema is NULL: raise SchematronParseError( "Document is not a valid Schematron schema", self._error_log) def __dealloc__(self): schematron.xmlSchematronFree(self._c_schema) if self._c_schema_doc is not NULL: tree.xmlFreeDoc(self._c_schema_doc) def __call__(self, etree): """__call__(self, etree) Validate doc using Schematron. Returns true if document is valid, false if not.""" cdef _Document doc cdef _Element root_node cdef xmlDoc* c_doc cdef schematron.xmlSchematronValidCtxt* valid_ctxt cdef int ret assert self._c_schema is not NULL, "Schematron instance not initialised" doc = _documentOrRaise(etree) root_node = _rootNodeOrRaise(etree) valid_ctxt = schematron.xmlSchematronNewValidCtxt( self._c_schema, schematron.XML_SCHEMATRON_OUT_ERROR) if valid_ctxt is NULL: raise MemoryError() try: self._error_log.clear() # Need a cast here because older libxml2 releases do not use 'const' in the functype. schematron.xmlSchematronSetValidStructuredErrors( valid_ctxt, <xmlerror.xmlStructuredErrorFunc> _receiveError, <void*>self._error_log) c_doc = _fakeRootDoc(doc._c_doc, root_node._c_node) with nogil: ret = schematron.xmlSchematronValidateDoc(valid_ctxt, c_doc) _destroyFakeDoc(doc._c_doc, c_doc) finally: schematron.xmlSchematronFreeValidCtxt(valid_ctxt) if ret == -1: raise SchematronValidateError( "Internal error in Schematron validation", self._error_log) if ret == 0: return True else: return False
Close