]> Lady’s Gitweb - Vocab/commitdiff
Add ladys:n and ladys:ncName
authorLady <redacted>
Thu, 31 Jul 2025 01:09:53 +0000 (21:09 -0400)
committerLady <redacted>
Thu, 31 Jul 2025 01:13:41 +0000 (21:13 -0400)
DTD
data/datatype_properties/olo¦index
data/datatype_properties/¦n [new file with mode: 0644]
data/datatype_properties/¦ncName [new file with mode: 0644]
parsers/ontology.xslt

diff --git a/DTD b/DTD
index f35a9ec64025d2c1c1b30cff170ddad55b3cccd5..d8d44b34d7d728b6a10ac0e69690ef6acd5bfb4d 100644 (file)
--- a/DTD
+++ b/DTD
@@ -11,6 +11,7 @@ SPDX-License-Identifier: CC0-1.0
 <!ELEMENT code (#PCDATA)>
 <!ELEMENT em (#PCDATA)>
 <!ELEMENT strong (#PCDATA)>
+<!ELEMENT var (#PCDATA)>
 
 <!-- Notes -->
 <!ELEMENT note (%blocks;)>
index 0930507a2e757f3af85345737467230e3a8f6b3a..4c479a8fcc1f20d147aef895ebc10cd2d61e36bd 100644 (file)
@@ -17,6 +17,9 @@ SPDX-License-Identifier: CC0-1.0
        <isDefinedBy>
                <SpecificResource source="(OLO)" fragment="index"/>
        </isDefinedBy>
+       <subPropertyOf>
+               <resource name="n"/>
+       </subPropertyOf>
        <domain>
                <resource name="olo:Slot"/>
        </domain>
diff --git a/data/datatype_properties/¦n b/data/datatype_properties/¦n
new file mode 100644 (file)
index 0000000..e120d9d
--- /dev/null
@@ -0,0 +1,172 @@
+<?xml version="1.0"?>
+<!--
+SPDX-FileCopyrightText: 2025 Lady <https://www.ladys.computer/about/#lady>
+SPDX-License-Identifier: CC0-1.0
+-->
+<!DOCTYPE DatatypeProperty SYSTEM "../../DTD">
+<DatatypeProperty functional="yes" status="testing">
+       <label xml:lang="en">local notation</label>
+       <comment xml:lang="en">
+               <p>
+                       An integer, string, or time·stamp which identifies and orders a thing within a given context.
+               </p>
+               <p>
+                       String values can either be valid <resource name="xsd:NCName"/>¦s or else have the form of a <resource name="xsd:gYearMonth"/> or <resource name="xsd:date"/> with no time·zone component.
+                       These possibilities were selected to ensure that the lexical forms of each type are disjoint.
+               </p>
+               <p>
+                       Because this property is functional, a <resource name="Proxy"/> must be used when local notation depends on a particular context.
+               </p>
+               <p>
+                       Correctly ordering things by local notation involves two steps.
+                       First, the local notation must be split into a tuple of two parts :⁠—
+               </p>
+               <list>
+                       <item>
+                               <p>
+                                       If it is a string which begins with an underscore and contains another underscore which is followed by a period :⁠—
+                               </p>
+                               <list>
+                                       <item>
+                                               <p>
+                                                       Let <var>base</var> be the portion of the string which follows the initial underscore and precedes the first successive underscore‐period sequence.
+                                               </p>
+                                       </item>
+                                       <item>
+                                               <p>
+                                                       Let <var>mod</var> be the portion of the string which follows that same underscore‐period sequence.
+                                               </p>
+                                       </item>
+                                       <item>
+                                               <p>
+                                                       If <var>mod</var> is not itself a valid canonical representation for some local notation, then the first value of the tuple is the original string, and the second value is the empty string.
+                                               </p>
+                                       </item>
+                                       <item>
+                                               <p>
+                                                       Otherwise, if <var>base</var> is a valid <resource name="xsd:NCName"/> or else has the form of a <resource name="xsd:gYearMonth"/> or <resource name="xsd:date"/> with no time·zone component, then the tuple is {<var>base</var>, <var>mod</var>}.
+                                               </p>
+                                       </item>
+                                       <item>
+                                               <p>
+                                                       Otherwise, if <var>base</var> is the canonical representation of some <resource name="xsd:integer"/> <var>int</var>, then the tuple is {<var>int</var>, <var>mod</var>}.
+                                               </p>
+                                       </item>
+                                       <item>
+                                               <p>
+                                                       Otherwise, make the following modifications to <var>base</var> :⁠—
+                                               </p>
+                                               <list>
+                                                       <item>
+                                                               <p>
+                                                                       Replace all underscores in <var>base</var> with plusses.
+                                                               </p>
+                                                       </item>
+                                                       <item>
+                                                               <p>
+                                                                       If <var>base</var> contains <code>T</code>, replace the first two periods in <var>base</var> which follow <code>T</code> (if present) with colons.
+                                                               </p>
+                                                       </item>
+                                                       <item>
+                                                               <p>
+                                                                       If <var>base</var> ends in a digit, replace the final remaining period in <var>base</var> (if present) with a colon.
+                                                               </p>
+                                                       </item>
+                                               </list>
+                                               <p>
+                                                       If, after making the above substitutions, <var>base</var> is the canonical representation of some <resource name="xsd:dateTimeStamp"/> <var>time</var>, then the tuple is {<var>time</var>, <var>mod</var>}.
+                                               </p>
+                                       </item>
+                                       <item>
+                                               <p>
+                                                       Otherwise, the first value of the tuple is the original string, and the second value is the empty string.
+                                               </p>
+                                       </item>
+                               </list>
+                       </item>
+                       <item>
+                               <p>
+                                       Otherwise, the first value of the tuple is the original string, and the second value is the empty string.
+                               </p>
+                       </item>
+               </list>
+               <p>
+                       Then, the values of the tuples can be sorted according to the following rules, with the first part taking priority over the second :⁠—
+               </p>
+               <list>
+                       <item>
+                               <p>
+                                       Empty strings are always sorted first.
+                               </p>
+                       </item>
+                       <item>
+                               <p>
+                                       Integers are sorted by numeric value and come after empty strings.
+                               </p>
+                       </item>
+                       <item>
+                               <p>
+                                       Time·stamps and strings which match <resource name="xsd:gYearMonth"/> or <resource name="xsd:date"/> come after integers, and are sorted according to their corresponding “time on timeline” values, with the following modifications :⁠—
+                               </p>
+                               <list>
+                                       <item>
+                                               <p>
+                                                       For <resource name="xsd:gYearMonth"/> values, the missing day component is treated as the first rather than the last day of the month
+                                               </p>
+                                       </item>
+                                       <item>
+                                               <p>
+                                                       When the “time on timeline” value is the same, <resource name="xsd:gYearMonth"/> sorts before <resource name="xsd:date"/>, and <resource name="xsd:date"/> sorts before <resource name="xsd:dateTimeStamp"/>.
+                                               </p>
+                                       </item>
+                                       <item>
+                                               <p>
+                                                       When the “time on timeline” value is the same for two <resource name="xsd:dateTimeStamp"/> values, they are sorted based on their timezone offsets in ascending order.
+                                               </p>
+                                       </item>
+                               </list>
+                       </item>
+                       <item>
+                               <p>
+                                       Strings which match <resource name="xsd:NCName"/> follow the above, and are sorted lexically by code·point value.
+                               </p>
+                       </item>
+               </list>
+               <p>
+                       The above algorithm effectively establishes a special microsyntax in which <code>_base_.mod</code> will always sort after <code>base</code>, regardless of <code>base</code>¦s type.
+                       When <code>base</code> is a <resource name="xsd:dateTimeStamp"/>, a few reversible modifications need to be made in order to satisfy the <resource name="xsd:NCName"/> syntax :⁠—
+               </p>
+               <list>
+                       <item>
+                               <p>
+                                       Any colons in the time component or time·zone offset must be replaced with periods.
+                               </p>
+                       </item>
+                       <item>
+                               <p>
+                                       A plus in the time·zone offset, if present, must be replaced with an underscore.
+                               </p>
+                       </item>
+               </list>
+       </comment>
+       <subPropertyOf>
+               <resource name="dcterms:identifier"/>
+       </subPropertyOf>
+       <range>
+               <Datatype>
+                       <unionOf>
+                               <resource name="xsd:integer"/>
+                               <resource name="xsd:NCName"/>
+                               <Datatype>
+                                       <onDatatype>
+                                               <resource name="xsd:string"/>
+                                       </onDatatype>
+                                       <withRestrictions>
+                                               <pattern>[0-9]{4}(-[0-9]{2}){1,2}</pattern>
+                                       </withRestrictions>
+                               </Datatype>
+                               <resource name="xsd:dateTimeStamp"/>
+                       </unionOf>
+               </Datatype>
+       </range>
+</DatatypeProperty>
diff --git a/data/datatype_properties/¦ncName b/data/datatype_properties/¦ncName
new file mode 100644 (file)
index 0000000..1284a1b
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!--
+SPDX-FileCopyrightText: 2025 Lady <https://www.ladys.computer/about/#lady>
+SPDX-License-Identifier: CC0-1.0
+-->
+<!DOCTYPE DatatypeProperty SYSTEM "../../DTD">
+<DatatypeProperty status="testing">
+       <label xml:lang="en">n·c name</label>
+       <comment xml:lang="en">
+               <p>
+                       An <resource name="xsd:NCName"/> identifier for this thing.
+               </p>
+       </comment>
+       <subPropertyOf>
+               <resource name="dcterms:identifier"/>
+       </subPropertyOf>
+       <range>
+               <resource name="xsd:NCName"/>
+       </range>
+</DatatypeProperty>
index 2dfdfcf5e8b320d64b20cbd301510d65298f2b43..766d38669a9beed186dae15286d70700ccdd0104 100644 (file)
@@ -371,7 +371,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                <when test="contains(' superClassOf ', $spaced)">
                                        <text>Vocabvocab:</text>
                                </when>
-                               <when test="contains(' code em p strong ', $spaced)">
+                               <when test="contains(' code em p strong var ', $spaced)">
                                        <text>html:</text>
                                </when>
                                <when test="contains(' AllDifferent AllDisjointClasses AllDisjointProperties AnnotationProperty Class DatatypeProperty NamedIndividual NegativeObjectPropertyAssertion ObjectProperty Ontology Restriction allValuesFrom assertionProperty cardinality complementOf datatypeComplementOf differentFrom disjointUnionOf disjointWith equivalentClass equivalentProperty hasKey hasSelf hasValue intersectionOf inverseOf maxCardinality maxQualifiedCardinality members minCardinality minQualifiedCardinality onClass onDataRange onDatatype onProperty oneOf propertyChainAxiom propertyDisjointWith qualifiedCardinality sameAs someValuesFrom sourceIndividual targetIndividual unionOf withRestrictions ', $spaced)">
This page took 0.030084 seconds and 4 git commands to generate.