This commit changes the Record‐Jar processing to allow colons in terms,
since colons in values can be provided by using a continuation line.
This change allows for the use of I·R·I¦s as terms, which can be
beneficial for some kinds of metadata.
Message-type: text/lesml
-<div xmlns="http://www.w3.org/1999/xhtml"><!-- document comment--><!-- this is allowed following the opening shebang--><article lang="en" xml:lang="en" data-lesml-profile="about:test"><footer class="head"><dl><div><dt>Key</dt><dd>Value</dd></div></dl><!--comm--><!--ent--><dl><div><dt/><dd>Key value</dd></div></dl><dl><div><dt>multiline</dt><dd>keyand value</dd></div></dl><dl><div><dt>bad spaced</dt><dd>key</dd></div></dl></footer><div class="body"/></article></div>
+<div xmlns="http://www.w3.org/1999/xhtml"><!-- document comment--><!-- this is allowed following the opening shebang--><article lang="en" xml:lang="en" data-lesml-profile="about:test"><footer class="head"><dl><div><dt>Key</dt><dd>Value</dd></div></dl><!--comm--><!--ent--><dl><div><dt>multiline</dt><dd>keyand value</dd></div></dl><dl><div><dt>bad spaced</dt><dd>key</dd></div></dl><dl><div><dt>urn:fdc:example.com:0000:key_with_colon</dt><dd>a value</dd></div><div><dt>a key</dt><dd>a:value:with:a:colon</dd></div></dl></footer><div class="body"/></article></div>
--- /dev/null
+#?lesml@en$ profile=about:test
+## document comment
+## this is allowed following the opening shebang
+%%
+Key Value
+%%
multiline: key
and \
value
%%
bad spaced : key
%%
multiline: key
and \
value
%%
bad spaced : key
%%
+urn:fdc:example.com:0000:key_with_colon: a value
+a key:
+ a:value:with:a:colon
+%%
<?xml version="1.0"?>
<!--
<?xml version="1.0"?>
<!--
-@(#)💄📝 Les·M·L xslt/lesml.xslt 2026-03-31T01:31:16Z
+@(#)💄📝 Les·M·L xslt/lesml.xslt 2026-08-08T04:43:47Z
SPDX-FileCopyrightText: 2024, 2025, 2026 Lady <https://www.ladys.computer/about/#lady>
SPDX-License-Identifier: MPL-2.0
-->
SPDX-FileCopyrightText: 2024, 2025, 2026 Lady <https://www.ladys.computer/about/#lady>
SPDX-License-Identifier: MPL-2.0
-->
<choose>
<when test="contains(' 	', substring(., 1, 1)) and exslset:has-same-node($fields, preceding-sibling::*[1])"/>
<otherwise>
<choose>
<when test="contains(' 	', substring(., 1, 1)) and exslset:has-same-node($fields, preceding-sibling::*[1])"/>
<otherwise>
+ <variable name="firstsplit" select="LesML:split(., ':')"/>
+ <variable name="term">
+ <for-each select="$firstsplit[last()>position()]">
+ <if test="position()>1">
+ <text>:</text>
+ </if>
+ <value-of select="."/>
+ </for-each>
+ </variable>
+ <variable name="firstline">
+ <value-of select="normalize-space($firstsplit[last()])"/>
+ </variable>
<variable name="next" select="$following[not(contains(' 	', substring(., 1, 1)))][1]"/>
<variable name="next" select="$following[not(contains(' 	', substring(., 1, 1)))][1]"/>
+ <if test="2>count($firstsplit)">
+ <message terminate="yes">
+ <text>Invalid field: Missing colon.</text>
+ </message>
+ </if>
<element name="div" namespace="&xhtml;">
<element name="dt" namespace="&xhtml;">
<element name="div" namespace="&xhtml;">
<element name="dt" namespace="&xhtml;">
- <value-of select="normalize-space(substring-before(., ':'))"/>
+ <value-of select="normalize-space($term)"/>
</element>
<element name="dd" namespace="&xhtml;">
</element>
<element name="dd" namespace="&xhtml;">
- <variable name="firstline">
- <choose>
- <when test="contains(., ':')">
- <value-of select="normalize-space(substring-after(., ':'))"/>
- </when>
- <otherwise>
- <value-of select="normalize-space(.)"/>
- </otherwise>
- </choose>
- </variable>
<choose>
<when test="substring($firstline, string-length($firstline))='\' and $following[position()=1 and contains(' 	', substring(., 1, 1))]">
<value-of select="substring($firstline, 1, string-length($firstline)-1)"/>
<choose>
<when test="substring($firstline, string-length($firstline))='\' and $following[position()=1 and contains(' 	', substring(., 1, 1))]">
<value-of select="substring($firstline, 1, string-length($firstline)-1)"/>