Oleg Parashchenko | 26 Aug 14:28
Favicon

XML parsing bug?

Hello,

using the "ssax-sxml-gambit-060529.tgz", parsing the XML document

<p><b>so,</b> <b>so</b> and <b>so</b></p>

I get

(*TOP* (p
  (b "so,")
  (b "so")
  " and "
  (b "so")))

The space between the first "b"-tags is lost. Right now I can't check
if the latest version from the sorceforge repository produces the same
error, but I'm afraid yes, why not. Can you reproduce the bug? If yes,
is there a chance that the bug would be fixed?

--

-- 
Oleg Parashchenko  olpa@ http://uucode.com/
http://uucode.com/blog/  XML, TeX, Python, Mac, Chess

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
Oleg Parashchenko | 17 Aug 13:47
Favicon

how to unwrap a tag in pre-post-order

Hello,

I try to "unwrap" an XML tag: delete the tag, but retain the subtrees.
For example, the source document:

<chapter>
  <proxy><section></section></proxy>
  <proxy><section></section></proxy>
</chapter>

after unwrapping the tag "proxy" gives:

<chapter>
  <section/>
  <section/>
</chapter>

A first attempt with SXSLT:

(define doc '(*TOP* (chapter (proxy (section)) (proxy (section)))))
(define unwrapped (pre-post-order doc `(
  (*default* . ,(lambda args args))
  (proxy     . ,(lambda (tag . kids) kids))
  )))
(display unwrapped)(newline)

The result is:

(*TOP* (chapter ((section)) ((section))))

(Continue reading)

Dan Pimentel | 20 Dec 22:24
Picon
Favicon

sxml

Hello all! 

I am trying to learn SXML and attempting to follow to follow a tutorial at the following URL:

http://modis.ispras.ru/Lizorkin/sxml-tutorial.html

Right away I am receiving an error on example 1 hindering my progress:

here's the code (In Modular language and using PTL scheme 4.2.3 plus the latest version of SXML)

#lang scheme

(require (planet lizorkin/sxml:2:1/sxml))

(sxml:document "http://modis.ispras.ru/Lizorkin/XML/poem.xml")

The error i receive is as Follows

XLink API error: resource doesn't exist: http://modis.ispras.ru/Lizorkin/XML/poem.xml
#f

Could I be following old syntax from this website? The SXML source code
(http://planet.plt-scheme.org/package-source/lizorkin/sxml.plt/2/1/xpath-context_xlink.ss)
states 
"(define (sxml:document req-uri . namespace-prefix-assig)

and "NAMESPACE-PREFIX-ASSIG is an optional argument"

any help would be greatly appreciated,

(Continue reading)

oleg | 17 Jan 11:14

New tutorial on SXML parsing and transformations


Hello!

Philipp Wagner has let me know of a tutorial on SXML, SSAX, SXPath and
SXSLT that he and his fellow student Filip Martinovsky wrote in the 3d
semester Computer Science course at their University. The document is
written in a good tutorial style, with many examples. I particularly
like Figure 4.3, which visualizes the traversal of the XML tree
(Infoset) by the SSAX parser. Philipp has been very kind and translated
the document into English, which is available at
	http://www.inf.hs-zigr.de/~siphwagn/xml.pdf

His and Filip's web sites
	http://www.inf.hs-zigr.de/~safimart
	http://www.inf.hs-zigr.de/~siphwagn

specifically, 
	http://www.inf.hs-zigr.de/~safimart/index.php?n=Projekte.XMLMitScheme
have additional examples, including their parser for RSS feed.

	I am very grateful to Philipp and Filip!
	Oleg

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
Derick Eddington | 25 Jun 09:26
Picon

@ identifier and R6RS

I started porting SSAX/SXML to R6RS and ran into the issue that @ is not
a valid R6RS identifier, because, as I was told [1]:

        If @ were permitted as the initial character of an identifier,
        then it would be ambiguous whether {,@foo} and {,@ foo} were
        unquotes or splicing unquotes.

So, before I continue my porting, I want to ask you all what you suggest
be done about this in order to R6RS-ify SXML?  I've been thinking: make
& an alias for @.  I choose & because its name also starts with "a" and
it's in the same category of "common punctuation on that upper row of
keys" and it's not a valid XML name.  If I/we go with &, I plan to look
into changing the SSAX source-code to recognize @ and & (R6RS can make
an @ symbol by (string->symbol "@") or '\x40;).  Since an R6RS standard
reader/writer can't be used to read/write @ symbols as @, to
interoperate with reading/writing the @ style, conversion tools and/or a
special reader/writer would be needed.

[1] http://lists.r6rs.org/pipermail/r6rs-discuss/2008-June/003518.html

--

-- 
: Derick
----------------------------------------------------------------

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
(Continue reading)

minh thu | 6 Jun 12:17
Picon
Gravatar

parsing entities

Hi,

I'd like to parse r5rs into SXML. My aproach is to use the Texinfo
file from http://swissnet.ai.mit.edu/~jaffer/Scheme.html,
generating xml from it (makeinfo --xml) then using ssax:xml->sxml.

The paser tells me it skips the dtd declaration then yells
"[wf-entdeclared] broken for period".
period is one entity declared in the dtd.

How should I handle that ? I was thinking rolling a modified parser so
it replaces such entity
by '(& period) (like Neil Van Dyke HtmlPrag). Is it the way to go ?

Thanks,
Vo Minh Thu

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
prakashn | 3 Jun 23:03
Picon
Favicon

Installation fails on PLT 372


When I try to install ssax-sxml-060530 on PLT Scheme v372 for WinXP, it
barfs:

setup-plt: Available variants: 3m
setup-plt: Main collection path is C:\Program Files\PLT\collects
setup-plt: Collection search path is
setup-plt:   C:\Documents and Settings\nishad\Application Data\PLT
Scheme\372\collects
setup-plt:   C:\Program Files\PLT\collects
cannot install; version (200) of collection ("mzscheme") is required, but
version (370) is installed

 === context ===
c:\program files\plt\collects\setup\unpack.ss:248:42: loop
c:\program files\plt\collects\setup\unpack.ss:138:10

Is there a fix?

nishad

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Andy Wingo | 27 Feb 00:06
Picon
Favicon

make stock ssax:xml->sxml comply with the XML recommendation

Hey SSAX folk,

I was recently bitten by ssax:xml->sxml's "intelligent" approach to
whitespace, which by default drops strings if they are not all
whitespace. Attached is a patch, committed to guile-lib, that makes the
default `ssax:xml->sxml' not drop whitespace that it thinks is
insignificant.

The fact that SSAX offers me the ability to make my own parser is beside
the point, I think; the default parser should do the right thing.

Cheers,

Andy
--

-- 
http://wingolog.org/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
ssax-sxml mailing list
ssax-sxml@...
https://lists.sourceforge.net/lists/listinfo/ssax-sxml
Oleg A. Paraschenko | 30 Jul 22:49
Picon

XPath over S-expressions

Hello,

I'd like to pre-announce the diploma work of Evgeni Milenin
(Saint-Petersburg State University, 2007):

XPath over S-expressions
The title describes the work in full

The diploma text (sorry, only in Russian):
http://xmlhack.ru/protva/Xpath_over_Sexp.pdf

A short English readme file, together with the library, can be found in
the directory "ffi-sexp" in the Generative XPath distribution package:

http://sourceforge.net/project/showfiles.php?group_id=138946&package_id=235034

At the moment, the library works under Guile only. But with small
additions to cond-expand, it should work under any R5RS-compliant Scheme
implementation, which supports integers of arbitrary length.

The work is based on Generative XPath:

``Generative XPath is an XPath 1.0 implementation, which can be adapted
to different hierarchical memory structures and different programming
languages. It is based on a small, easy to implement virtual machine,
which is already available for different platforms, including plain C,
Java and .NET.''

XML Prague 2007 paper, slides, download:

(Continue reading)

Todd Dukes | 6 Jun 21:17
Favicon

bigloo and error messsages


I have downloaded ssax-sxml-bigloo-060529.tgz and with small
modifications to the makefile have been able to build it.

I have a simple example shown here:

(module example
   (library ssax-sxml) ;ssax-sxml is built-in to xml-bigloo
   (main xml-example))

; Definition of `main' is inserted automatically
(define (xml-example argv)
   (print "xml-example " argv)
   (let ((document (sxml:document "qe.xml")))
      (print "document " document)))

which I build like  this:

make xml-example
bigloo -eval '(bigloo-warning-set! 0)' -g -c xml-example.scm -o xml-example.o
bigloo -eval '(bigloo-warning-set! 0)' -g -ldopt \
"-Wl,-L /_TOOLS_/dist/bigloo-ssax-/060529/x86_64-pc-linux2.4/lib/" -ldopt \
"-Wl,-R /_TOOLS_/dist/bigloo-ssax-/060529/x86_64-pc-linux2.4/lib/" -ldopt \
"-Wl,-R /_TOOLS_/dist/inria-bigloo-/3.0a--gcc_4.1.1/x86_64-pc-linux2.4/lib/" \
xml-example.o -o xml-example

When I run this I get a large number of warning messages before the start of my program as 
shown below.

Does anyone have any suggestions on how to eliminate these?
(Continue reading)

Andy Chambers | 28 May 15:10

beginners filtering problem

Hi,

I'm having a little trouble getting to grips with sxpath and I wonder
if someone could help.  Given a node like this

(ItemDef (@ (SASFieldName "WTUNITS")
                    (OID "IT.WTUNITS") (Name "Weight Units")
                    (Length "2") (DataType "text")))

I'd like to get the text bits of the OID and Name attributes.

The following does what I want but I'm not sure its as simple as it could be

((sxpath '(*text*))
   ((node-or (sxpath '(@ OID))
             (sxpath '(@ Name))) (node obj))))

..where (node obj) evaluates to the node described above

I think that a solution involving the filter converter should make it
clearer but I haven't been able to get it to do what I mean.

I'm using guile's sxpath if that makes a difference.

Cheers,
Andy

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
(Continue reading)


Gmane