]> Lady’s Gitweb - Caudex/commitdiff
Update ⛩📰 书社; use 💄📝 Les·M·L as markup format
authorLady <redacted>
Thu, 15 Aug 2024 00:18:47 +0000 (20:18 -0400)
committerLady <redacted>
Thu, 15 Aug 2024 00:38:14 +0000 (20:38 -0400)
There are a lot of open questions about whether this catalog‐based
build process is the correct approach given newer ⛩📰 书社 features
like expanded archives; more radical changes maybe to come. This commit
mostly just removes work which has now been taken else·where.

12 files changed:
.gitmodules
\9b©ï¸\8fð\9f\93° [deleted submodule]
\9b©ð\9f\93° [new submodule]
\9f\92\84ð\9f\93\9d [new submodule]
GNUmakefile
README.markdown
lib/split.xslt [deleted file]
magic/codex-entry [deleted file]
parsers/codex-entry.xslt [deleted file]
transforms/entry.xslt
transforms/index.xslt
transforms/metadata.xslt

index 51a8c8e537655a723b97eb9127fc07fb241d2158..357a9aea6f7bb9ea8df1fcb578c11c6ed6c4859d 100644 (file)
@@ -1,3 +1,6 @@
 [submodule "书社"]
-       path = .⛩📰
+       path = .⛩📰
        url = https://git.ladys.computer/Shushe.git
+[submodule "LesML"]
+       path = .💄📝
+       url = https://git.ladys.computer/LesML.git
diff --git a/.â\9b©ï¸\8fð\9f\93° b/.â\9b©ï¸\8fð\9f\93°
deleted file mode 160000 (submodule)
index 2a4b2ff..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 2a4b2ff1cb88305fb662deda701ee23afbf56498
diff --git a/.â\9b©ð\9f\93° b/.â\9b©ð\9f\93°
new file mode 160000 (submodule)
index 0000000..84e79eb
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 84e79eb9ea63d28dfa93dfe7d3acd457905cc53e
diff --git a/.ð\9f\92\84ð\9f\93\9d b/.ð\9f\92\84ð\9f\93\9d
new file mode 160000 (submodule)
index 0000000..608a140
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 608a1404e5b5f27df451d8a4c50c1c356a39a8d5
index 8fa6dfc5f79c7cc2ab828a0b0de8bc5a2c55a491..274a0b448814b2e30b2ed8bac762ab80ba1d257e 100644 (file)
@@ -8,7 +8,7 @@ override define makefileinfo
 ╟┬ ¶ Prerequisites ───────────────────────────────────────────┬╢
 ║│                                                            │║
 ║│ Requires G·N·U Make, at least version 3.81, and all of the │║
-║│ requirements of ⛩📰 书社, which is included as a git      │║
+║│ requirements of ⛩📰 书社, which is included as a git      │║
 ║│ submodule. Run `make help-shushe´ for more information.    │║
 ║╰────────────────────────────────────────────────────────────╯║
 ╟┬ ¶ Usage ───────────────────────────────────────────────────┬╢
@@ -44,7 +44,7 @@ override define makefileinfo
 ║╰────────────────────────────────────────────────────────────╯║
 ╟┬ ¶ Copyright & License ─────────────────────────────────────┬╢
 ║│                                                            │║
-║│ Copyright © 2024 Lady [@ Lady’s Computer].                 │║
+║│ Copyright © 2024 Lady [@ Ladys Computer].                  │║
 ║│                                                            │║
 ║│ This Source Code Form is subject to the terms of the       │║
 ║│ Mozilla Public License, v 2.0. If a copy of the M·P·L was  │║
@@ -60,10 +60,9 @@ endef
 #
 # If these are not installed on your computer, or you need to use a different implementation, you can override the appropriate variable.
 #
-# See also the documentation for ⛩📰 书社, which specifies additional programs.
+# See also the documentation for ⛩📰 书社, which specifies additional programs.
 AWK := awk
 CAT := cat
-ECHO := echo
 GIT := git
 MKDIR := mkdir
 OD := od
@@ -90,38 +89,40 @@ BUILDDIR := build
 # The directory into which to output files on `make´.
 DESTDIR := public
 
