openscd / open-scd-core

Apache License 2.0
5 stars 8 forks source link

feat(foundation): add parentTags and childTags for schema 2007B4 #76

Closed JakobVogelsang closed 1 year ago

JakobVogelsang commented 1 year ago

In addition to two existing mixins we need additional SLC utility functions. Two such functions are the here implemented parentTags and childTags. It is unfortunately based on a map instead of the schema itself, with it only is valid for 2007B4 and is tested also only with this version. We can exchange the inner life in a later stage and can keep the tests.

ca-d commented 1 year ago

Do you think we could just call the relatives file "scl" or something and subdivide later if we need more features?

I'd love to have a potential future single "scl" entry point with all scl related functionality for when we try to extract open-xml!

JakobVogelsang commented 1 year ago

Sure we can. You mean to put the code into one ts file called scl in the root directly or within the foundation folder?

foundation | |--> sct.ts

JakobVogelsang commented 1 year ago

Did we just include a 1:1 copy of the tags data structure in the spec file and then check that it's the same structure? Do you think it's feasible to do spot checks against the schema instead?

It seems weird, I know. I still think it is ok for these reasons: