|
@@ -396,22 +396,18 @@
|
|
|
Slicer uses extensions with dots, but no leading asterisk.
|
|
|
i.e. ".nii,.nrrd,.mha"
|
|
|
|
|
|
- This should be considered the 'minimal/default specification'.
|
|
|
- But most platforms should use defensive programming to cope with
|
|
|
- either an additional asterisk or lack of a leading dot.
|
|
|
+ In CTK, the leading dot is optional. Any preceding asterisk is forbidden.
|
|
|
|
|
|
- So, here we define a regexp restriction to include asterisk and leading dot.
|
|
|
===================================================================
|
|
|
-->
|
|
|
|
|
|
- <xsd:simpleType name="fileExtensionsType">
|
|
|
- <xsd:annotation>
|
|
|
- <xsd:documentation>A comma separated list of allowed file extensions.</xsd:documentation>
|
|
|
- </xsd:annotation>
|
|
|
- <xsd:restriction base="xsd:token">
|
|
|
- <xsd:pattern value="^((\*\.|\.)?[^\*]*)(,(\*\.|\.)?[^\*]*)*$"/>
|
|
|
- </xsd:restriction>
|
|
|
- </xsd:simpleType>
|
|
|
+ <xsd:attribute name="fileExtensions">
|
|
|
+ <xsd:simpleType>
|
|
|
+ <xsd:restriction base="xsd:string">
|
|
|
+ <xsd:pattern value="(?:(?:\.[^,\s]|[^,\.\s\*])[^,\s]*)(?:,\s*(?:\.[^,\s]|[^,\.\s\*])[^,\s]*)*"/>
|
|
|
+ </xsd:restriction>
|
|
|
+ </xsd:simpleType>
|
|
|
+ </xsd:attribute>
|
|
|
|
|
|
<!--
|
|
|
===================================================================
|
|
@@ -422,7 +418,7 @@
|
|
|
<xsd:complexType name="geometryType">
|
|
|
<xsd:complexContent>
|
|
|
<xsd:extension base="multipleType">
|
|
|
- <xsd:attribute name="fileExtensions" type="fileExtensionsType"/>
|
|
|
+ <xsd:attribute ref="fileExtensions"/>
|
|
|
<xsd:attribute name="type">
|
|
|
<xsd:annotation>
|
|
|
<xsd:documentation>Optionally specifies the allowed geometry type.</xsd:documentation>
|
|
@@ -448,7 +444,7 @@
|
|
|
<xsd:complexType name="fileType">
|
|
|
<xsd:complexContent>
|
|
|
<xsd:extension base="multipleType">
|
|
|
- <xsd:attribute name="fileExtensions" type="fileExtensionsType"/>
|
|
|
+ <xsd:attribute ref="fileExtensions"/>
|
|
|
</xsd:extension>
|
|
|
</xsd:complexContent>
|
|
|
</xsd:complexType>
|