-# The location of this Makefile (and related ⛩️📰 书社 files), relative to the current working directory.
+# The location of this Makefile, relative to the current working directory.
+#
+# It is expected that other files packaged as a part of 🪾📰 Caudex can also be found in this directory.
 #
 # By default, this is inferred from the variable `MAKEFILE_LIST´.
 THISDIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
 
-# Extra magic files to forward to ⛩📰 书社.
+# Extra magic files to forward to ⛩📰 书社.
 #
 # Your computer probably has several already installed at `/usr/share/file/magic´.
 EXTRAMAGIC :=
 
-# Extra parsers to forward to ⛩📰 书社.
+# Extra parsers to forward to ⛩📰 书社.
 #
 # Which parsers are provided will influence which kinds of files are recognized as plaintext.
 EXTRAPARSERS :=
 
-# Extra transforms to forward to ⛩📰 书社.
+# Extra transforms to forward to ⛩📰 书社.
 EXTRATRANSFORMS :=
 
+# A description of the current git revision of 🪾📰 Caudex.
+THISREV := $(shell cd $(THISDIR); $(GIT) describe 2> /dev/null || $(GIT) rev-parse HEAD 2> /dev/null || true)
+
 # Variables to communicate to further calls to Make.
 #
 # By default, `MAKEOVERRIDES´ contains all variable overrides specified on the commandline.
 # However, some values are specific to 🪾📰 Caudex and may have different meaning in other make·files; filter these out.
-MAKEOVERRIDES := $(filter-out SRCDIR=% ASSETDIR=% BUILDDIR=% DESTDIR=% THISDIR=% EXTRAMAGIC=% EXTRAPARSERS=% EXTRATRANSFORMS=%,$(MAKEOVERRIDES))
+MAKEOVERRIDES := $(filter-out SRCDIR=% ASSETDIR=% BUILDDIR=% DESTDIR=% THISDIR=% EXTRAMAGIC=% EXTRAPARSERS=% EXTRATRANSFORMS=% THISREV=%,$(MAKEOVERRIDES))
 
-# The location of ⛩️📰 书社.
-SHUSHE := $(THISDIR)/.⛩️📰
+# The location of 💄📝 Les·M·L.
+LESML := $(THISDIR)/.💄📝
 
-# The name of the generator program.
-GENERATOR := 🪾📰 Caudex
-
-# A description of the current git revision of 🪾📰 Caudex.
-VERSION := $(shell cd $(THISDIR); $(GIT) describe 2> /dev/null || $(GIT) rev-parse HEAD 2> /dev/null || true)
+# The location of ⛩📰 书社.
+SHUSHE := $(THISDIR)/.⛩📰
 
 # Set to a non·empty value to print all commands as they run.
 VERBOSE :=
