|
|
libxslt is the [XSLT](http://www.w3.org/TR/xslt) C library developed for the GNOME project. XSLT itself is a an XML language to define transformation for XML. libxslt is based on [libxml2](https://gitlab.gnome.org/GNOME/libxml2), the XML C library developed for the GNOME project. It also implements most of the [EXSLT](http://www.exslt.org/) set of processor-portable extension functions and some of Saxon's evaluate and expressions extensions.
|
|
|
libxslt is the [XSLT](https://www.w3.org/TR/xslt) C library developed for the GNOME project. XSLT itself is a an XML language to define transformation for XML. libxslt is based on [libxml2](https://gitlab.gnome.org/GNOME/libxml2), the XML C library developed for the GNOME project. It also implements most of the [EXSLT](http://www.exslt.org/) set of processor-portable extension functions and some of Saxon's evaluate and expressions extensions.
|
|
|
|
|
|
People can either embed the library in their application or use xsltproc, the command line processing tool. This library is free software and can be reused in commercial applications.
|
|
|
|
... | ... | @@ -7,7 +7,7 @@ Here are some key points about libxslt: |
|
|
* Libxslt is a C implementation
|
|
|
* Libxslt is based on libxml for XML parsing, tree manipulation and XPath support
|
|
|
* It is written in plain C, making as few assumptions as possible, and sticking closely to ANSI C/POSIX for easy embedding. Should works on Linux/Unix/Windows.
|
|
|
* This library is released under the [MIT Licence](http://www.opensource.org/licenses/mit-license.html)
|
|
|
* This library is released under the [MIT License](http://www.opensource.org/licenses/mit-license.html)
|
|
|
* Though not designed primarily with performances in mind, libxslt seems to be a relatively fast processor.
|
|
|
|
|
|
## HTML Documentation
|
... | ... | @@ -22,68 +22,26 @@ Generated HTML documentation is available via GitLab Pages: |
|
|
|
|
|
## Mailing list
|
|
|
|
|
|
There is a mailing-list [xslt@gnome.org](mailto:xslt@gnome.org) for libxslt, with an [on-line archive](http://mail.gnome.org/archives/xslt/). To subscribe to this list, please visit the [associated web](http://mail.gnome.org/mailman/listinfo/xslt) page and follow the instructions.
|
|
|
|
|
|
## FAQ
|
|
|
|
|
|
### Troubles compiling or linking programs using libxslt
|
|
|
|
|
|
Usually the problem comes from the fact that the compiler doesn't get the right compilation or linking flags. There is a small shell script `xslt-config` which is installed as part of libxslt usual install process which provides those flags. Use
|
|
|
|
|
|
`xslt-config --cflags`
|
|
|
|
|
|
to get the compilation flags and
|
|
|
|
|
|
`xslt-config --libs`
|
|
|
|
|
|
to get the linker flags. Usually this is done directly from the Makefile as:
|
|
|
|
|
|
`` CFLAGS=`xslt-config --cflags` ``
|
|
|
|
|
|
`` LIBS=`xslt-config --libs` ``
|
|
|
|
|
|
Note also that if you use the EXSLT extensions from the program then you should prepend `-lexslt` to the LIBS options
|
|
|
|
|
|
### Passing parameters on the xsltproc command line doesn't work
|
|
|
|
|
|
`xsltproc --param test alpha foo.xsl foo.xml`
|
|
|
|
|
|
The param does not get passed and ends up as "".
|
|
|
|
|
|
In a nutshell do a double escaping at the shell prompt:
|
|
|
|
|
|
`xsltproc --param test "'alpha'" foo.xsl foo.xml`
|
|
|
|
|
|
i.e. the string value is surrounded by " and ' then terminated by ' and ". Libxslt interpret the parameter values as XPath expressions, so the string ->`alpha`<- is intepreted as the node set matching this string. You really want ->`'alpha'`<- to be passed to the processor. And to allow this you need to escape the quotes at the shell level using ->`"'alpha'"`<- .
|
|
|
|
|
|
or use
|
|
|
|
|
|
`xsltproc --stringparam test alpha foo.xsl foo.xml`
|
|
|
There is a mailing-list [xslt@gnome.org](mailto:xslt@gnome.org) for libxslt, with an [on-line archive](https://mail.gnome.org/archives/xslt/). To subscribe to this list, please visit the [associated web](https://mail.gnome.org/mailman/listinfo/xslt) page and follow the instructions.
|
|
|
|
|
|
## Language bindings
|
|
|
|
|
|
There is a number of language bindings and wrappers available for libxml2, the list below is not exhaustive.
|
|
|
There is a number of language bindings and wrappers available for libxslt, the list below is not exhaustive.
|
|
|
|
|
|
* [Matt Sergeant](http://mail.gnome.org/archives/xml/2001-March/msg00014.html) developped [XML::LibXML and XML::LibXSLT](http://axkit.org/download/), Perl wrappers for libxml2/libxslt as part of the [AxKit XML application server](http://axkit.com/)
|
|
|
* [Dave Kuhlman](mailto:dkuhlman@cutter.rexx.com) provides and earlier version of the libxml/libxslt [wrappers for Python](http://www.rexx.com/\~dkuhlman)
|
|
|
* Petr Kozelka provides [Pascal units to glue libxml2](http://sourceforge.net/projects/libxml2-pas) with Kylix, Delphi and other Pascal compilers
|
|
|
* Wai-Sun "Squidster" Chia provides [bindings for Ruby](http://www.rubycolor.org/arc/redist/) and libxml2 bindings are also available in Ruby through the [libgdome-ruby](http://libgdome-ruby.berlios.de/) module maintained by Tobias Peters.
|
|
|
* Matt Sergeant developed [XML::LibXSLT](https://metacpan.org/dist/XML-LibXSLT), Perl wrappers for libxslt
|
|
|
* There are [bindings for Ruby](https://rubygems.org/gems/libxslt-ruby) and libxslt bindings are also available in Ruby through [Nokogiri](https://nokogiri.org/).
|
|
|
* Steve Ball and contributors maintains [libxml2 and libxslt bindings for Tcl](http://tclxml.sourceforge.net/)
|
|
|
* [Peter Jones](mailto:xmlwrapp@pmade.org) maintains C++ bindings for libxslt within [xmlwrapp](http://pmade.org/pjones/software/xmlwrapp/)
|
|
|
* [Mike Phillips](http://xmlsoft.org/XSLT/phillim2@comcast.net) provides a module using [libxslt for PHP](http://siasl.dyndns.org/projects/projects.html).
|
|
|
* [LibxmlJ](http://savannah.gnu.org/projects/classpathx/) is an effort to create a 100% JAXP-compatible Java wrapper for libxml2 and libxslt as part of GNU ClasspathX project.
|
|
|
* Patrick McPhee provides Rexx bindings fof libxml2 and libxslt, look for [RexxXML](http://www.interlog.com/\~ptjm/software.html).
|
|
|
* [Satimage](http://www.satimage.fr/software/en/xml_suite.html) provides [XMLLib osax](http://www.satimage.fr/software/en/downloads_osaxen.html). This is an osax for Mac OS X with a set of commands to implement in AppleScript the XML DOM, XPATH and XSLT.
|
|
|
* [xmlwrapp](https://vslavik.github.io/xmlwrapp/), a C++ library built atop libxml2 and libxslt
|
|
|
* PHP has built-in libxslt bindings
|
|
|
* [LibxmlJ](https://savannah.gnu.org/projects/classpathx/) is an effort to create a 100% JAXP-compatible Java wrapper for libxml2 and libxslt as part of GNU ClasspathX project.
|
|
|
* Patrick McPhee provides Rexx bindings fof libxml2 and libxslt, look for [RexxXML](https://www.interlog.com/\~ptjm/software.html).
|
|
|
* Satimage provides [XMLLib osax](https://www.satimage.fr/software/en/downloads_osaxen.html). This is an osax for Mac OS X with a set of commands to implement in AppleScript the XML DOM, XPATH and XSLT.
|
|
|
|
|
|
## Contributions
|
|
|
|
|
|
* Bjorn Reese is the author of the number support and worked on the XSLTMark support
|
|
|
* William Brack was an early adopted, contributed a number of patches and spent quite some time debugging non-trivial problems in early versions of libxslt
|
|
|
* [Igor Zlatkovic](mailto:igor@zlatkovic.com) is now the maintainer of the Windows port, [he provides binaries](http://www.zlatkovic.com/projects/libxml/index.html)
|
|
|
* Igor Zlatkovic is now the maintainer of the Windows port, [he provides binaries](https://www.zlatkovic.com/projects/libxml/index.html)
|
|
|
* Thomas Broyer provided a lot of suggestions, and drafted most of the extension API
|
|
|
* John Fleck maintains [a tutorial for libxslt](http://xmlsoft.org/XSLT/tutorial/libxslttutorial.html)
|
|
|
* [Matt Sergeant](http://mail.gnome.org/archives/xml/2001-March/msg00014.html) developed [XML::LibXSLT](http://axkit.org/download/), a perl wrapper for libxml2/libxslt as part of the [AxKit XML application server](http://axkit.com/)
|
|
|
* there is a module for [libxml/libxslt support in OpenNSD/AOLServer](http://acs-misc.sourceforge.net/nsxml.html)
|
|
|
* [Dave Kuhlman](mailto:dkuhlman@cutter.rexx.com) provides libxml/libxslt [wrappers for Python](http://www.rexx.com/\~dkuhlman)
|
|
|
* [Steve Ball](mailto:Steve.Ball@explain.com.au), and contributors maintain [tcl bindings for libxml2 and libxslt](http://tclxml.sourceforge.net/), as well as [tkxmllint](http://tclxml.sf.net/tkxmllint.html) a GUI for xmllint and [tkxsltproc](http://tclxml.sf.net/tkxsltproc.html) a GUI for xsltproc.
|
|
|
* If you want to use libxslt in a Mac OS X/Cocoa or Objective-C framework, Marc Liyanage provides [an application TestXSLT for XSLT and XML editing](http://www.entropy.ch/software/macosx/#testxslt) including wrapper classes for the XML parser and XSLT processor. |
|
|
\ No newline at end of file |
|
|
* John Fleck wrote [a tutorial for libxslt](https://gnome.pages.gitlab.gnome.org/libxslt/tutorial/libxslttutorial.html)
|
|
|
* Dave Kuhlman provided the first version of libxml/libxslt wrappers for Python |
|
|
\ No newline at end of file |