[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Saxon/C going forward

Subject: Re: Saxon/C going forward
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Thu, 19 Dec 2013 08:13:45 +0000
Re:  Saxon/C going forward
Many thanks - a very useful contribution.

Michael Kay

On 19 Dec 2013, at 03:31, Steve Ball <Steve.Ball@xxxxxxxxxxxxxx> wrote:

> Hi ONeil,
> By way of background, I wrote the Tcl interface for libxml2 & libxslt. A
scripting language (whether it is Tcl or any other) is very useful for
orchestrating transformations.
> A nice feature of Tcl is Tk; it is easy and quick to create user interfaces
incorporating XML and XSLT. For example, tkxmllint and tkxsltproc.
> Another nice feature is that Tcl is dynamically evaluated, so I can use
libxslt to process an XML document and the result is a text document that I
then evaluate as a Tcl script.
> Anyway, now that Saxonica has released Saxon/C Im working on a Tcl
interface for it. My requirements are as follows:
> * be able to parse an XML document and hold it as an object in memory; XML
documents do not necessarily come from files.
> * be able to compile an XSL stylesheet
> * be able to apply a compiled XSL stylesheet to an XML document and hold the
(primary) result as an object in memory; I also need to know what type of
document has been produced (XML, HTML, text, other); ditto for secondary
result documents
> * be able to pass parameters to the stylesheet; libxslt allows parameters to
be strings or XPath expressions
> * be able to serialise an XML document
> * be able to implement extension elements and functions in Tcl (I call that
the Tcl sandwich - XSLT sandwiched between the Tcl application and Tcl
extensions); btw implementing extension functions in libxslt is easy but
extension elements was much harder
> * be able to handle exceptions and messages
> * be able to intercept external communications, such as document(),
unparsed-text(), unparsed-text-available(), xsl:result-document, etc
> One goal is to implement XProc. If I have a pipeline and Im passing result
document between XSLT steps then having to serialise to a file would be very
inefficient (or even possible if running in an environment with no
> Breaking down the stylesheet execution into parts that can be performed
beforehand and kept ready-to-go is highly desirable. I mention compilation
above. If it were also possible to compute keys separately (for a particular
document) then that would be advantageous too.
> Happy to discuss further, either on the list or privately.
> Cheers,
> Steve Ball
> On 19 Dec 2013, at 4:11 am, O'Neil Delpratt <oneil@xxxxxxxxxxxx> wrote:
>> After the first alpha release of Saxon/C we have been grateful for the
feedback and comments received. Some of the issues we have addressed already
and the others we will hopefully address in the next maintenance release.
>> We are starting to look at the requirements for extension function support
and would welcome input from users with experiences of libxslt facilities in
this area, in particular does libxslt provide what is needed or are there
improvements that you could suggest?
>> In the development of the PHP extension we tried to follow the functions
available in the PHP XSL extension (i.e. libxslt) where possible. Please see
the API of the Saxon/C PHP extension:
>> XsltProcessor: __construct
>> XsltProcessor:xsltSaveResultToFile
>> XsltProcessor:xsltApplyStylesheet
>> XsltProcessor:xsltApplyStylesheet1
>> XsltProcessor:setSourceValue
>> XsltProcessor:parseString
>> XsltProcessor:setParamater
>> XsltProcessor:setProperty
>> XsltProcessor:clear
>> XsltProcessor:clearException
>> XsltProcessor:getErrorCode
>> XsltProcessor:getErrorMessage
>> XsltProcessor:getExceptionCount
>> XsltProcessor:version
>> To those who use XSL on PHP are you happy with the way it is done or would
do it differently? Bearing in mind that we may need to make changes to support
the XPath 2.0 type system. Also is interop with the libxml parser important?
>> Kind regards,
>> --
>> O'Neil Delpratt
>> Software Developer, Saxonica Limited
>> Email: oneil@xxxxxxxxxxxx <mailto:oneil@xxxxxxxxxxxx>
>> Tel: +44 118 946 5894
>> Web: http://www.saxonica.com
>> Saxonica Community Site: http://dev.saxonica.com Saxonica Bug tracking
System: https://saxonica.plan.io/

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.