xslmin

An XSLT 1.0 minifier A tool to minify an XSL file so that it is as compact as possible. The primary goal of this tool is to compress XSL files used in client side XSLT in web browsers.

Лицензия

Лицензия

Группа

Группа

com.github.ricksbrown
Идентификатор

Идентификатор

xslmin
Последняя версия

Последняя версия

2.3.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

xslmin
An XSLT 1.0 minifier A tool to minify an XSL file so that it is as compact as possible. The primary goal of this tool is to compress XSL files used in client side XSLT in web browsers.
Ссылка на сайт

Ссылка на сайт

http://maven.apache.org
Система контроля версий

Система контроля версий

https://github.com/ricksbrown/xslmin

Скачать xslmin

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.ricksbrown/xslmin/ -->
<dependency>
    <groupId>com.github.ricksbrown</groupId>
    <artifactId>xslmin</artifactId>
    <version>2.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.ricksbrown/xslmin/
implementation 'com.github.ricksbrown:xslmin:2.3.0'
// https://jarcasting.com/artifacts/com.github.ricksbrown/xslmin/
implementation ("com.github.ricksbrown:xslmin:2.3.0")
'com.github.ricksbrown:xslmin:jar:2.3.0'
<dependency org="com.github.ricksbrown" name="xslmin" rev="2.3.0">
  <artifact name="xslmin" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.ricksbrown', module='xslmin', version='2.3.0')
)
libraryDependencies += "com.github.ricksbrown" % "xslmin" % "2.3.0"
[com.github.ricksbrown/xslmin "2.3.0"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.apache.ant : ant jar 1.9.6

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 3.8.1

Модули Проекта

Данный проект не имеет модулей.

xslmin

An XSLT minifier

The primary goal of this tool is to reduce the size of XSL files used in client side XSLT in web browsers.

xslmin performs the following minification tasks:

  • Deletes unused templates

  • Deletes unused variables

  • Deletes unused parameters

  • Strips comments

  • Strips ignorable whitespace

  • Renames local variables

  • Renames local parameters

  • Renames global variables

  • Does NOT rename global parameters (so you can still inject them)

  • Renames named templates

  • Normalizes space in attribute token lists, e.g. xsl:preserve-space

  • Collapses xsl:elements to short form e.g. <element name="foo"> becomes <foo>

  • Inlines xsl:attributes e.g.

     <element name="foo">
     	<attribute name="bar">
     		<value-of select="$foobar"></value-of>
     	</attribute>
     </element>

    becomes

     <foo bar="{$foobar}">

Usage

You can download the latest JAR from Maven Central

Executable Jar

java -jar xslmin.jar inputXslPath outputXslPath [-p[reserve]]

Ant Task

The easiest way is to use maven and the maven-antrun-plugin to fetch xslmin and then use it in your ant build like so:

<path id="project.class.path">
	<path path="${maven.plugin.classpath}"/>
</path>

<taskdef name="xslmin"
	classname="com.github.ricksbrown.xslmin.ant.MinifyTask"
	classpathref="project.class.path"/>

<xslmin in="${srcdir}/myxsl.xsl" out="${outdir}/myxsl.xsl" preserve="true"/>

Releases

2.3.0

  • Existing users note, the java classes have been repacked to the github namespace com.github.ricksbrown.xslmin.

  • Now available on Maven Central

     <dependency>
     	<groupId>com.github.ricksbrown</groupId>
     	<artifactId>xslmin</artifactId>
     	<version>2.3.0</version>
     </dependency>

TODO

  • Merge identical templates
  • Detect recurring long text and move to global variable

Версии библиотеки

Версия
2.3.0