metanorma / metanorma-plugin-lutaml

Metanorma plugin: access LutaML objects from within a Metanorma document
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

Add `config_yaml` functionality to `[lutaml_express]` #108

Closed ronaldtse closed 6 months ago

ronaldtse commented 6 months ago

Adds config_yaml functionality to [lutaml_express].

This functionality allows [lutaml_express] blocks to have a full set of EXPRESS schemas loaded in one index, and then use a filter option per-block via a YAML file:

:lutaml-express-index: schemas_1; schemas_all.yaml;

[lutaml_express, schemas_1, repo, leveloffset=+1,config_yaml=select.yaml]
---
include::templates/resources/_schemas.liquid[]
---

Where select.yaml is just 2 schemas:

---
schemas:
  - action_schema
  - application_context_schema

And schemas_all.yml provides all schemas:

---
schemas:
  action_schema:
    path: "../../schemas/resources/action_schema/action_schema.exp"
  application_context_schema:
    path: "../../schemas/resources/application_context_schema/application_context_schema.exp"
  approval_schema:
    path: "../../schemas/resources/approval_schema/approval_schema.exp"
  basic_attribute_schema:
    path: "../../schemas/resources/basic_attribute_schema/basic_attribute_schema.exp"
  certification_schema:
    path: "../../schemas/resources/certification_schema/certification_schema.exp"
  contract_schema:
    path: "../../schemas/resources/contract_schema/contract_schema.exp"
  date_time_schema:
    path: "../../schemas/resources/date_time_schema/date_time_schema.exp"
  document_schema:
    path: "../../schemas/resources/document_schema/document_schema.exp"
  effectivity_schema:
    path: "../../schemas/resources/effectivity_schema/effectivity_schema.exp"
  experience_schema:
    path: "../../schemas/resources/experience_schema/experience_schema.exp"
  external_reference_schema:
    path: "../../schemas/resources/external_reference_schema/external_reference_schema.exp"
  group_schema:
    path: "../../schemas/resources/group_schema/group_schema.exp"
  language_schema:
    path: "../../schemas/resources/language_schema/language_schema.exp"
  location_schema:
    path: "../../schemas/resources/location_schema/location_schema.exp"
  management_resources_schema:
    path: "../../schemas/resources/management_resources_schema/management_resources_schema.exp"
  measure_schema:
    path: "../../schemas/resources/measure_schema/measure_schema.exp"
  person_organization_schema:
    path: "../../schemas/resources/person_organization_schema/person_organization_schema.exp"
  product_definition_schema:
    path: "../../schemas/resources/product_definition_schema/product_definition_schema.exp"
  product_property_definition_schema:
    path: "../../schemas/resources/product_property_definition_schema/product_property_definition_schema.exp"
  product_property_representation_schema:
    path: "../../schemas/resources/product_property_representation_schema/product_property_representation_schema.exp"
  qualifications_schema:
    path: "../../schemas/resources/qualifications_schema/qualifications_schema.exp"
  security_classification_schema:
    path: "../../schemas/resources/security_classification_schema/security_classification_schema.exp"
  support_resource_schema:
    path: "../../schemas/resources/support_resource_schema/support_resource_schema.exp"
  geometry_schema:
    path: "../../schemas/resources/geometry_schema/geometry_schema.exp"
  topology_schema:
    path: "../../schemas/resources/topology_schema/topology_schema.exp"
  geometric_model_schema:
    path: "../../schemas/resources/geometric_model_schema/geometric_model_schema.exp"
  scan_data_3d_shape_model_schema:
    path: "../../schemas/resources/scan_data_3d_shape_model_schema/scan_data_3d_shape_model_schema.exp"