[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Are there things missing in XSLT which force peopl
On 29.10.2010 18:13, Michael Kay wrote:
When processing a source document, the XSLT processor reaches a template where it needs to read input from another source in order to proceed. If the other source is a document (for example, a configuration file), everything is ok. But if the other source is user input, I don't see how this could be achieved by means of streaming. As you suggest, the streaming scenario is valid if the /primary/ input (the input that fires the events during processing) is being read from stdin. You can type some XML as text, it will be parsed and then transformed according to the streaming mode's templates. But if another input (a file that is being converted, streaming or not) fires the events, how will you make the processing wait for a certain amount of input from stdin (a character, a line of plain text, some text parsed as an element or a document node, ...), assign this input to a variable and then continue processing with the variable set to the user input? For example, think of emacs' interactive query-replace vs. replace-string. I'd like to write my own query-replace stylesheets. Or take aspell: The way it works now, XSLT acts like aspell in pipe mode, which is undoubtedly useful. But interactive aspell is useful in many more use cases. @Dimitre: I'd like to avoid creating extension functions for this because I don't like the deployment overhead that extension functions entail. I think something that may be called xsl:prompt or xsl:input might well be part of core XSLT. -Gerrit
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|