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

Re: XSLT 3.0 processor accepting non well-formed XML

Subject: Re: XSLT 3.0 processor accepting non well-formed XML inputs
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 1 Mar 2019 11:43:52 -0000
Re:  XSLT 3.0 processor accepting non well-formed XML
Ethics to me is about building systems that don't harm people. It's not about
conforming to rules and regulations.

In practice it is often useful to be able to extract information from the
start of an XML document (e.g. an attribute of the root element) without
reading gigabytes of data that follow. Most XML parsers therefore provide an
option for the application to terminate parsing as soon as they have obtained
the information they need. We can debate whether a conformant XML parser is
permitted to provide such an option; in practice it really doesn't matter:
parsers will provide such an option because it is needed.

This rule in the XSLT spec for streaming is just warning you that if your
stylesheet does something like

<xsl:source-document href="big.xml">
  <xsl:sequence select="string(/*/@version)"/>

then it may succeed even though big.xml contains errors after the first start
tag. Is it "ethical" to provide such an option? Absolutely. In some cases,
extracting the data in microseconds rather than seconds might save lives.

It's the responsibility of the application designer to decide the right
trade-offs between performance, security, reliability, and other system

Michael Kay

> On 1 Mar 2019, at 11:23, Mukul Gandhi gandhi.mukul@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hi all,
>    I've got some chance to try XSLT 3.0's streaming features, and have found
them useful. I've a slight question as below,
> The XSLT 3.0 spec, in the section "2.12 Streamed Validation" says
> <quote>
> A streamed transformation that only accesses part of the input document (for
example, a header at the start of a document) is not required to continue
reading once the data it needs has been read. This means that XML
well-formedness or validity errors occurring in the unread part of the input
stream may go undetected.
> </quote>
> As per above quoted text, is it ethical for an XSLT (3.0) processor to
provide a functionality that's based on a non well-formed input XML document?
> --
> Regards,
> Mukul Gandhi
> alt email : mukulgandhi@xxxxxxx
> XSL-List info and archive
> EasyUnsubscribe (by email)

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.