←back to thread

69 points jdkoeck | 6 comments | | HN request time: 0s | source | bottom
1. RadiozRadioz ◴[] No.44436831[source]
I think it would look a lot like XSLT
replies(1): >>44437322 #
2. righthand ◴[] No.44437322[source]
I got into XSLT after the HN grug brain article last week. It is wonderful and I have my whole site (100 pages/files) migrated in less than an hour (w/o using LLM) and have it served off a 4 line caddy file.

Seriously browsers just need to adopt XSLT 3.0 and stop all this wheel reinvention already.

replies(2): >>44437613 #>>44437781 #
3. LegionMammal978 ◴[] No.44437613[source]
Eh, I also thought that at one point (regarding XSLT 3.0), but it turns out that parts of it are an underspecified mess. E.g., you can specify static parameters to be supplied to the document, but it has nothing on when or how any type-conversion errors would be signaled [0]. And in general, it has very imperative features like shadow attributes that purists would turn up their noses at. I don't see it becoming widespread anytime soon.

[0] https://github.com/Paligo/xee/issues/32#issuecomment-2762343...

4. monknomo ◴[] No.44437781[source]
That sounds interesting, and I'd like to hear more
replies(1): >>44437897 #
5. righthand ◴[] No.44437897{3}[source]
Well it’s all in a single directory:

```

static/

  js/
  
  css/

  log/

    my-post.xml

    my-post.xsl

  index.html
```

Caddyfile:

```

:8080

try_files {path}.xml {path}.html

file_server {

    index index.xml index.html

    root static
}

```

XSLT work is all based off of a repository someone wrote with a grug brain explainer:

https://github.com/pacocoursey/xslt

The next step is to generate all of the `static` dir from markdown files and probably a new markdown-like format for registering templates to generate xsl/xml files for special html blocks and template parts or generating blog listing pages.

replies(1): >>44544920 #
6. righthand ◴[] No.44544920{4}[source]
Also the MDN docs are helpful for more templating functions and features. https://developer.mozilla.org/en-US/docs/Web/XML/XSLT