[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|