XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
steven matthewsSubject: Opening and reading files
Author: steven matthews
Date: 01 Apr 2007 03:19 PM
Q1: how do you open a file in XSLT and display the contents ? I am using this code but it only displays the URI (path) of the file stored in <text>

<!-- TEXT: open a file and display text ?? -->
<xsl:if test="starts-with($MM_TEXT, 'C:\')">
<p><xsl:value-of select="text"/></p>
</xsl:if>

Is this possible in XSLT ?

Do you have any suggestions ?

Thanks,

Steven

Posttop
Ivan PedruzziSubject: Opening and reading files
Author: Ivan Pedruzzi
Date: 01 Apr 2007 11:36 PM

Hi Steven

What kind of file you are trying to open?

If it's an XML file you copy the entire document in the result tree with the following
<xsl:copy-of select="document($MM_TEXT)"/>

If it's CSV, TAB or EDI you may use the DataDirect XML Converter URIRsolver

CSV example
<xsl:copy-of select="document(adapter:CSV?$MM_TEXT)"/>


If it is a free text you could switch to XSLT 2.0 and use unparsed-text
http://www.w3.org/TR/xslt20/#unparsed-text


Ivan Pedruzzi
Stylus Studio Team
http://www.stylusstudio.com/xml_download.html

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.