Re: [Chicken-users] unbound variable: sxml:sxml-xml
Hi Vok, On Wed, 7 Dec 2011 16:47:03 +0100 Vok Vojwo cev...@gmail.com wrote: The documentation of the sxpath egg describes the sxml:sxml-xml function. But when I try to call it, I get an error: csi -R sxpath -e (display (sxml:sxml-xml '())) Error: unbound variable: sxml:sxml-xml Call history: sxml-tools/xpath-parser.scm:1354: txp:param-value sxml-tools/xpath-parser.scm:1399: txp:param-value sxml-tools/xpath-parser.scm:1491: txp:param-value sxml-tools/xpath-parser.scm:1492: txp:param-value sxml-tools/xpath-parser.scm:1494: txp:param-value sxml-tools/txpath.scm:1049: sxml:api-helper sxml-tools/txpath.scm:1051: sxml:api-helper sxml-tools/txpath.scm:1053: sxml:api-helper sxml-tools/txpath.scm:1102: sxml:api-index-helper sxml-tools/txpath.scm:1104: sxml:api-index-helper syntax (display (sxml:sxml-xml (quote ( syntax (sxml:sxml-xml (quote ())) syntax (quote ()) syntax (##core#quote ()) eval(display (sxml:sxml-xml (quote ( eval(sxml:sxml-xml (quote ())) -- $ chicken-status -v sxpath 4.7.0 $ chicken-status sxpath sxpath version: 0.1.3 I think you need (use sxpath-lolevel) in your code. Best wishes. Mario -- http://parenteses.org/mario ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] unbound variable: sxml:sxml-xml
* Vok Vojwo cev...@gmail.com [111207 16:47]: The documentation of the sxpath egg describes the sxml:sxml-xml function. But when I try to call it, I get an error: csi -R sxpath -e (display (sxml:sxml-xml '())) Error: unbound variable: sxml:sxml-xml It should be part of sxpath-lolevel. The following works for me: csi -R sxpath-lolevel -e (display (sxml:sxml-xml '())) HTH, Christian -- Who can (make) the muddy water (clear)? Let it be still, and it will gradually become clear. Who can secure the condition of rest? Let movement go on, and the condition of rest will gradually arise. -- Lao Tse. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] unbound variable: sxml:sxml-xml
On Wed, Dec 07, 2011 at 04:47:03PM +0100, Vok Vojwo wrote: The documentation of the sxpath egg describes the sxml:sxml-xml function. But when I try to call it, I get an error: It's mentioned under the heading sxpath-lolevel. This is a separate module that you need to load. csi -R sxpath -e (display (sxml:sxml-xml '())) Try this instead: csi -R sxpath-lolevel -e (print (sxml:sxml-xml '())) Cheers, Peter -- http://sjamaan.ath.cx -- The process of preparing programs for a digital computer is especially attractive, not only because it can be economically and scientifically rewarding, but also because it can be an aesthetic experience much like composing poetry or music. -- Donald Knuth ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] unbound variable: sxml:sxml-xml
2011/12/7 Peter Bex peter@xs4all.nl: Try this instead: csi -R sxpath-lolevel -e (print (sxml:sxml-xml '())) Thanks. This works but not as expected ;-) I was looking for the srl:sxml-xml function: http://modis.ispras.ru/Lizorkin/Apidoc/index.html#docfunc15826 Is it also available? ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] unbound variable: sxml:sxml-xml
2011/12/7 Vok Vojwo cev...@gmail.com: I was looking for the srl:sxml-xml function: http://modis.ispras.ru/Lizorkin/Apidoc/index.html#docfunc15826 I got it. I had to include sxml-tools/serializer.scm in sxpath-lolevel.scm. After that it is possible to export srl:sxml-xml. And it seems to work: (display (srl:sxml-xml '(*TOP* (*PI* xml version='1.0' encoding='UTF-8') (error (code -12) (message No person found!) Generates: ?xml version='1.0' encoding='UTF-8'? error code-12/code messageNo person found!/message /error Why is it not included if it is there? Or why is there an sxml-serializer egg if the code is already part of the SSAX libs, which is part of the sxpath egg? ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] unbound variable: sxml:sxml-xml
* Vok Vojwo cev...@gmail.com [111207 17:32]: 2011/12/7 Vok Vojwo cev...@gmail.com: I was looking for the srl:sxml-xml function: http://modis.ispras.ru/Lizorkin/Apidoc/index.html#docfunc15826 I got it. I had to include sxml-tools/serializer.scm in sxpath-lolevel.scm. After that it is possible to export srl:sxml-xml. And it seems to work: (display (srl:sxml-xml '(*TOP* (*PI* xml version='1.0' encoding='UTF-8') (error (code -12) (message No person found!) Generates: ?xml version='1.0' encoding='UTF-8'? error code-12/code messageNo person found!/message /error Why is it not included if it is there? Or why is there an sxml-serializer egg if the code is already part of the SSAX libs, which is part of the sxpath egg? As I understood the egg is just a wrapper around the upstream code. I guess that the original author did not do a complete wrapping here. If this is useful to you, we would not mind a patch enhancing the sxpath extension. Thanks! Christian -- Who can (make) the muddy water (clear)? Let it be still, and it will gradually become clear. Who can secure the condition of rest? Let movement go on, and the condition of rest will gradually arise. -- Lao Tse. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] unbound variable: sxml:sxml-xml
On Wed, Dec 07, 2011 at 05:35:37PM +0100, Christian Kellermann wrote: Why is it not included if it is there? Or why is there an sxml-serializer egg if the code is already part of the SSAX libs, which is part of the sxpath egg? As I understood the egg is just a wrapper around the upstream code. I guess that the original author did not do a complete wrapping here. If this is useful to you, we would not mind a patch enhancing the sxpath extension. Actually, the main reason is that SSAX is a horrible mess which has many completely unrelated procedures all mixed together. There are several egg that provide different sets of procedures from the SSAX project. Most eggs include all files from the SSAX project to make it easy to update them, but they don't install them all. The proper place to do this is in the sxml-serializer egg, and we definitely should *not* be adding random procedures to sxpath. (the *REALLY* proper way would be to drop SSAX and create a sane and consistent XML library from scratch, maybe reusing some algorithms from SSAX, but that's a whole other story...) Cheers, Peter -- http://sjamaan.ath.cx -- The process of preparing programs for a digital computer is especially attractive, not only because it can be economically and scientifically rewarding, but also because it can be an aesthetic experience much like composing poetry or music. -- Donald Knuth ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] unbound variable: sxml:sxml-xml
On Dec 7, 2011, at 10:41 AM, Peter Bex wrote: Actually, the main reason is that SSAX is a horrible mess which has many completely unrelated procedures all mixed together. There are several egg that provide different sets of procedures from the SSAX project. Most eggs include all files from the SSAX project to make it easy to update them, but they don't install them all. The proper place to do this is in the sxml-serializer egg, and we definitely should *not* be adding random procedures to sxpath. In fact it's already in sxml-serializer, which is what I recommend you use. Please see http://api.call-cc.org/doc/sxml-serializer#sec:Changes_from_stock, in which it's described that srl:sxml-xml is in there but renamed to serialize-sxml. As Peter said, we took the SSAX project and split it into manageable chunks; the code that isn't used simply isn't compiled in. That was one way we adapted it to Chicken. Other ways were to regularize and improve some of the identifier names, make things more idiomatic, and in sxml-serializer's case, add some feature enhancements. Jim ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] unbound variable: sxml:sxml-xml
2011/12/7 Peter Bex peter@xs4all.nl: Actually, the main reason is that SSAX is a horrible mess which has many completely unrelated procedures all mixed together. There are several egg that provide different sets of procedures from the SSAX project. Most eggs include all files from the SSAX project to make it easy to update them, but they don't install them all. The proper place to do this is in the sxml-serializer egg, and we definitely should *not* be adding random procedures to sxpath. (the *REALLY* proper way would be to drop SSAX and create a sane and consistent XML library from scratch, maybe reusing some algorithms from SSAX, but that's a whole other story...) I can not see any reason why it should be necessary to split the Oleg code. Someone who needs sxpath also needs sxml. Splitting the code into different Chicken modules is pretty useless. I would like if Olegs SSAX code stays together in one big module. This is the easiest way to do it. And if you like to write Olegs code once again from scratch in Chicken modules it can be done. But the current situation where people try to split something which is not well suited to be split is not perfect. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] unbound variable: sxml:sxml-xml
2011/12/7 Jim Ursetto zbignie...@gmail.com: Other ways were to regularize and improve some of the identifier names, make things more idiomatic, and in sxml-serializer's case, add some feature enhancements. Where is the improvement? Writing sxml-serializer instead of srl:sxml-xml does not make much difference. It is even less idiomatic because the inverse function is still called sxml:xml-sxml. And renaming it makes the code incompatible to the original code. I can not see any win. It is definitely a loss. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] unbound variable: sxml:sxml-xml
On Thu, Dec 8, 2011 at 2:17 AM, Vok Vojwo cev...@gmail.com wrote: 2011/12/7 Peter Bex peter@xs4all.nl: Actually, the main reason is that SSAX is a horrible mess which has many completely unrelated procedures all mixed together. There are several egg that provide different sets of procedures from the SSAX project. Most eggs include all files from the SSAX project to make it easy to update them, but they don't install them all. The proper place to do this is in the sxml-serializer egg, and we definitely should *not* be adding random procedures to sxpath. (the *REALLY* proper way would be to drop SSAX and create a sane and consistent XML library from scratch, maybe reusing some algorithms from SSAX, but that's a whole other story...) I can not see any reason why it should be necessary to split the Oleg code. Someone who needs sxpath also needs sxml. Splitting the code into different Chicken modules is pretty useless. I would like if Olegs SSAX code stays together in one big module. This is the easiest way to do it. In general it's better to partition into multiple modules where necessary. People who want everything can import everything, or even provide a wrapper module which imports then re-exports everything. In this case there are already multiple conceptual modules (ssax, sxpath, sxlst) which are not organized well. The procedure you want (sxml-xml) is not part of SSAX, nor even written by Oleg - it's part ofl Kirill Lisovsky's sxml-tools. -- Alex ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users