mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 12:23:44 +00:00
fix imports and move ids_schema outside
This commit is contained in:
@@ -1,9 +1,13 @@
|
|||||||
import operator
|
import operator
|
||||||
import ifcopenshell.util.element
|
import ifcopenshell.util.element
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from xmlschema import XMLSchema
|
from xmlschema import XMLSchema
|
||||||
from xmlschema.validators import facets, identities
|
from xmlschema import etree_tostring
|
||||||
|
from xmlschema.validators import facets
|
||||||
|
from xmlschema.validators import identities
|
||||||
|
|
||||||
|
ids_schema = XMLSchema("http://standards.buildingsmart.org/IDS/ids.xsd")
|
||||||
|
|
||||||
|
|
||||||
class exception(Exception):
|
class exception(Exception):
|
||||||
pass
|
pass
|
||||||
@@ -412,8 +416,7 @@ class ids:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def parse(fn):
|
def parse(fn, ids_schema=ids_schema):
|
||||||
ids_schema = XMLSchema("http://standards.buildingsmart.org/IDS/ids.xsd")
|
|
||||||
ids_schema.validate(fn)
|
ids_schema.validate(fn)
|
||||||
|
|
||||||
ids_content = ids_schema.to_dict(fn)
|
ids_content = ids_schema.to_dict(fn)
|
||||||
|
|||||||
Reference in New Issue
Block a user