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

Re: How to stream-process non-XML text using unparsed

Subject: Re: How to stream-process non-XML text using unparsed-text-lines( ) ?
From: "Costello, Roger L. costello@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 26 Jul 2014 10:04:53 -0000
Re:  How to stream-process non-XML text using  unparsed
Michael Kay wrote:

	In Saxon, just use
	xsl:for-each select="unparsed-text-lines(...)".

	IIRC the Saxon 9.5 implementation is streamed,
	but its definition of "lines" is based on Java
	readLine() which has some subtle differences
	from the definition in the XPath spec as to
	exactly what counts as a line ending.

	xsl:stream is only for use with XML input.

Great! Thank you very much.

Is unparsed-text-lines(...) always streaming, or is it streaming only when the
XSLT contains:

	<xsl:mode streamable="yes" />

The below XSLT program works great. Would it work differently if I were to
remove the xsl:mode? How do I know that the input is being streamed?  /Roger

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

    <xsl:output method="xml" />

    <xsl:mode streamable="yes" />

    <xsl:template match="/">
            <xsl:for-each select="unparsed-text-lines('BookCatalogue.txt')">
                    <xsl:value-of select="substring-before(., '/')" />


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.