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.htmlspecials ==================== Common useful elements for HTML generation ========================================== Home > Python Text · XIST · Python software > ll.xist > ns > htmlspecials 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 for generating HTML. class html(ll.xist.ns.html.html): ================================== Creates an ll.xist.ns.html.html element and automatically sets the lang and xml:lang attributes to the converters configured language. def convert(self, converter): ============================== class plaintable(ll.xist.ns.html.table): ========================================= a HTML table where the values of the attributes cellpadding, cellspacing and border default to 0. class Attrs(ll.xist.ns.html.table.Attrs): ========================================== class cellpadding(ll.xist.ns.html.table.Attrs.cellpadding): ------------------------------------------------------------ class cellspacing(ll.xist.ns.html.table.Attrs.cellspacing): ------------------------------------------------------------ class border(ll.xist.ns.html.table.Attrs.border): -------------------------------------------------- def convert(self, converter): ============================== class plainbody(ll.xist.ns.html.body): ======================================= a HTML body where the attributes leftmargin, topmargin, marginheight and marginwidth default to 0. class Attrs(ll.xist.ns.html.body.Attrs): ========================================= class leftmargin(ll.xist.ns.html.body.Attrs.leftmargin): --------------------------------------------------------- class topmargin(ll.xist.ns.html.body.Attrs.topmargin): ------------------------------------------------------- class marginheight(ll.xist.ns.html.body.Attrs.marginheight): ------------------------------------------------------------- class marginwidth(ll.xist.ns.html.body.Attrs.marginwidth): ----------------------------------------------------------- def convert(self, converter): ============================== class _pixelbase(ll.xist.ns.html.img): ======================================= class Attrs(ll.xist.ns.html.img.Attrs): ======================================== class color(ll.xist.xsc.TextAttr): ----------------------------------- The pixel color as a CSS value. Leave it blank to get a transparent pixel. class alt(ll.xist.ns.html.img.Attrs.alt): ------------------------------------------ class Context(ll.xist.xsc.Context): ==================================== def __init__(self): -------------------- class pixel(_pixelbase): ========================= Element for single transparent pixel image. You can specify the pixel color via the color attribute (which will set the background-color in the style attribute). In addition to that you can specify width and height attributes (and every other allowed attribute for the img element) as usual. class Attrs(_pixelbase.Attrs): =============================== class width(ll.xist.ns.html.img.Attrs.width): ---------------------------------------------- class height(ll.xist.ns.html.img.Attrs.height): ------------------------------------------------ def convert(self, converter): ============================== class autoimg(ll.xist.ns.html.img): ==================================== An image were width and height attributes are automatically generated. If the attributes are already there, they won't be modified. def convert(self, converter): ============================== class autopixel(_pixelbase): ============================= A pixel image were width and height attributes are automatically generated. This works like pixel but the size is "inherited" from the image specified via the src attribute. def convert(self, converter): ============================== class autoinput(ll.xist.ns.html.input): ======================================== Extends ll.xist.ns.html.input with the ability to automatically set the size, if this element has type=="image". def convert(self, converter): ============================== class redirectpage(ll.xist.xsc.Element): ========================================= class Attrs(ll.xist.xsc.Element.Attrs): ======================================== class href(ll.xist.xsc.URLAttr): --------------------------------- def convert(self, converter): ============================== class javascript(ll.xist.ns.html.script): ========================================== Can be used for javascript. class Attrs(ll.xist.ns.html.script.Attrs): =========================================== def convert(self, converter): ============================== class flash(ll.xist.xsc.Element): ================================== class Attrs(ll.xist.xsc.Element.Attrs): ======================================== class width(ll.xist.xsc.IntAttr): ---------------------------------- class height(ll.xist.xsc.IntAttr): ----------------------------------- class src(ll.xist.xsc.URLAttr): -------------------------------- class quality(ll.xist.xsc.TextAttr): ------------------------------------- class bgcolor(ll.xist.xsc.ColorAttr): -------------------------------------- def convert(self, converter): ============================== class quicktime(ll.xist.xsc.Element): ====================================== class Attrs(ll.xist.xsc.Element.Attrs): ======================================== class border(ll.xist.xsc.IntAttr): ----------------------------------- class width(ll.xist.xsc.IntAttr): ---------------------------------- class height(ll.xist.xsc.IntAttr): ----------------------------------- class href(ll.xist.xsc.URLAttr): --------------------------------- class src(ll.xist.xsc.URLAttr): -------------------------------- class bgcolor(ll.xist.xsc.ColorAttr): -------------------------------------- class target(ll.xist.xsc.TextAttr): ------------------------------------ class controller(ll.xist.xsc.ColorAttr): ----------------------------------------- class autoplay(ll.xist.xsc.ColorAttr): --------------------------------------- def convert(self, converter): ============================== class ImgAttrDecorator(ll.xist.ns.specials.AttrDecorator): =========================================================== class Attrs(ll.xist.ns.html.img.Attrs): ======================================== class InputAttrDecorator(ll.xist.ns.specials.AttrDecorator): ============================================================= class Attrs(ll.xist.ns.html.input.Attrs): ========================================== class FormAttrDecorator(ll.xist.ns.specials.AttrDecorator): ============================================================ class Attrs(ll.xist.ns.html.form.Attrs): ========================================= class TextAreaAttrDecorator(ll.xist.ns.specials.AttrDecorator): ================================================================ class Attrs(ll.xist.ns.html.textarea.Attrs): =============================================