teidata.point

teidata.point defines the data type used to express a point in cartesian space.
Moduletei — The TEI Infrastructure
Used by
Class:
Element:
Content model
<content>
 <dataRef name="token"
  restriction="(\-?[0-9]+\.?[0-9]*,\-?[0-9]+\.?[0-9]*)"/>

</content>
Declaration
<rng:define name="teidata.point">
 <rng:data type="token">
  <rng:param name="pattern">(\-?[0-9]+\.?[0-9]*,\-?[0-9]+\.?[0-9]*)</rng:param>
 </rng:data>
</rng:define>
teidata.point = token { pattern = "(\-?[0-9]+\.?[0-9]*,\-?[0-9]+\.?[0-9]*)" }
Schematron


<!-- WARNING: this constraint should be examining all elements and attributes whose value or content is defined with teidata.point. However, we have no easy access to that list (which would need to be generated dynamically), so instead it is looking at all @points attributes, which (as of this writing) is the only member of that list. I.e., if you add an attribute or element that uses (or change an existing one to use) teidata.pointer, you likely need to change the @context below to match. -->
<sch:rule context="*[@points]">
<sch:report test="matches( @points, '\.[, ]|\.$')">It is considered poor
practice to end a number with a decimal point; as of 2019-02-25 TEI will
consider this @points attribute of <sch:name/> invalid</sch:report>
</sch:rule>
Example
<facsimile>
 <surface ulx="0uly="0lrx="400lry="280">
  <zone points="220,100 300,210 170,250 123,234">
   <graphic url="handwriting.png "/>
  </zone>
 </surface>
</facsimile>
Note

A point is defined by two numeric values, which should be expressed as decimal numbers.

Currently, this datatype permits either of the two numeric values to end in a decimal point. This practice is deprecated, and as of 2019-02-25 this datatype will no longer permit a number to end in a decimal point. E.g., both 0.0,84.2 and 0,84 are allowed, but 0.,84. will not be.