This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]