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

document() for non-XML documents

Subject: document() for non-XML documents
From: Elliotte Rusty Harold <elharo@xxxxxxxxxxxxxxx>
Date: Fri, 24 Sep 1999 18:50:25 -0400
style sheet non xml
The document() function allows me to merge multiple XML input documents.
However, what if I need to merge text and HTML documents (and possibly
other formats) into my output documents? Is there some way to do this?

The specific use-case I'm encountering is the XML notes for a presentation
on XSL itself. A slide may contain an XML document. This is
straight-forward like this:

  <include href="compositions.xml"/>

The style sheet replaces the <include> element with the named XML document
compositions.xml. This also works for inserting an XSL style sheet into the
output since XSL style sheets are well-formed XML document.

However, suppose I want to insert the contents of a simple text file:

  <include href="compositions.txt"/>

In this case document() doesn't succeed because compositions.txt is not
well-formed HTML.

A slightly more complicated case: suppose I want to insert the contents of
a non-well-formed HTML file:

  <include href="compositions.html"/>

It seems to me there should be a way to do this, though perhaps this is the
province of the as-yet-unimplemented XLink spec.


+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@xxxxxxxxxxxxxxx | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|                  The XML Bible (IDG Books, 1999)                   |
|              http://metalab.unc.edu/xml/books/bible/               |
|   http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/ |
|  Read Cafe con Leche for XML News: http://metalab.unc.edu/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.