Edgewall Software

Changes between Version 21 and Version 22 of GenshiFaq


Ignore:
Timestamp:
Sep 11, 2006, 6:49:15 PM (18 years ago)
Author:
cmlenz
Comment:

Fix links

Legend:

Unmodified
Added
Removed
Modified
  • GenshiFaq

    v21 v22  
    4949
    5050Beyond the XML-based template engine, Genshi provides:
    51  * a [GenshiStream unified stream-based processing model] for markup, where
    52  * streams can come from XML or HTML text, or be [GenshiBuilder generated programmatically] using a very simple syntax.
    53  * [GenshiPath XPath] can be used to query any stream, not just in templates.
     51 * a [wiki:Documentation/streams.html unified stream-based processing model] for markup, where
     52 * streams can come from XML or HTML text, or be [wiki:Documentation/builder.html generated programmatically] using a very simple syntax.
     53 * [wiki:Documentation/xpath.html XPath] can be used to query any stream, not just in templates.
    5454 * Different serialization methods (XML, HTML, and plain text) for streams.
    5555 * An HTML “sanitizing” filter to strip potentially dangerous elements or attributes from user-submitted HTML markup.
     
    6060We think that includes are both simpler and more natural for templating.
    6161
    62 Template inheritance is a concept that fits well with template languages where a master template provide “slots” that are “filled” by the inheriting templates. However, Genshi has no such feature, and instead uses the more powerful and flexible concept of [wiki:GenshiTemplates#py:match match templates].
     62Template inheritance is a concept that fits well with template languages where a master template provide “slots” that are “filled” by the inheriting templates. However, Genshi has no such feature, and instead uses the more powerful and flexible concept of [wiki:Documentation/xml-templates.html match templates].
    6363
    6464Furthermore, [http://www.w3.org/TR/xinclude/ XInclude] is a [http://www.w3.org/ W3C] standard, which means that it is more likely to be supported in authoring tools than some esoteric custom notation for including external resources.
     
    6767
    6868[[Image(http://static.edgewall.org/gfx/opensource-75x65.png, width=75, height=65, align=right)]]
     69
    6970=== What license governs the use of Genshi? ===
    7071
     
    9899 * The `Markup` class in the [ApiDocs/GenshiCore genshi.core] module can be used to flag strings that should not be escaped. Strings wrapped in a `Markup` instance get copied to the output unchanged.
    99100 * The `XML` and `HTML` functions in the [ApiDocs/GenshiInput genshi.input] module parse XML and HTML strings, respectively, and produce a [GenshiStream markup stream]. Note that this option can be rather expensive, as the text needs to be parsed just to be serialized again. Also, this method fails on bad markup that cannot be parsed by either [http://docs.python.org/lib/module-HTMLParser.html HTMLParser] or [http://docs.python.org/lib/module-xml.parsers.expat.html Expat].
    100  * If you are generating the snippets in question yourself, you may want to use the [ApiDocs/GenshiBuilder genshi.builder] to [GenshiBuilder generate markup streams programmatically]. Just as the results of the `XML` and `HTML` functions discussed above, the stream produced using `genshi.builder` will not be escaped in the template output.
     101 * If you are generating the snippets in question yourself, you may want to use the [ApiDocs/GenshiBuilder genshi.builder] to [wiki:Documentation/builder.html generate markup streams programmatically]. Just as the results of the `XML` and `HTML` functions discussed above, the stream produced using `genshi.builder` will not be escaped in the template output.
    101102
    102103----
    103 See also: GenshiGuide, GenshiRecipes
     104See also: [wiki:Documentation], GenshiRecipes