Code Monkey home page Code Monkey logo

xslt-kit's Introduction

XSLT Kit

This template kit combines XSLT utilities we regularly use in our projects. Some templates require a specific XML structure provided by our Kirby XSLT plugin. If you are working with Symphony CMS, have a look at the dedicated branch.

Requirements

The kit requires the EXSLT extension, http://exslt.org/.

Namespace

All templates are namespaced, please add the following to your stylesheet:

<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:kit="https://hananils.de/xslt/kit">

Included templates and modes

All templates can be applied using <xsl:apply-templates /> using the matching mode:

  • kit:transform: If you apply this mode to a HTML structure, nothing changes in the output by default. But this mode allows you to offset the headline hierarchy, e. g. changing a h1 to a h3, or to match templates to elements allowing custom transforms. This is very helpful when you are dealing with HTML sources generated using Markdown. For more information see http://www.getsymphony.com/learn/articles/view/html-ninja-technique/.
  • kit:dates: Formats Kirby XSLT date nodes to a human readable date.
  • kit:dates-time: Formats Kirby XSLT date nodes to a human readabel time.
  • kit:dates-range: Creates human readable date and time ranges from a Kirby XSLT date node.
  • kit:dates-years: Creates human readable year ranges from a node set containing year values.
  • kit:list: Converts node sets to list, e. g. using a comma separator.
  • kit:links: Creates human friendly links.
  • kit:email: Creates a HTML link from a textual e-mail node.
  • kit:name: Formats a name with title, prefix and suffix.

There is also a language template containing information about the current Kirby content language as well as translation strings.

xslt-kit's People

Contributors

nilshoerrmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xslt-kit's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.