Link: start Link: parent Link: First page in set (first) Link: Previous page (previous) Link: Next page (next) Link: Last page in set (last) Link: A plain text version of this page (alternate) Link: The XIST source of this page (alternate) Link: The Python module described in this page (alternate) XIST.ns.doc =========== Namespace module for automated documentation generation ======================================================= Home > Python software > ll.xist > ns > doc Text · XIST · Python Python softwarelist of projects * ll.xistAn extensible XML/HTML generator * ExamplesParsing/creating/modifying XML; Traversing XML trees * HowtoExplains parsing/generating XML files, XML transformations via XIST classes and other basic concepts. * SearchingHow to iterate through XIST trees * TransformationHow to transform XIST trees * Advanced topicsPool chaining, converter contexts, validation * MiscellaneousExplains various odds and ends of XIST * xscXIST core classes * nsPackage containing namespace modules * htmlHTML namespace * xmlNamespace implementing global XML attributes * wmlWML 1.3 namespace * ihtmlNamespace implementing i-mode compatible HTML * docbookNamespace implementing DocBook 4.3 * svgNamespace implementing SVG 1.0 * abbrNamespace containing abbreviation entities * codeNamespace for embedding Python code in XML * formNamespace implementing form related elements * phpNamespace for PHP processing instructions * jspNamespace for JSP code as processing instructions * metaNamespace containing meta information elements * rubyNamespace implementing the W3C ruby draft * specialsCommon useful elements * htmlspecialsCommon useful elements for HTML generation * docNamespace for automated documentation generation * kidNamespace for Kid templates * detoxNamespace for detox templates * toxicEmbed PL/SQL in XIST XML * rngNamespace for Relax NG * rss091Namespace for RSS 0.91 * rss20Namespace for RSS 2.0 * atomNamespace for Atom 1.0 * struts_htmlNamespace for Jakarta Struts HTML tags * struts_configNamespace for Jakarta Struts configuration file tags * parseParsing XML * presentScreen output of XML trees * simsSimple schema validation * xfindTree iteration and filtering * cssCSS related functions * scriptsScripts for text conversion and creating XIST namespaces * HistoryChangeLog for XIST * InstallationHow to install and configure XIST * MigrationHow to update your code to new versions of XIST * Mailing listsHow to subscribe to the XIST mailing lists * ll.ul4cA templating language * ll.urlRFC 2396 compliant URLs * ll.makeObject oriented make replacement * ll.daemonForking daemon processes * ll.sisyphusWriting cron jobs with Python * ll.colorRGB color values and color model conversion * ll.miscMisc utility functions and classes * ll.orasqlUtilities for cx_Oracle * ll.nightshadeServe the output of Oracle functions/procedures with CherryPy * ll.scriptsScripts for UL4 template rendering and URL handling * AploraLogging Apache HTTP requests to an Oracle database * PycocoPython code coverage * DownloadLinks to Windows and Linux, source and binary distributions * Source codeAccess to the Mercurial repositories This namespace module provides classes that can be used for generating documentation (in HTML, DocBook and XSL-FO). def _getmodulename(thing): =========================== def getdoc(thing, format): =========================== def getsourceline(obj): ======================== def _namekey(obj, name): ========================= def _codeheader(thing, name, type): ==================================== class _stack(object): ====================== def __init__(self, context, obj): ================================== def __enter__(self): ===================== def __exit__(self, type, value, traceback): ============================================ def explain(thing, name=None, format=None, context=[]): ======================================================== Return a XML representation of the doc string of thing, which can be a function, method, class or module. If thing is not a module, you must pass the context in context, i.e. a list of names of objects into which thing is nested. This means the first entry will always be the module name, and the other entries will be class names. class base(ll.xist.xsc.Element): ================================= The base of all element classes. Used for dispatching to conversion targets. class Context(ll.xist.xsc.Context): ==================================== def __init__(self): -------------------- def dedent(self): ------------------ def indent(self): ------------------ def labelindent(self): ----------------------- def convert(self, converter): ============================== def convert_doc(self, converter): ================================== class block(base): =================== Base class for all block level elements. def convert_html(self, converter): =================================== class inline(base): ==================== Base class for all inline elements. def convert_html(self, converter): =================================== class abbr(inline): ==================== Abbreviation. class Attrs(ll.xist.xsc.Element.Attrs): ======================================== class title(ll.xist.xsc.TextAttr): ----------------------------------- class lang(ll.xist.xsc.TextAttr): ---------------------------------- def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= def __unicode__(self): ======================= class tab(ll.xist.xsc.Element): ================================ Used for displaying a tab character in the HTML output. def convert(self, converter): ============================== class litblock(block): ======================= A literal text block (like source code or a shell session). def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class prog(litblock): ====================== A literal listing of all or part of a program. def convert_docbook(self, converter): ====================================== class tty(litblock): ===================== A dump of a shell session. def convert_docbook(self, converter): ====================================== class prompt(inline): ====================== The prompt in a tty dump. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class input(inline): ===================== Can be used inside a tty to mark the parts typed by the user. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class rep(inline): =================== Content that may or must be replaced by the user. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class code(inline): ==================== def convert_fo(self, converter): ================================= def convert_html(self, converter): =================================== class option(code): ==================== An option for a software command. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== class lit(code): ================= Inline text that is some literal value. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== class func(code): ================== The name of a function or subroutine, as in a programming language. def convert_docbook(self, converter): ====================================== class meth(code): ================== The name of a method or memberfunction in a programming language. def convert_docbook(self, converter): ====================================== class attr(code): ================== The name of an attribute of a class/object. def convert_docbook(self, converter): ====================================== class prop(code): ================== The name of a property in a programming language. def convert_docbook(self, converter): ====================================== class class_(code): ==================== The name of a class, in the object-oriented programming sense. def convert_docbook(self, converter): ====================================== class exc(code): ================= The name of an exception class. def convert_docbook(self, converter): ====================================== class markup(code): ==================== A string of formatting markup in text that is to be represented literally. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== class self(code): ================== Use this class when referring to the object for which a method has been called, e.g.: this function fooifies the object ;. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class self_(code): =================== Use this class when referring to the object for which a method has been called, e.g.: this function fooifies the object ;. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class cls(inline): =================== Use this class when referring to the object for which a class method has been called, e.g.: this function fooifies the class . def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class var(code): ================= The name of a function or method argument. def convert_docbook(self, converter): ====================================== class mod(code): ================= The name of a Python module. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== class file(code): ================== The name of a file. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== class dir(code): ================= The name of a directory. def convert_docbook(self, converter): ====================================== class user(code): ================== The name of a user account. def convert_docbook(self, converter): ====================================== class host(code): ================== The name of a computer. def convert_docbook(self, converter): ====================================== class const(code): =================== The name of a constant. def convert_docbook(self, converter): ====================================== class data(code): ================== The name of a data object. def convert_docbook(self, converter): ====================================== class app(inline): =================== The name of a software program. class Attrs(ll.xist.xsc.Element.Attrs): ======================================== class moreinfo(ll.xist.xsc.URLAttr): ------------------------------------- def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class h(base): =============== The text of the title of a section or an example. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class section(block): ====================== A recursive section. class Attrs(ll.xist.xsc.Element.Attrs): ======================================== class role(ll.xist.xsc.TextAttr): ---------------------------------- class id(ll.xist.xsc.IDAttr): ------------------------------ def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class p(block): ================ A paragraph. class Attrs(ll.xist.xsc.Element.Attrs): ======================================== class type(ll.xist.xsc.TextAttr): ---------------------------------- def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class dt(block): ================= A term inside a dl. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class li(block): ================= A wrapper for the elements of a list item in ul or ol. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class dd(block): ================= A wrapper for the elements of a list item dl. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class list(block): =================== Common baseclass for ul, ol and dl. class ul(list): ================ A list in which each entry is marked with a bullet or other dingbat. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class ol(list): ================ A list in which each entry is marked with a sequentially incremented label. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class dl(list): ================ A list in which each entry is marked with a label. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class example(block): ====================== A formal example. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class a(inline): ================= A hypertext link. class Attrs(ll.xist.xsc.Element.Attrs): ======================================== class href(ll.xist.xsc.URLAttr): --------------------------------- class hreflang(ll.xist.xsc.TextAttr): -------------------------------------- def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class xref(inline): ==================== An internal cross reference. class Attrs(ll.xist.xsc.Element.Attrs): ======================================== class ref(ll.xist.xsc.TextAttr): --------------------------------- def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class email(inline): ===================== An email address. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class em(inline): ================== Emphasized text. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class strong(inline): ====================== Emphasized text. def convert_docbook(self, converter): ====================================== def convert_html(self, converter): =================================== def convert_fo(self, converter): ================================= class z(inline): ================= Put the content into double quotes. def convert(self, converter): ============================== class pyref(inline): ===================== Reference to a Python object: module, class, method, property or function. class Context(ll.xist.xsc.Context): ==================================== def __init__(self): -------------------- class Attrs(ll.xist.xsc.Element.Attrs): ======================================== class class_(ll.xist.xsc.TextAttr): ------------------------------------ class module(ll.xist.xsc.TextAttr): ------------------------------------ class method(ll.xist.xsc.TextAttr): ------------------------------------ class property(ll.xist.xsc.TextAttr): -------------------------------------- class function(ll.xist.xsc.TextAttr): -------------------------------------- def convert(self, converter): ============================== class fodoc(base): =================== def convert(self, converter): ==============================