[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: Mike Brown <mike@xxxxxxxx>
Date: Fri, 25 Apr 2003 21:27:50 -0600 (MDT)
document function text files xslt
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


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.