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.specials ================ Common useful elements ====================== Home > Python Text · XIST · Python software > ll.xist > ns > specials 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 An XIST module that contains a collection of useful elements that can be used for all conversion target, because they only generate text. class filesize(ll.xist.xsc.Element): ===================================== The size (in bytes) of the file whose URL is the attribute href as a text node. class Attrs(ll.xist.xsc.Element.Attrs): ======================================== class href(ll.xist.xsc.URLAttr): --------------------------------- def convert(self, converter): ============================== class filetime(ll.xist.xsc.Element): ===================================== The time of the last modification of the file whose URL is in the attribute href as a text node. This will always be an UTC timestamp. class Attrs(ll.xist.xsc.Element.Attrs): ======================================== class href(ll.xist.xsc.URLAttr): --------------------------------- The URL of the file. class format(ll.xist.xsc.TextAttr): ------------------------------------ A strftime compatible formatstring for formatting the timestamp. def convert(self, converter): ============================== class time(ll.xist.xsc.Element): ================================= the current time (i.e. the time when convert is called). You can specify the format of the string in the attribute format, which is a strftime compatible string. class Attrs(ll.xist.xsc.Element.Attrs): ======================================== class format(ll.xist.xsc.TextAttr): ------------------------------------ A strftime compatible formatstring for formatting the timestamp. class utc(ll.xist.xsc.BoolAttr): --------------------------------- Should UTC be used or local time? def convert(self, converter): ============================== class ignore(ll.xist.xsc.Element): =================================== Element that will be ignored when converted. ignore can be used to comment out stuff. The content of the element must of course still be wellformed. def convert(self, converter): ============================== class include(ll.xist.xsc.Element): ==================================== class Attrs(ll.xist.xsc.Element.Attrs): ======================================== class src(ll.xist.xsc.URLAttr): -------------------------------- def convert(self, converter): ============================== class loremipsum(ll.xist.xsc.Element): ======================================= class Attrs(ll.xist.xsc.Element.Attrs): ======================================== class len(ll.xist.xsc.IntAttr): -------------------------------- def convert(self, converter): ============================== class wrap(ll.xist.xsc.Element): ================================= A wrapper element that returns its content when converted. This is e.g. useful if you want to parse a file that starts with ll.xist.ns.jsp processing instructions. def convert(self, converter): ============================== class AttrDecorator(ll.xist.xsc.Element): ========================================== def _mapper(self, node, converter): ==================================== def convert(self, converter): ============================== class literal(ll.xist.xsc.ProcInst): ===================================== literal is a processing instruction that will output its content literally when published. def publish(self, publisher): ============================== class url(ll.xist.xsc.ProcInst): ================================= url is a processing instruction containing an URL. On publishing it will be replaced by an URL that is relative to the base URL of the publisher. def parsed(self, parser, start=None): ====================================== def publish(self, publisher): ============================== class lf(ll.xist.xsc.CharRef): =============================== line feed class cr(ll.xist.xsc.CharRef): =============================== carriage return class tab(ll.xist.xsc.CharRef): ================================ horizontal tab class esc(ll.xist.xsc.CharRef): ================================ escape