Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100811 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40100 invoked from network); 3 Oct 2017 09:05:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Oct 2017 09:05:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=oneil@saxonica.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=oneil@saxonica.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain saxonica.com from 217.69.43.196 cause and error) X-PHP-List-Original-Sender: oneil@saxonica.com X-Host-Fingerprint: 217.69.43.196 UK1MAIL2513-b.mymailbank.co.uk Received: from [217.69.43.196] ([217.69.43.196:59878] helo=uk1mail2513-b.mymailbank.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/9F-34435-3C253D95 for ; Tue, 03 Oct 2017 05:05:08 -0400 Received: from [10.0.0.7] (UnknownHost [82.152.109.221]) by uk1mail2513-d.mymailbank.co.uk with SMTP; Tue, 3 Oct 2017 10:04:43 +0100 Content-Type: multipart/alternative; boundary="Apple-Mail=_CF7ED975-3478-4FFE-931C-BF91B7E63349" Date: Tue, 3 Oct 2017 10:04:57 +0100 Message-ID: Cc: Michael Kay To: PHP internals Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) Subject: RFC proposal: Provide support for XSLT 3.0, XPath 3.1, and XQuery 3.1 From: oneil@saxonica.com (O'Neil Delpratt) --Apple-Mail=_CF7ED975-3478-4FFE-931C-BF91B7E63349 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi, We are considering submitting an RFC along the following lines and = welcome your comments: ** Provide support for XSLT 3.0, XPath 3.1, and XQuery 3.1 ** PHP is frequently used to create web services that process XML input and = deliver HTML to web clients. Often this is done by invoking XSLT = transformations. The XSLT processor currently provided in the PHP core, = however, only supports the XSLT 1.0 standard published in 1999. XSLT has = moved on significantly since then, with XSLT 2.0 in 2007 and XSLT 3.0 in = 2017. The newer standards provide many productivity benefits: regular = expressions, grouping, multiple output files, support for JSON, support = for HTML5, independent compilation of modules, to name a few. By failing = to support these, PHP is becoming a less attractive development platform = for XML-centric applications. XML has been superseded by JSON as the format of choice for simple = configuration and data files, but XML remains of strategic significance = for document-based processing and for the vast number of = industry-standard data exchange formats defined by XML schemas. XSLT 3.0 = allows XML and JSON data to be mixed and combined. PHP users needing access to XSLT 2.0 or 3.0 processing typically use = messy workarounds, such as sending transformation requests over HTTP to = a Java-based server, or using Java bridge technologies. Recently a = version of Saxon has been developed with a native PHP API, and the aim = of this RFC is to move this implementation into the PHP Core. The = existing XSLTProcessor will remain available and will continue to = provide XSLT 1.0 only, so existing applications will not be disrupted. Enhancing the existing XSLTProcessor is not an option: it has fallen too = far behind for this to be viable. The Saxon implementation of XSLT 3.0 is a recognized leader in this = field. This proposal offers to include the open-source version of Saxon = (Saxon-HE) in the PHP core. Saxon-HE includes support for the minimum = conformance levels of XSLT 3.0, XPath 3.1, and XQuery 3.1 defined by the = W3C specifications, as well as some optional features such as = serialization support. It achieves 100% pass rates for the relevant W3C = test suites. (It excludes schema-aware processing, higher-order = functions, streaming, and some other advanced options). The same API can = also be used to invoke the commercial versions of Saxon, which support = additional functionality and performance. Saxon-HE/C is already available for PHP 7 as a free-standing product. = Apart from the PHP interface, the source code is Java, and the product = is built for the PHP platform using the (non-open-source) Excelsior JET = compiler. Excelsior have a licensing scheme enabling the compiler to be = used by open source projects (see: https://www.excelsiorjet.com/free = ). Saxonica would continue to support = development of the project and welcome contributors to help maintain and = implement new features especially in PHP-specific areas of the project. Info on the latest Saxon/C release: = http://www.saxonica.com/saxon-c/index.xml = I welcome your comments in this intended proposal. kind regards, ------------------------------- O'Neil Delpratt Software Developer, Saxonica Limited=20 Email: oneil@saxonica.com Twitter: https://twitter.com/ond1 Tel: +44 118 946 5894 Web: http://www.saxonica.com Saxonica Community site: http://dev.saxonica.com = Bug tracking site: https://saxonica.plan.io/ --Apple-Mail=_CF7ED975-3478-4FFE-931C-BF91B7E63349--