RE: include ?

Subject: RE: include ?
From: Richard Lander <rlander@xxxxxxxxxxxxx>
Date: Fri, 8 Sep 2000 13:13:10 -0700
 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 <=