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

Re: unparsed text

Subject: Re: unparsed text
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Fri, 16 Nov 2012 09:11:24 +0000
Re:  unparsed text
The second part of the answer (which I guess Ken assumed you already knew) is that having started your transformation without an XML document as input, you can then read the text file using the unparsed-text() function.

Michael Kay
Saxonica

On 15/11/2012 19:11, G. Ken Holman wrote:
At 2012-11-15 19:05 +0000, Ihe Onwuka wrote:
 I need to process a plain text file with XSLT... do I have to fake an
XML document to input as there is no XML

It all depends on how you invoke the XSLT processor.


You can invoke XSLT by specifying the name of a starting template. An example using Saxon is:

java -jar saxon.jar -it:start-me-up -xsl:myStylesheet.xsl

... and then have:

<xsl:template name="start-me-up">

But I often just supply the stylesheet as my input XML document:

java -jar saxon.jar -s:myStylesheet.xsl -xsl:myStylesheet.xsl

... and then have:

<xsl:template match="/">

Remember that an XSLT stylesheet is, itself, an XML document.

I hope this helps.

. . . . . . . Ken


-- Contact us for world-wide XML consulting and instructor-led training Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.