Kid (Templating Language)

Kid (Templating Language)

Kid простой механизм шаблонов базирующийся на XML словарях, написанный на Python. Kid претендует на многие положительные черты XSLT, TAL и PHP, при этом не перенимая их отрицательные стороны.

Хотя kid широко использовался в TurboGears, он все больше заменяется на Genshi за счет лучшей отладки, поддержки XPath и более высокой производительности.

Example

Python part:

from kid import Template
template = Template(file='mytemplate.kid',
    title='bar',
    mylist=['1', '2', '3', '4', '5', '6']
)
print template.serialize()

Template part:

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://purl.org/kid/ns#">
  <head>
    <title py:content="title">title goes here</title>
  </head>
  <body>
    <ul>
      <li py:for="item in mylist" py:content="item">item goes here</li>
    </ul>
  </body>
</html>

Ссылки



Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Полезное


Смотреть что такое "Kid (Templating Language)" в других словарях:

  • Kid (templating language) — Kid is a simple template engine for XML based vocabularies written in Python. Kid claims to have many of the best features of XSLT, TAL, and PHP, but with much of the limitations and complexity stamped out .While kid was heavily hyped by the… …   Wikipedia

  • Genshi (templating language) — Infobox Software name = Genshi developer = latest release version= 0.5.1 latest release date = operating system = Cross platform genre = Template Engine license = website = [http://genshi.edgewall.org/ http://genshi.edgewall.org/] Genshi is a… …   Wikipedia

  • Kid — usually refers to a human child or a young goat.Kid or Kids may also refer to: a baby goatIn broadcasting: * KID (AM), a radio station (590 AM) licensed to serve Idaho Falls, Idaho, USA. * KID FM, a radio station (96.1 FM) licensed to serve Idaho …   Wikipedia

  • Comparison of code generation tools — This article compares variable metamodel code generation tools[clarification needed]. Fixed metamodel code generation tools, such as UML tools, are excluded (see List of UML tools). Name Creator OS First public release Latest stable version… …   Wikipedia

  • CherryPy — Developer(s) CherryPy team Stable release 3.2.0 / February 25, 2011; 8 months ago (2011 02 25) Written in Python …   Wikipedia

  • Genshi — Пожалуйста, улучшите и дополните этот раздел. Замечания о том, что нужно улучшить, могут быть на странице обсуждения статьи …   Википедия

  • TurboGears — Infobox Software name = TurboGears developer = [http://www.blueskyonmars.com/ Kevin Dangoor] et al. latest release version = 1.0.7 latest release date = September 15, 2008 programming language = Python operating system = Cross platform genre =… …   Wikipedia

  • Сравнение каркасов веб-приложений — Это сравнительная таблица фреймворков веб приложений. Содержание 1 Фреймворки 1.1 ASP.NET 1.2 C++ 1.3 ColdFusion Markup Language (CFML) …   Википедия

  • Templatesprache — Eine Template Engine (von engl. Vorlage und Antrieb, Motor) ist eine Software, die eine Datei (das Template) verarbeitet, und bestimmte Platzhalter darin mit jeweils aktuellen Inhalten füllt. Die Bezeichnungen Templateklasse und Templatesystem… …   Deutsch Wikipedia

  • Templatesystem — Eine Template Engine (von engl. Vorlage und Antrieb, Motor) ist eine Software, die eine Datei (das Template) verarbeitet, und bestimmte Platzhalter darin mit jeweils aktuellen Inhalten füllt. Die Bezeichnungen Templateklasse und Templatesystem… …   Deutsch Wikipedia


Поделиться ссылкой на выделенное

Прямая ссылка:
Нажмите правой клавишей мыши и выберите «Копировать ссылку»