Sign Up
Search
Options
search
Chat
Help
News
Log in
Not Logged in
Home
»
Boards
»
Stylus Studio Developer Network
»
XSLT Help and Discussion
»
Opening and reading files
Topic
Topic Page
1
2
3
4
5
6
7
8
9
Prev Topic
Next Topic
next
Subject:
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
top
Subject:
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
Prev Topic
Next Topic
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 to Conference:
Select Conference
Stylus Studio Feature Requests
Stylus Studio Technical Forum
Website Feedback
XSLT Help and Discussion
XQuery Help and Discussion
Stylus Studio FAQs
Stylus Studio Code Samples & Utilities
Stylus Studio Announcements
go
Log In Options
Username:
Password:
Site Map
|
Privacy Policy
|
Terms of Use
|
Trademarks
Stylus Scoop XML Newsletter:
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.