diff --git a/docs/images/W3C.svg b/docs/images/W3C.svg new file mode 100644 index 0000000..eb1f311 --- /dev/null +++ b/docs/images/W3C.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + diff --git a/docs/images/ant_logo_large.gif b/docs/images/ant_logo_large.gif new file mode 100644 index 0000000..a0579a2 Binary files /dev/null and b/docs/images/ant_logo_large.gif differ diff --git a/docs/images/github-icon-1.svg b/docs/images/github-icon-1.svg new file mode 100644 index 0000000..18e9450 --- /dev/null +++ b/docs/images/github-icon-1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/logo-b6e1ef6e.svg b/docs/images/logo-b6e1ef6e.svg new file mode 100644 index 0000000..194e860 --- /dev/null +++ b/docs/images/logo-b6e1ef6e.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/logo_crop-mid-blue-background.gif b/docs/images/logo_crop-mid-blue-background.gif new file mode 100644 index 0000000..df17433 Binary files /dev/null and b/docs/images/logo_crop-mid-blue-background.gif differ diff --git a/docs/images/tomcat.png b/docs/images/tomcat.png new file mode 100644 index 0000000..f40a9de Binary files /dev/null and b/docs/images/tomcat.png differ diff --git a/docs/images/w3c_home.svg b/docs/images/w3c_home.svg new file mode 100644 index 0000000..3924d01 --- /dev/null +++ b/docs/images/w3c_home.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/images/xslet-logo.png b/docs/images/xslet-logo.png new file mode 100644 index 0000000..a9ca63d Binary files /dev/null and b/docs/images/xslet-logo.png differ diff --git a/docs/index.css b/docs/index.css new file mode 100644 index 0000000..871b4cd --- /dev/null +++ b/docs/index.css @@ -0,0 +1,188 @@ +@charset "utf-8"; + +html { + font-size: 16px; +} + +body { + margin: 0rem; + padding: 0rem; + background-color: #fe9; +} + +a[href] { + color: black; +} + +nav { + position: fixed; + top: 0rem; + left: 0rem;; + width: 100vw; + height: 4rem; + border-bottom: solid #ccc 1px; + background-color: white; +} +nav > ul { + display: flex; + margin: 0rem; + padding: 0rem 8rem; +} +nav > ul > li { + flex: auto; + list-style: none; + line-height: 4rem; + text-align: center; + vertical-align: middle; +} + +img#logo { + position: fixed; + left: 2rem; + top: 0.2rem; + width: 3.5rem; + height: 3.5rem; + border: solid 1px #ccc; + border-radius: 0.4rem; +} + +main { + padding: 1rem; +} + +header { + margin-top: 4rem; + padding-left: 2rem; + padding-bottom: 1rem; +} + +header > h1 { + padding: 1rem 0rem 0.5rem; + margin: 0rem; + font-size: 3rem; +} +header > h1 > span.version { + font-size: 1.8rem; + padding: 0rem; + margin: 0rem; +} +header > p { + line-height: 1.3rem; + padding: 0rem; + margin: 0.5rem 0rem; +} + +a[name] { + position: relative; + top: -4rem; +} + +section { + padding-bottom: 1rem; +} +section > h2 { + border-top: solid 1px white; + font-size: 1.6rem; + padding: 1rem 0rem 0.5rem 1rem; + margin: 0rem; +} +section > h3 { + font-size: 1.2rem; + padding: 0.5rem 0rem 0.5rem 1rem; + margin: 2rem 0rem 0rem; +} +section > p { + margin-left: 1.3rem; +} + +section > ul { + margin-left: 2.3rem; + padding: 0rem; +} + +div.code { + font-family: monospace; + font-size: 0.8rem; + padding: 0.5rem 1rem; + background-color: #eee; + display: inline-block; + border-radius: 0.4rem; +} + +a#xslutil::after, a#xsldoc::after, a#xslet::after { + content: ''; + display: inline-block; + width: 1.5rem; + height: 0.9rem; + vertical-align: middle; + margin-left: 0.2rem; + background: url('./images/github-icon-1.svg'); + background-size: auto 0.9rem; + background-repeat: no-repeat; +} +a#xslt1::after, a#xpath1::after { + content: ''; + display: inline-block; + width: 1.5rem; + height: 0.9rem; + vertical-align: middle; + margin-left: 0.2rem; + background: url('./images/w3c_home.svg'); + background-size: auto 0.9rem; + background-repeat: no-repeat; +} +a#xslt3::after, a#xpath3::after { + content: ''; + display: inline-block; + width: 1.5rem; + height: 0.9rem; + vertical-align: middle; + margin-left: 0.2rem; + background: url('./images/W3C.svg'); + background-size: auto 0.9rem; + background-repeat: no-repeat; +} +a#saxon::after { + content: ''; + display: inline-block; + width: 5rem; + height: 0.9rem; + vertical-align: middle; + margin-left: 0.2rem; + background: url('./images/logo_crop-mid-blue-background.gif'); + background-size: auto 0.9rem; + background-repeat: no-repeat; +} +a#ant::after { + content: ''; + display: inline-block; + width: 1.5rem; + height: 0.9rem; + vertical-align: middle; + margin-left: 0.2rem; + background: url('./images/ant_logo_large.gif'); + background-size: auto 0.9rem; + background-repeat: no-repeat; +} +a#tomcat::after { + content: ''; + display: inline-block; + width: 1.5rem; + height: 0.9rem; + vertical-align: middle; + margin-left: 0.2rem; + background: url('./images/tomcat.png'); + background-size: auto 0.9rem; + background-repeat: no-repeat; +} +a#sass::after { + content: ''; + display: inline-block; + width: 1.5rem; + height: 0.9rem; + vertical-align: middle; + margin-left: 0.2rem; + background: url('./images/logo-b6e1ef6e.svg'); + background-size: auto 0.9rem; + background-repeat: no-repeat; +} diff --git a/docs/index.html b/docs/index.html index 3ad5da6..1d34dd8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,44 +1,206 @@ - - - - @xslet/xslutil - - - -
-

@xslet/xslutil

-

This is a set of utilities for XSLT programs on Web browsers.

-

This program is written in XSLT 1.0.

+ + + + xslutil ver1.0 + + + + + -
-

Namespace

-

xmlns:ut="https://github.com/xslet/2020/xslutil"

-
+
+
+

xslutil Ver 1.0

+

+A XSLT library which is a set of utilities for XSLT programs on Web browsers. +

+

+Copyright (C) xslet project.
+MIT License. +

+
-
-

API

-

The API document of xslutil is here.

-
+ +
+

About xslutil

+

+xslutil is a XSL library for string operations. +XSLT1 and XPath1 provides some functions for string operations, but those are not enough. +This library provides some other functions which are needed in xslet project. +

+
-
-

Test

-
    -
  1. ut:count
  2. -
  3. ut:ends_with
  4. -
  5. ut:get_dir_from_url
  6. -
  7. ut:get_namespace_uri
  8. -
  9. ut:get_xsl_url
  10. -
  11. ut:is_absolute_url
  12. -
  13. ut:repeat
  14. -
  15. ut:replace
  16. -
  17. ut:trim
  18. -
  19. ut:validate
  20. -
-
-
- + +
+

Usage

+

+To import xslutil.xsl into your XSL application or library, the following handworks are needed. +

+
    +
  1. +

    +Add the namespace declaration of xslutil in a XSL file. +The namespace of xslutil is "https://github.com/xslet/2020/xslutil". +

    +
    +
    <xsl:stylesheet version="1.0"
    +
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    +
      xmlns:ut="https://github.com/xslet/2020/xslutil"> <!-- This! -->
    +
      ...
    +
    +
  2. +
  3. +

    +Add a import element of xslutil in the XSL file. +

    +
    +
      ...
    +
      <xsl:import href="./xslutil.xsl"/> +
      ...
    +
    +
  4. +
  5. +

    +Then, you can use named-templates of xslutil in the XSL file with xsl:call-template. +

    +
    +
      ...
    +
      <xsl:call-template name="ut:count"> +
        <xsl:with-param name="string" select="..."/> +
        <xsl:with-param name="target" select="..."/> +
      </xsl:call-template> +
      ...
    +
    +
  6. +
+
+ + +
+

APIs

+

+The API document of xslutil is generated with xsldoc.
+The generated API document is here. +

+
+ + +
+

Tests

+

+This section provides the results of unit tests of named-templates written in the API document. +

+ +
+ + +
+

Links

+

+xslutil is oe of applications in xslet project. +xslet is a project to develop Web applications with XSL (XSLT and XPath). +

+ +

+XSLT and XPath is the specifications specified by W3C. +xslutil uses XSLT version 1.0 and XPath version 1.0 in it because Web browsers support them. +

+ +

+In addition, xslutil uses XSLT version 3.0 and XPath version 3.0 in the build environment. +

+ +

+The xslutil also uses following application as tools in the build environment. +

+ +
+ + +