@@ -160,7 +161,7 @@ override entriesforcategory = $(sort $(foreach category,$1,$(wildcard $(SRCDIR)/
 override wrmg = $(foreach attempt,$(shell $(OD) -t u4 -N 4 /dev/random | $(SED) 's/^[0-9]* *//' | $(TR) -d ' \n' | $(AWK) 'BEGIN{chars="0123456789ABCDEFGHJKMNPQRSTVWXYZ&~@=U"}{d=32^5;r=$$0%(32^6);printf("%s",substr(chars,r%37,1));while(d>0){printf("%s", substr(chars,int(r/d),1));if(d==32^4)printf("%s", "-");r%=d;d=int(d/32)}}'),$(if $(wildcard $(SRCDIR)/*/($(attempt))*),$(call wrmg),$(attempt)))
 
 # (callable) Returns the identifiers of the provided entries.
-override identifier = $(shell $(TR) ' ' '\n' <<< $(call quote,$1) | $(SED) 's/^\(.*[/]\)\{0,1\}\(.\{3\}-.\{4\}\)\(,[^/]*\)\{0,1\}$$/\2/')
+override identifier = $(shell $(PRINTF) '%s\n' $(call quote,$1) | $(TR) ' ' '\n' | $(SED) 's/^\(.*[/]\)\{0,1\}\(.\{3\}-.\{4\}\)\(,[^/]*\)\{0,1\}$$/\2/')
 
 # Output locations for compiled catalog files for categories.
 override categorycatalogs := $(patsubst %,$(BUILDDIR)/catalogs/categories/%/index,$(categories))
@@ -171,8 +172,8 @@ override entrycatalogs := $(foreach entry,$(call entriesforcategory,$(categories
 # Output locations for all compiled catalog files.
 override allcatalogs := $(BUILDDIR)/catalogs/indices/index $(BUILDDIR)/catalogs/indices/fullindex $(categorycatalogs) $(entrycatalogs)
 
-# (overridable) Options to pass to ⛩📰 书社.
-override shusheopts := SRCDIR=$(call quote,$(if $(wildcard $(ASSETDIR)),$(ASSETDIR),) $(if $(entrycatalogs),$(BUILDDIR)/catalogs/entries,) $(BUILDDIR)/catalogs/indices) BUILDDIR=$(call quote,$(BUILDDIR)/⛩️📰) INCLUDEDIR=$(call quote,$(SRCDIR) $(if $(wildcard $(ASSETINCLUDEDIR)),$(ASSETINCLUDEDIR),) $(if $(categorycatalogs),$(BUILDDIR)/catalogs/categories,)) DESTDIR=$(call quote,$(DESTDIR)) EXTRAMAGIC=$(call quote,$(sort $(patsubst ./%,%,$(wildcard $(THISDIR)/magic/*)) $(EXTRAMAGIC))) EXTRAPARSERS=$(call quote,$(sort $(patsubst ./%,%,$(wildcard $(THISDIR)/parsers/*.xslt)) $(EXTRAPARSERS))) EXTRATRANSFORMS=$(call quote,$(sort $(patsubst ./%,%,$(wildcard $(THISDIR)/transforms/*.xslt)) $(EXTRATRANSFORMS))) GENERATOR=$(call quote,$(GENERATOR)) VERSION=$(call quote,$(VERSION))
+# (overridable) Options to pass to ⛩📰 书社.
+override shusheopts := SRCDIR=$(call quote,$(if $(wildcard $(ASSETDIR)),$(ASSETDIR),) $(if $(entrycatalogs),$(BUILDDIR)/catalogs/entries,) $(BUILDDIR)/catalogs/indices) BUILDDIR=$(call quote,$(BUILDDIR)/⛩📰) INCLUDEDIR=$(call quote,$(SRCDIR) $(if $(wildcard $(ASSETINCLUDEDIR)),$(ASSETINCLUDEDIR),) $(if $(categorycatalogs),$(BUILDDIR)/catalogs/categories,)) DESTDIR=$(call quote,$(DESTDIR)) EXTRAMAGIC=$(call quote,$(sort $(patsubst ./%,%,$(wildcard $(THISDIR)/magic/*)) $(LESML)/magic $(EXTRAMAGIC))) EXTRAPARSERS=$(call quote,$(sort $(patsubst ./%,%,$(wildcard $(THISDIR)/parsers/*.xslt)) $(LESML)/parser.xslt $(EXTRAPARSERS))) EXTRATRANSFORMS=$(call quote,$(sort $(patsubst ./%,%,$(wildcard $(THISDIR)/transforms/*.xslt)) $(EXTRATRANSFORMS)))
 
 # ─ ¶ Recipe Variable Definitions ─────────────────────────────────────
 
@@ -206,14 +207,14 @@ $(silent)$(XMLCATALOG) --add uri '@' '@' --noout $(call quote,$(BUILDDIR)/catalo
 $(foreach category,$(categories),$(silent)$(XMLCATALOG) --add uri $(call quote,$(category)) $(call quote,$(category)/index) --noout $(call quote,$(BUILDDIR)/catalogs/indices/$(if $1,full,)index)$(newline))
 endef
 
-# ─ ¶ ⛩📰 书社 Targets ──────────────────────────────────────────────
+# ─ ¶ ⛩📰 书社 Targets ──────────────────────────────────────────────
 
-# Targets to forward to ⛩📰 书社.
+# Targets to forward to ⛩📰 书社.
 all install list uninstall : $(SHUSHE)/GNUmakefile catalogs
        $(silent)$(MAKE) -f $(call quote,$<) $(call quote,$@) $(shusheopts)
 %-shushe : $(SHUSHE)/GNUmakefile FORCE
        $(silent)$(MAKE) -f $(call quote,$<) $(call quote,$*) $(shusheopts)
-build/⛩📰/% : $(SHUSHE)/GNUmakefile catalogs FORCE
+build/⛩📰/% : $(SHUSHE)/GNUmakefile catalogs FORCE
        $(SILENT)$(MAKE) -f $(call quote,$<) $(call quote,$@) $(shusheopts)
 public/% : $(SHUSHE)/GNUmakefile catalogs FORCE
        $(SILENT)$(MAKE) -f $(call quote,$<) $(call quote,$@) $(shusheopts)
@@ -243,13 +244,13 @@ listids :
 
 # Output a random unused identifier.
 wrmg :
-       @$(ECHO) $(wrmg)
+       @$(PRINTF) '%s\n' $(wrmg)
 
 # Create a new entry in the provided category and output its path.
 +% : FORCE
        $(silent)$(call ensuredirectory,$(SRCDIR)/$*)
        $(if $(wildcard $(SRCDIR)/$*/@),,$(silent)$(PRINTF) '%b' '%%\nCATEGORY : $*\n%%\n' > '$(SRCDIR)/$*/@')
-       $(foreach identifier,$(wrmg),@$(PRINTF) '%b' '%%\nENTRY : $(identifier)\n%%\n\n' > '$(SRCDIR)/$*/$(identifier)'$(newline)@$(ECHO) '$(SRCDIR)/$*/$(identifier)')
+       $(foreach identifier,$(wrmg),@$(PRINTF) '%b' '\0043!lesml\nENTRY : $(identifier)\n%%\n\n' > '$(SRCDIR)/$*/$(identifier)'$(newline)@$(PRINTF) '%s\n' '$(SRCDIR)/$*/$(identifier)')
 
 # ─ ¶ Special Targets ─────────────────────────────────────────────────
 
@@ -269,14 +270,19 @@ FORCE : ;
 
 # ─ ¶ Build Targets ───────────────────────────────────────────────────
 
-# Initialize the ⛩️📰 书社 repository if it is empty.
+# Initialize the ⛩📰 书社 repository if it is empty.
+ifneq ($(filter $(THISDIR)/%,$(SHUSHE)),)
 $(SHUSHE)/GNUmakefile : $(THISDIR)/%/GNUmakefile :
        @$(PRINTF) '%s\n' $(call quote,Initializing git submodule at `$*´)
        $(silent)cd $(THISDIR) && $(GIT) submodule update --init $(call quote,$*)
+endif
 
-# Touch parsers and transforms if the files in `lib/´ have changed.
-$(PARSERS) $(TRANSFORMS) : $(wildcard lib/*.xslt)
-       $(silent)$(TOUCH) $(call quote,$@)
+# Initialize the 💄📝 Les·M·L repository if it is empty.
+ifneq ($(filter $(THISDIR)/%,$(LESML)),)
+$(LESML)/parser.xslt : $(THISDIR)/%/parser.xslt :
+       @$(PRINTF) '%s\n' $(call quote,Initializing git submodule at `$*´)
+       $(silent)cd $(THISDIR) && $(GIT) submodule update --init $(call quote,$*)
+endif
 
 # Create an empty codex metadata file if none exists.
 $(SRCDIR)/@ :
index d0c0d0d6b9fee8b875c3a387b5debe8c20ff3325..90470f6934b5300340d5fdb384ff797ecd5f1377 100644 (file)
@@ -5,7 +5,7 @@
 <dfn>🪾📰 Caudex</dfn> is a static website generator aimed at
   generating simple, category⹀based lists of documents akin to the
   “Codex” feature of games like <cite>Dragon Age</cite>.
-It is built on top of [⛩📰 书社][Shushe] and consequently inherits
+It is built on top of [⛩📰 书社][Shushe] and consequently inherits
   all of the (few) dependencies and prerequisites of the latter.
 
 Using 🪾📰 Caudex is fairly straightforward, but customizing its
@@ -73,10 +73,10 @@ $(CAUDEX)/GNUmakefile:
 
 ## Setup and Configuration
 
-🪾📰 Caudex inherits all of the dependencies of ⛩📰 书社 and enables
+🪾📰 Caudex inherits all of the dependencies of ⛩📰 书社 and enables
   you to override them in the same way.
 
-In addition to the configuration variables for ⛩📰 书社, the
+In addition to the configuration variables for ⛩📰 书社, the
   following variables are recognized and treated specially by
   🪾📰 Caudex :⁠—
 
@@ -108,7 +108,7 @@ In addition to the configuration variables for ⛩️📰 书社, the
   It *will not* touch other files, including those generated from files
     in `SRCDIR` which have since been deleted.
 
-  Files are first compiled to `$(BUILDDIR)/⛩📰/public` before they
+  Files are first compiled to `$(BUILDDIR)/⛩📰/public` before they
     are copied to `DESTDIR`, so this folder is relatively quick and
     inexpensive to re·create.
   It’s reasonable to simply delete it before every `make install` to
@@ -120,13 +120,13 @@ In addition to the configuration variables for ⛩️📰 书社, the
     need to be set manually.
 
 - **`EXTRAMAGIC`:**
-  Additional magic files for ⛩📰 书社.
+  Additional magic files for ⛩📰 书社.
 
 - **`EXTRAPARSERS`:**
-  Additional parsers for ⛩📰 书社.
+  Additional parsers for ⛩📰 书社.
 
 - **`EXTRATRANSFORMS`:**
-  Additional transforms for ⛩📰 书社.
+  Additional transforms for ⛩📰 书社.
 
 - **`GENERATOR`:**
   The name of the generator program (default: `🪾📰 Caudex`).
@@ -156,44 +156,18 @@ The command `make +⟨category⟩` is provided as a convenience to create
 If the identifier is followed by a comma, the remainder of the
   file·name may be used to provide a human⹀friendly description of the
   file’s contents.
-Remember: The file·name still needs to be compatible with ⛩📰 书社
+Remember: The file·name still needs to be compatible with ⛩📰 书社
   and Make (it must not contain spaces or other fraught Ascii
   characters).
 
-Entries should be of the `text/x.codex-entry` format, which is defined
-  as follows :⁠—
-
-1. The string `%%`, followed by a newline and
-
-2. A [Record Jar][draft-phillips-record-jar-01] record starting with
-     `ENTRY :`, followed by
-
-3. Any number of additional records, followed by
-
-4. Zero or more lines of (mostly⹀)plain text.
-
-For example :⁠—
-
-```txt
-%%
-ENTRY : 30W-5M41
-TITLE : My Amazing Entry
-%%
-
-This is the text of my amazing entry.
-```
-
-The text of the entry is processed minimally:
-It is broken into paragraphs on blank lines, and paragraphs for which
-  each line begins with white·space are considered block quotations.
-All other whitespace is trimmed and collapsed.
+Entries need to be in [💄📝 Les·M·L][LesML] format.
 
 ## Metadata
 
 Codices, categories, and entries should all have metadata.
 For entries, the metadata is provided by the record which begins the
-  `text/x.codex-entry` format.
-For codicies and categories, the metadata is provided by a special file
+  document.
+For codices and categories, the metadata is provided by a special file
   named `@` in `SRCDIR` or the category directory, respectively.
 In all cases, metadata is kept in the Record Jar format.
 
@@ -230,7 +204,7 @@ Two index files are created :⁠— `index.xhtml` loads entries
   entries and does not require a network connection.
 
 Output can be customized by supplying additional transforms, ⅌ normal
-  ⛩📰 书社 conventions.
+  ⛩📰 书社 conventions.
 The easiest way to customize the transform is to introduce new
   templates which operate in the `书社:header`, `书社:footer`, or
   `书社:metadata` modes.
@@ -270,5 +244,6 @@ If you want to customize the actual main body output of 🪾📰 Caudex,
 </transform>
 ```
 
+[LesML]: <https://git.ladys.computer/LesML>
 [Shushe]: <https://git.ladys.computer/Shushe>
 [draft-phillips-record-jar-01]: <https://datatracker.ietf.org/doc/html/draft-phillips-record-jar-01>
diff --git a/lib/split.xslt b/lib/split.xslt
deleted file mode 100644 (file)
index bf05118..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<!--
-⁌ 🪾📰 Caudex ∷ lib/split.xslt
-
-© 2024 Lady [@ Lady’s Computer]
-
-This Source Code Form is subject to the terms of the Mozilla Public License, v 2.0.
-If a copy of the M·P·L was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0/>.
--->
-<transform
-       xmlns="http://www.w3.org/1999/XSL/Transform"
-       xmlns:Caudex="urn:fdc:ladys.computer:20240204:Caudex"
-       xmlns:html="http://www.w3.org/1999/xhtml"
-       exclude-result-prefixes="Caudex"
-       version="1.0"
->
-       <template name="Caudex:split">
-               <param name="source"/>
-               <param name="separator" select="'&#xA;'"/>
-               <choose>
-                       <when test="contains($source, $separator)">
-                               <html:span>
-                                       <value-of select="substring-before($source, $separator)"/>
-                               </html:span>
-                               <call-template name="Caudex:split">
-                                       <with-param name="source" select="substring-after($source, $separator)"/>
-                                       <with-param name="separator" select="$separator"/>
-                               </call-template>
-                       </when>
-                       <otherwise>
-                               <html:span>
-                                       <value-of select="$source"/>
-                               </html:span>
-                       </otherwise>
-               </choose>
-       </template>
-</transform>
diff --git a/magic/codex-entry b/magic/codex-entry
deleted file mode 100644 (file)
index 2eca487..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-0  string  %%\nENTRY\ :  codex entry text
-!:mime text/x.codex-entry
-!:strength + 100
diff --git a/parsers/codex-entry.xslt b/parsers/codex-entry.xslt
deleted file mode 100644 (file)
index d854ebe..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0"?>
-<!--
-⁌ 🪾📰 Caudex ∷ parsers/codex-entry.xslt
-
-© 2024 Lady [@ Lady’s Computer]
-
-This Source Code Form is subject to the terms of the Mozilla Public License, v 2.0.
-If a copy of the M·P·L was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0/>.
--->
-<transform
-       xmlns="http://www.w3.org/1999/XSL/Transform"
-       xmlns:Caudex="urn:fdc:ladys.computer:20240204:Caudex"
-       xmlns:exsl="http://exslt.org/common"
-       xmlns:html="http://www.w3.org/1999/xhtml"
-       xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
-       exclude-result-prefixes="exsl Caudex"
-       version="1.0"
->
-       <import href="../lib/split.xslt"/>
-       <书社:id>urn:fdc:ladys.computer:20240204:Caudex:codex-entry.xslt</书社:id>
-       <template match="html:script[@type='text/x.codex-entry']">
-               <variable name="lines">
-                       <call-template name="Caudex:split">
-                               <with-param name="source" select="string()"/>
-                       </call-template>
-               </variable>
-               <variable name="linespans" select="exsl:node-set($lines)/*"/>
-               <variable name="record-end" select="$linespans[starts-with(., '%%')][last()]"/>
-               <variable name="text-start" select="$record-end/following-sibling::*[string()!=''][1]"/>
-               <html:div>
-                       <html:script type="text/record-jar">
-                               <for-each select="$record-end/preceding-sibling::*|$record-end">
-                                       <value-of select="."/>
-                                       <text>&#xA;</text>
-                               </for-each>
-                       </html:script>
-                       <html:script type="text/plain">
-                               <for-each select="$text-start|$text-start/following-sibling::*">
-                                       <value-of select="."/>
-                                       <text>&#xA;</text>
-                               </for-each>
-                       </html:script>
-               </html:div>
-       </template>
-</transform>
index 96cd637acbad2c27fe2584afe52aaeda7173ab17..82bbf21bb92e57928df1dbf5f38b641642c4da99 100644 (file)
@@ -9,6 +9,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
 -->
 <!DOCTYPE transform [
        <!ENTITY Caudex "urn:fdc:ladys.computer:20240204:Caudex:">
+       <!ENTITY LesML "urn:fdc:ladys.computer:20240512:LesML:">
        <!ENTITY 书社 "urn:fdc:ladys.computer:20231231:Shu1She4:">
 ]>
 <transform
@@ -20,15 +21,14 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
        exclude-result-prefixes="exsl Caudex"
        version="1.0"
 >
-       <import href="../lib/split.xslt"/>
        <书社:id>&Caudex;entry.xslt</书社:id>
        <template match="/html:div[@书社:parsed-by='&Caudex;catalog.xslt'][@class='entry']">
                <html:body>
                        <for-each select="@*[namespace-uri()!='urn:fdc:ladys.computer:20231231:Shu1She4']">
                                <copy/>
                        </for-each>
-                       <for-each select="html:div[@id='@']/html:div[@书社:parsed-by='&Caudex;codex-entry.xslt']">
-                               <variable name="metadata" select="html:div[@书社:parsed-by='&书社;record-jar.xslt']/html:dl[1]"/>
+                       <for-each select="html:div[@id='@']/html:article[@书社:parsed-by='&LesML;parser.xslt']">
+                               <variable name="metadata" select="html:footer[@class='head']/html:dl[1]"/>
                                <html:meta itemprop="&书社;title">
                                        <attribute name="content">
                                                <value-of select="$metadata//html:dt[string()='TITLE']/following-sibling::html:dd"/>
@@ -48,42 +48,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                                        <value-of select="$metadata//html:dt[string()='TITLE']/following-sibling::html:dd"/>
                                                </html:h1>
                                        </if>
-                                       <variable name="paragraphs">
-                                               <call-template name="Caudex:split">
-                                                       <with-param name="source" select="string(html:pre[@书社:parsed-by='&书社;plain.xslt'])"/>
-                                                       <with-param name="separator" select="'&#xA;&#xA;'"/>
-                                               </call-template>
-                                       </variable>
-                                       <for-each select="exsl:node-set($paragraphs)/*">
-                                               <variable name="lines">
-                                                       <call-template name="Caudex:split">
-                                                               <with-param name="source" select="string()"/>
-                                                       </call-template>
-                                               </variable>
-                                               <variable name="linespans" select="exsl:node-set($lines)/*"/>
-                                               <variable name="partype">
-                                                       <choose>
-                                                               <when test="not($linespans[not(starts-with(., ' ') or starts-with(., '&#x9;'))])">
-                                                                       <text>blockquote</text>
-                                                               </when>
-                                                               <otherwise>
-                                                                       <text>p</text>
-                                                               </otherwise>
-                                                       </choose>
-                                               </variable>
-                                               <if test="$linespans[normalize-space()!='']">
-                                                       <element name="html:{$partype}">
-                                                               <for-each select="$linespans">
-                                                                       <if test="normalize-space()!=''">
-                                                                               <value-of select="normalize-space()"/>
-                                                                               <if test="following-sibling::*[normalize-space()!='']">
-                                                                                       <text> </text>
-                                                                               </if>
-                                                                       </if>
-                                                               </for-each>
-                                                       </element>
-                                               </if>
-                                       </for-each>
+                                       <apply-templates select="node()[not(self::html:footer[@class='head'])]"/>
                                </html:article>
                        </for-each>
                </html:body>
index 7bb1ef85096983fc965c13be8a3734b5b69b33ba..3810b66138c980db6a65a63a0957c971a7f91d7a 100644 (file)
@@ -9,6 +9,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
 -->
 <!DOCTYPE transform [
        <!ENTITY Caudex "urn:fdc:ladys.computer:20240204:Caudex:">
+       <!ENTITY LesML "urn:fdc:ladys.computer:20240512:LesML:">
        <!ENTITY 书社 "urn:fdc:ladys.computer:20231231:Shu1She4:">
 ]>
 <transform
@@ -20,7 +21,6 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
        exclude-result-prefixes="exsl"
        version="1.0"
 >
-       <import href="../lib/split.xslt"/>
        <书社:id>&Caudex;index.xslt</书社:id>
        <template match="/html:div[@书社:parsed-by='&Caudex;catalog.xslt'][@class='index' or @class='fullindex']">
                <html:body>
@@ -46,10 +46,10 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                                                        </choose>
                                                                </html:strong>
                                                                <html:ul>
-                                                                       <for-each select="html:div[@id!='@']/html:div[@书社:parsed-by='&Caudex;codex-entry.xslt']">
-                                                                               <sort select="html:div[@书社:parsed-by='&书社;record-jar.xslt']/html:dl[1]//html:dt[string()='TITLE']/following-sibling::html:dd"/>
+                                                                       <for-each select="html:div[@id!='@']/html:article[@书社:parsed-by='&LesML;parser.xslt']">
+                                                                               <sort select="html:footer[@class='head']/html:dl[1]//html:dt[string()='TITLE']/following-sibling::html:dd"/>
                                                                                <sort select="../@id"/>
-                                                                               <variable name="entry-metadata" select="html:div[@书社:parsed-by='&书社;record-jar.xslt']/html:dl[1]"/>
+                                                                               <variable name="entry-metadata" select="html:footer[@class='head']/html:dl[1]"/>
                                                                                <html:li>
                                                                                        <html:a href="{../@id}.xhtml" data-identifier="{../@id}" data-cksum="{@书社:cksum}">
                                                                                                <value-of select="$entry-metadata//html:dt[string()='TITLE']/following-sibling::html:dd"/>
@@ -69,7 +69,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                </html:nav>
                                <html:div id="pane">
                                        <if test="@class='fullindex'">
-                                               <for-each select=".//html:div[@书社:parsed-by='&Caudex;catalog.xslt'][@class='category']/html:div[@id!='@']/html:div[@书社:parsed-by='&Caudex;codex-entry.xslt']">
+                                               <for-each select=".//html:div[@书社:parsed-by='&Caudex;catalog.xslt'][@class='category']/html:div[@id!='@']/html:article[@书社:parsed-by='&LesML;parser.xslt']">
                                                        <variable name="context" select="."/>
                                                        <variable name="entry">
                                                                <html:div 书社:parsed-by="&Caudex;catalog.xslt" class="entry">
index 158b5d797f3a3eba413cd5a8908af222c9210bac..e132898d669ffa54c4399eab1738099fe24f30bf 100644 (file)
@@ -15,7 +15,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
        version="1.0"
 >
        <书社:id>urn:fdc:ladys.computer:20240204:Caudex:metadata.xslt</书社:id>
-       <template match="xslt:include[@书社:id='urn:fdc:ladys.computer:20240204:Caudex:metadata.xslt']" mode="书社:metadata">
+       <template match="书社:id[string()='urn:fdc:ladys.computer:20240204:Caudex:metadata.xslt']" mode="书社:metadata">
                <html:style type="text/css">
                        <text><![CDATA[@charset "UTF-8";
 @namespace html "http://www.w3.org/1999/xhtml";
This page took 0.052733 seconds and 4 git commands to generate.