From: Lady Date: Sat, 19 Oct 2024 16:43:33 +0000 (-0400) Subject: Support language tag and profile X-Git-Tag: 0.2.2^0 X-Git-Url: https://git.ladys.computer/LesML/commitdiff_plain/57aba756b5ea79520435489e8ef33111070325eb?ds=inline Support language tag and profile This commit provides initial support for language‐tagged Les·M·L documents and additional document properties. Only one property is supported: `profile`. Language tags are themselves internally treated as properties whose key contains spaces; property keys cannot ordinarily contain spaces so there is no concern for confusion. --- diff --git a/README.markdown b/README.markdown index adb7e26..7df7fde 100644 --- a/README.markdown +++ b/README.markdown @@ -28,9 +28,18 @@ It is implemented as an X·S·L·T transformation from a The first line of any 💄📝 Les·M·L document should be the string `#!lesml`. - -Following the shebang, document metadata may be provided in the [Record - Jar][draft-phillips-record-jar-01] format. +A language tag may follow this, beginning with `@` and terminated with + `$`, like so: +`#!lesml@en$`. +Regardless of whether a language tag is present, the shebang line may + be terminated by a space‐separated list of properties of the form + `key=value`. +Only one property is currently permitted: `profile`, whose value should + be a U·R·I and is translated to the `@data-lesml-profile` attribute + on the resulting `` element. + +Following the shebang line, document metadata may be provided in the + [Record Jar][draft-phillips-record-jar-01] format. The body of the document begins after the last line which begins with the string `%%`, or after the shebang line if none exists. diff --git a/parser.xslt b/parser.xslt index f2279d8..86c28ea 100644 --- a/parser.xslt +++ b/parser.xslt @@ -122,6 +122,12 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one