This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: document('data.csv') fails; workaround needed


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]