[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: That old song "document() with text-files"
Alexander Johannesen wrote: > Michael Kay <mhk@xxxxxxxxx> wrote: > > You can use the XSLT 2.0 function unparsed-text() in Saxon 7.4. > > Bingo! :) Does anyone know of similar functions in other parsers. > (Damn those Saxon people; they've got all the cool whistles and bells, > don't they? :) Or does it exsist an EXSLT equivalent? *hoping* We have an extension function like that in 4Suite, but I wouldn't choose an XSLT processor just on the basis of it having that one function. It's probably one of the easiest extensions to write for any processor, anyway. There's also the option of <?xml version="1.0"?> <!DOCTYPE wrapper [ <!ENTITY textfile SYSTEM "mytext.txt"> ]> <wrapper>&textfile;</wrapper> and <xsl:value-of select="document('wrapper.xml')/wrapper/text()"/> although if mytext.txt is not UTF-8 encoded (or isn't UTF-16 with a BOM) then you'll need to first ensure that mytext.txt starts with an accurate XML text declaration like <?xml version="1.0" encoding="iso-8859-1"?> Mike -- Mike J. Brown | http://skew.org/~mike/resume/ Denver, CO, USA | http://skew.org/xml/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|