[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

generating SXML trees in guile

From: Matt Wette
Subject: generating SXML trees in guile
Date: Sat, 9 Jan 2021 15:50:56 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

This is a FYI, not saying this is a bug.

I'm digging into the sxml xpath procedures and came across a potential
issue with using sxml in Guile.

I believe I remember that Oleg's SXML code relies on the fact that no
nodes a sxml tree are eq?.   For example, in the SXML tree

    (define sx1  '(*TOP* (a "1") (a "1)))

node-parent in (sxml xpath) depends on the fact that

    (eq? (list-ref sx1 1) (list-ref sx1 2)

But the result, in Guile 3.0.4, is

I'm guessing this is cse optimization at work.  I tried this also:

(let* ((sx2 '())
       (sx2 (cons '(a "1") sx2))
       (sx2 (cons '(a "1") sx2))
       (sx2 (cons '*TOP* sx2)))
  (eq? (list-ref sx2 1) (list-ref sx2 2)))

In my sandbox, I'm using copy-tree which seems to be changing
the #t to #f, so at least that works.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]