2005-03-18 23:47:19

XML writer for XSLT output

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Converts character data to CDATA sections if the character data occurs within an element defined as outputting CDATA sections.

outputParams - instance of Ft.Xml.Xslt.OutputParameters.OutputParameters stream - a stream that takes a byte stream (not a unicode object)

Takes events such as those generated by an XSLT processor and invokes a serializer to produce XML.

outputParams - instance of Ft.Xml.Xslt.OutputParameters.OutputParameters stream - a stream that takes a byte stream (not a unicode object)

add an attribute to an element

name - the qualified name of the attribute value - the attribute value: must be Unicode namespace - must be Unicode or Ft.Xml.EMPTY_NAMESPACE (the default)

Strives for "sanity". For brilliant definition thereof, c.f. Joe English http://lists.xml.org/archives/xml-dev/200204/msg00170.html Uses terminology from that article See also discussions starting http://lists.fourthought.com/pipermail/4suite-dev/2003-March/001294.html http://lists.fourthought.com/pipermail/4suite-dev/2003-March/001283.html

Note: attribute output is computed as invoked. This means that the ugly case

attribute(u"foo", u"bar", "http://some-ns/") attribute(u"x:foo", u"baz", "http://some-ns/")

will result in the ugly xmlns:org.4suite.4xslt.ns0="http://some-ns/" org.4suite.4xslt.ns0:foo="baz"

The user can easily correct this by reversing the order of the calls

u'org.4suite.4xslt.ns%s'
u'org.4suite.4xslt.ns'
None
None
u'http://www.w3.org/2000/xmlns/'
u'http://www.w3.org/XML/1998/namespace'