Re: [Webit-discuss] Interaction with SSAX
Status: Alpha
Brought to you by:
benderjg
|
From: Jim B. <ji...@be...> - 2006-03-28 02:34:36
|
Hello,
> I noticed in PLT that WebIt! and SSAX do not seem to talk precisely
> the same language:
>
> (require (lib "ssax.ss" "ssax"))
> (require (planet "xml.ss" ("jim" "webit.plt" 1 1)))
>
> (write-xml
> (ssax:xml->sxml
> (open-input-string
> "<?xml version=\"1.0\"?><part
> xmlns:c=\"http://www.cars.com/xml\"/>")
> '((c . "http://www.cars.com/xml"))))
>
> => <?xml version="1.0"?>. write-xml: unknown datatype, given (@
> (*NAMESPACES* (c "http://www.cars.com/xml")))
>
> Am I missing something?
You are right that WebIt! does not support this style of SXML.
There are two respects in which WebIt! does not handle
the following SXML fragment:
(*TOP*
(@ (*NAMESPACES* (c "http://www.cars.com/xml")))
(*PI* xml "version=\"1.0\"")
(part (c:item "wheel")))
First, WebIt! is not expecting / does-not-support namespace
declarations at the "document level", only within an element.
Second, WebIt! does not support the element tag in the style
of "c:item". write-xml, for example, will attempt to lookup "c"
as a URI, not as a prefix--and will fail.
Jim
|