About Askemos · design notes · documentation · news · download · On CD · thanks · forum · support
BALL · DSSSL · NameSpaceDSSSL · SXML · XML
AskemosServer · LLD · XPath

SXML

See also http://www196.pair.com/lisovsky/xml/index.html This code needs myenv-rscheme.scm and catch-error.scm

(C) public domain - see: http://www.geocrawler.com/archives/3/15235/2002/1/0/7705636/

BALL makes SXML is available in NameSpaceDSSSL. When DSSSL expressions return SXML conformant data these are expanded in the internal representation. Please note, that the expansion incures an additional traversal of the data. This and the prefix-embedding of SXML might incure undesired preformance loss. SXML elements may only ever occure as return value, not mixed as "inner" data structures. To expand the latter use (sxml sxml-tree). However it is possible to mix ordinary XML result tree fragments, e.g., as returned by make element or xsl-variable among SXML nodes.

For turtorial see: http://schematics.sourceforge.net/scheme-uk/xml.html and http://sjamaan.ath.cx/temporary/sxslt.pdf Note: be careful the sxpath functions are not optimal. When in doubt concerning performance try to get along with the DSSSL functions. They are faster.

Bugs

The sxml implementation in ball failes on annotations (namespace declarations) given at the document root (*TOP*) level: namespace declarations for these declarations are only included in the result tree, if the position of the annotations is specified:

          
(sxml '(*TOP*
        (@ (*NAMESPACES* (foo "http://foo.org/foobar")))
        (foo:bar (@ (@))
          (zoo:baz (@ (@ (*NAMESPACES* (zoo "http://foo.org/foobaz"))))))
        ))

         

results in

<foo:bar xmlns:foo="http://foo.org/foobar">
 <zoo:baz xmlns:zoo="http://foo.org/foobaz"></zoo:baz>
</foo:bar>

while

(sxml '(*TOP*
        (@ (*NAMESPACES* (foo "http://foo.org/foobar")))
        (foo:bar (@)
          (zoo:baz (@ (@ (*NAMESPACES* (zoo "http://foo.org/foobaz"))))))
        ))

is beeing serialised as (note the missing namespace foo)

<bar>
 <zoo:baz xmlns:zoo="http://foo.org/foobaz"></zoo:baz>
</bar>

Since those declarations could go there anyway, it's recommended to put declarations always in the attributes list of the document element.

future of xml

Beware: the XML standard version 1.1 will break SXML, since "Unicode will continue to grow past version 4.0, further changes to XML can be avoided by allowing almost any character, including those not yet assigned, in names".





border
last modification: Tue, 06 Feb 2007 13:17:21 +0100
authors: jfw,
document identifier: A849640f672ed0df0958abc0712110f3c
delivered to public at Tue, 06 Jan 2009 01:41:52 +0100
short comments


rss

pdf :: context view

search



27 Dez 2008ProjectsOnThePlate
27 Dez 2008JKomG
27 Dez 2008SystemRequirements
27 Dez 2008SQLITE
26 Dez 2008FanOut
26 Dez 2008MIME
NetBSD
NOTE
02 Mai 2006AskemosTopMenu
18 Nov 2008StorageAdaptor
18 Nov 2008PStoreStorageAdapt
18 Nov 2008OperationTips
15 Nov 2008PCRE
04 Nov 2008ProgrammingLanguag
09 Sep 2008RelatedProjects
23 Jul 2008ModuleStructure05
17 Jun 2008NEWS
17 Jun 2008HTML
17 Jun 2008ACM
22 Mai 2008HTTP
22 Mai 2008BOSH
10 Mai 2008AskemosBibliograph
10 Mai 2008JerrysDreamAbstrac
20 Apr 2008XSLT
11 Mar 2008CodingStyle
10 Mar 2008
09 Mar 2008MIMEConverter
BSD
07 Mar 2008XML
06 Mar 2008SRFI
01 Mar 2008RFC4810
01 Mar 2008RFC4998
01 Mar 2008KondratieffWerk
04 Jan 2008service-level
04 Jan 2008NameSpaceDSSSLinde
24 Jun 2004KommunikationsInfr
BOINC






Add


About Askemos · design notes · documentation · news · download · On CD · thanks · forum · support
Web Design by Schwill Dresden