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

Re: That old song "document() with text-files"

Subject: Re: That old song "document() with text-files"
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Fri, 25 Apr 2003 22:44:16 +0200
song text
Alexander Johannesen wrote:
I've got a problem with importing data from text-files. Of course it
isn't supposed to work, but my question is more; does anyone have
any idea of how to solve the problem of reading documents that aren't
XML, as pure CDATA? Using document() is for XML docs only, but maybe some vendor has made some extension to this common problem? All I need
is a CDATA copy-of of a file; no parsing or anything, a pure copy.


The text-input files are generated elsewhere, and I don't have the option to add XML-wrapper to it, nor making the little HTML inside
XHTML.


I *could* use ENTITIES and define these, but filenames come in during
parsing in a variable $filename, so it can't work that way. Any ideas
anyone?

Perhaps not the most convenient, but if you can get an XInclude processor, for example http://xincluder.sourceforge.net you can use a three stage process 1. Transform the source into something containing <xi:include href="{$filename}" parse="text"/> 2. Run it through the XInclude processor, which pulls in the referenced text 3. Finish with another XSL transforamtion. See also http://www.w3.org/TR/xinclude/

You can use Apache Cocoon to define a pipeline and run it
all in a single process:
  http://cocoon.apache.org

J.Pietschmann


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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.