Skip to content

Commit

Permalink
chore: update data.xsd regarding TextValue encoding for hasComment (#811
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Nora-Olivia-Ammann committed Feb 15, 2024
1 parent 443195f commit af86b94
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
13 changes: 12 additions & 1 deletion src/dsp_tools/resources/schema/data.xsd
Expand Up @@ -83,6 +83,17 @@
<xs:attribute name="permissions" type="xs:NCName" use="optional"/>
</xs:complexType>

<!-- xml encoding value type -->
<xs:complexType name="xml_encoding_text_type" mixed="true">
<xs:sequence>
<xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="encoding" fixed="xml" use="required"/>
<xs:attribute name="resrefs" type="resrefs_type"/>
<xs:attribute name="comment" type="xs:string"/>
<xs:attribute name="permissions" type="xs:NCName" use="optional"/>
</xs:complexType>

<!-- color value type -->
<xs:complexType name="color_type">
<xs:simpleContent>
Expand Down Expand Up @@ -339,7 +350,7 @@
<!-- builtin_hasComment_prop_type -->
<xs:complexType name="builtin_hasComment_prop_type">
<xs:sequence>
<xs:element name="text" type="text_type" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="text" type="xml_encoding_text_type" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" fixed="hasComment"/>
</xs:complexType>
Expand Down
2 changes: 1 addition & 1 deletion testdata/xml-data/test-data-fast-xmlupload.xml
Expand Up @@ -2,7 +2,7 @@
<knora
xmlns="https://dasch.swiss/schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://dasch.swiss/schema https://raw.githubusercontent.com/dasch-swiss/dsp-tools/main/src/dsp_tools/schemas/data.xsd"
xsi:schemaLocation="https://dasch.swiss/schema ../../src/dsp_tools/resources/schema/data.xsd"
shortcode="00E0"
default-ontology="fast-xmlupload-onto"
>
Expand Down
5 changes: 2 additions & 3 deletions testdata/xml-data/test-data-systematic.xml
Expand Up @@ -55,8 +55,8 @@
permissions="res-default"
creation_date="2005-10-23T13:45:12.01-14:00">
<text-prop name="hasComment">
<text encoding="utf8" permissions="prop-default">This is an annotation to TestthingOhnePermissions.</text>
<text encoding="utf8" permissions="prop-default">Second comment</text>
<text encoding="xml" permissions="prop-default">This is an annotation to TestthingOhnePermissions.</text>
<text encoding="xml" permissions="prop-default">Second comment</text>
</text-prop>
<resptr-prop name="isAnnotationOf">
<resptr permissions="prop-default">test_thing_0</resptr>
Expand Down Expand Up @@ -185,7 +185,6 @@
permissions="res-default">
<text-prop name=":hasSimpleText">
<text permissions="prop-default" encoding="utf8">Dies ist ein einfacher Text ohne Markup</text>
<text permissions="prop-restricted" encoding="xml">Ein XML-formatierter Text <strong>mit Markup</strong></text>
<text encoding="utf8">_</text>
<text encoding="utf8">!</text>
<text encoding="utf8">?</text>
Expand Down

0 comments on commit af86b94

Please sign in to comment.