[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Mixing XML and non-XML input possible ?

Subject: Re: Mixing XML and non-XML input possible ?
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 30 Oct 2007 12:30:44 -0400
Re:  Mixing XML and non-XML input possible ?
Andreas,

As others have said, there is a function you can use in XSLT 2.0 for this purpose.

In XSLT 1.0, you can wrap the text file into an XML file as a parsed general entity, and call it that way. As long as it will parse to create a text node (that is, it has to be free of unescaped < and &, and it has to be correct with respect to its character encoding), this will work. Strictly speaking, this is not an XSLT feature; you are just taking advantage of a feature in XML.

<!DOCTYPE wrapper [
<!ENTITY textfile SYSTEM "textfile.txt" >
]>
<wrapper>&textfile;</wrapper>

Cheers,
Wendell

At 02:39 AM 10/24/2007, you wrote:
am I right, that XSLT is unable to take any non-XML textfile as input?

The problem I am facing is, that I have to insert the contents of a
plain text file into a node within an XHTML file for a statically built
web-site. I found no way how to do it.

--
Greetings,
Andreas Mixich


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================

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.