xsl-list
[Top] [All Lists]

Re: [xsl] How to process a sequence of any type as input of a transformation?

2018-06-12 10:58:19
Generally, the XSLT 3.0 Specification talks about "initial match selection":

http://www.w3.org/TR/xslt-30/#dt-initial-match-selection

and it seems that you need something similar.

However I don't know how Saxon implements this -- from the command-line or
via its API.

Also, piping to me implies *streaming*. I don't remember seeing any
discussion in the spec whether or not the initial match selection can be
streamed.


Definitely, the best person to provide the needed information is Dr.
Michael Kay.


Cheers,
Dimitre

On Tue, Jun 12, 2018 at 8:39 AM, Olivier Jeulin
olivier(_dot_)jeulin(_dot_)work(_at_)gmail(_dot_)com 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com>
wrote:

Hello,

according to http://www.exselt.net/features/new-in-xslt-30/
“Any sequence of any type can be the input for the transformation, not
just a document.”

I haven't found a clear statement of that in the norm, but I'd like to use
this feature (using Saxon, so if the solution is specific, we can switch to
the Saxon mailing list).

My use case is to read text lines from the output of another program using
a pipe (GNU/linux):
someProg | xsltProcessor x.xsl

where the output of someProg is
line1
line2
…
(I know how to do that using a parameter, or a file)

How can I access such a sequence from a stylesheet?


XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe <-list/782854> (by
email <>)




-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
To achieve the impossible dream, try going to sleep.
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they write
all patents, too? :)
-------------------------------------
Sanity is madness put to good use.
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>