RE: could one xsl file generate more xml files at a time?

Subject: RE: could one xsl file generate more xml files at a time?
From: "chris bayes" <chrisjbayes@xxxxxxxxxxx>
Date: Fri, 7 Apr 2000 14:14:08 +0100
Well you seem to be wanting to do one of two things here. Either display xml
in some frames in the browser or generate a frameset and content from one
xml file.
The first one is easy, just use an html file for the frameset and specify
xml files for the source. The second one is rather tricky but possible and
html for the frameset is still the best way to go. You will need a couple of
extra xml files.
------------------------toc.xml
<?xml version="1.0"?>
<!DOCTYPE page [
<!ENTITY toc SYSTEM "source.xml">
]>
<?xml-stylesheet type="text/xsl" href="style.xsl"?>
<page title="XML TOC">
<TOC>
&toc;
</TOC>
<page>
------------------------main.xml
<?xml version="1.0"?>
<!DOCTYPE page [
<!ENTITY main SYSTEM "source.xml">
]>
<?xml-stylesheet type="text/xsl" href="style.xsl"?>
<page title="XML TOC">
<MAIN>
&main;
</MAIN>
<page>
------------------------source.xml
up to you
<someelement section-title="a section">
  text text text text text text text text text text text text
</someelement>
------------------------style.xsl
...
<xsl:template match="TOC/someelement">
	format elements as a toc using e.g. just section-title
</xsl:template>
<xsl:template match="MAIN/someelement">
	format elements as main page using just text()
</xsl:template>



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


Current Thread