unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* htmlprag: write-shtml-as-html - invalid SHTML thing 2019
@ 2020-03-07 20:00 sirgazil
  0 siblings, 0 replies; only message in thread
From: sirgazil @ 2020-03-07 20:00 UTC (permalink / raw)
  To: Guile User

Hello,

I have websites written in SHTML and I use "sxml->xml" to generate HTML pages, but I wanted to use "shtml->html" from htmlprag instead (https://www.nongnu.org/guile-lib/doc/ref/htmlprag/). However, once I change my code to use "shtml->html", I get a "write-shtml-as-html - invalid SHTML thing 2019" error, which seems to come from numbers that I didn't convert to strings in my SHTML templates.

A short example to reproduce the error:

scheme@(guile-user)> (use-modules (htmlprag) (sxml simple))
scheme@(guile-user)> (with-output-to-string (lambda () (sxml->xml '(p 2020))))
$1 = "<p>2020</p>"
scheme@(guile-user)> (shtml->html '(p 2020))
ERROR: In procedure scm-error:
write-shtml-as-html - invalid SHTML thing 2020

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,bt
In htmlprag.scm:
   1547:4  4 (shtml->html _)
   1526:4  3 (write-shtml-as-html _ _)
  1440:39  2 (do-thing _)
In ice-9/boot-9.scm:
   260:13  1 (for-each #<procedure do-thing (thing)> (2020))
In unknown file:
           0 (scm-error misc-error #f "~A ~S" ("write-shtml-as-html - invalid SHTML thing" 2020) #f)


Do you know why numbers have to be converted to strings for "shtml->html" to work and not for "sxml->xml"?


---
https://sirgazil.bitbucket.io/






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-07 20:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-07 20:00 htmlprag: write-shtml-as-html - invalid SHTML thing 2019 sirgazil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).