[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] Mixing XML and non-XML input possible ?
Subject: Re: [xsl] Mixing XML and non-XML input possible ?
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 30 Oct 2007 12:30:44 -0400
|
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 |
|
Wendell Piez - 30 Oct 2007 21:30:14 -0000 <=
|
|