[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] unparsed text

Subject: Re: [xsl] unparsed text
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Nov 2012 14:11:14 -0500

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