Skip to content

Commit

Permalink
add shex support
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-1991 committed May 24, 2024
1 parent d2371d2 commit 1b9f07b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions templates/shex.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX md: <http://mdmodel.net/>
{%- for prefix, address in prefixes %}
PREFIX {{prefix}}: <{{address}}>
{%- endfor %}
{% for object in objects%}
md:{{object.name}} {
{%- for attr in object.attributes %}
{%- if attr.term %}

{%- if attr.dtypes[0] in object_names %}
md:{{attr.term}} @md:{{attr.dtypes[0]}}{% if attr.required is false %}?{% endif %};
{%- else %}
{{attr.term}} xsd:{{attr.dtypes[0]}}{% if attr.required is false %}?{% endif %};
{%- endif %}

{%- endif %}
{%- endfor %}
}
{%- endfor %}

0 comments on commit 1b9f07b

Please sign in to comment.