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

RE: include ?

Subject: RE: include ?
From: Richard Lander <rlander@xxxxxxxxxxxxx>
Date: Fri, 8 Sep 2000 13:13:10 -0700
RE: include ?
 Eduardo,

There are two ways to do acheive your goal.

1 - Use an external entity.

<!DOCTYPE TEST [
<!ENTITY yourfile SYSTEM "yourfile.xml">
<!--this file cannot have a DOCTYPE, but can have an XML declaration (maybe
its a restricted one ... I can't remember) -->
]>

<TEST>
&yourfile;
<BODY>
</BODY>
</TEST>

2. use the document function in XSLT.

In your DOC, you might have:

<IncludeLink url="yourfile.xml"/>

In your XSLT you might have:

<xsl:template match="IncludeLink">
  <xsl:apply-templates select="document(@url)"/>
</xsl:template>


Either of those should work well. It all depends on whether you want to use
validate the fragment on its own (difficult with first method) and which
language you want to use to process your document. I prefer the XSLT method,
but either will work.

HTH,

Rich

-----Original Message-----
From: Eduardo Dominguez [mailto:edmz@xxxxxxxxxxxxxx]
Sent: Friday, September 08, 2000 12:03 PM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: xml:include ?


Is there something like this ? Havent found a refernce
for it. 

I want to be able to include a fixed xml file in
every other file, so that that I only have to
edit in one place and every file that includes
it reflects this change.

is this possible ?

thanks in advance.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • RE: include ?
    • Richard Lander - Fri, 8 Sep 2000 13:13:10 -0700 <=

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.