Subject: RE: document('data.csv') fails; workaround needed
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Thu, 22 Nov 2001 17:10:30 -0000
|
> Is there a clever way to import CSV data into the stylesheet?
> The following fails of course:
>
> <xsl:variable name="csv" select="document('data.csv')"/>
>
Assuming a JAXP 1.1 environment:
Write yourself a parser for the CSV data, make the parser implement the SAX
XMLReader interface, and then write a URIResolver that when given the URI
"data.csv", returns a SAXSource containing this parser and the required
input file.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|