Judd
May 1st, 2002, 05:23 AM
I've created some 'HTML' help files using XML to hold my data, and an XSL stylesheet to hold my template HTML and insert the content from the XML file.
A typical example of the XML follows:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="XML Help.xsl"?>
<HelpDoc title="RTO+ GUI" subtitle="New Project Dialog">
<Entry title="Dialog" url="dlg">
<Content><![CDATA[
<p align="center">
<img src=".\Media\Images\NewProjectDialog.gif" alt="New Project Dialog" width="657" height="417" />
</p>
]]></Content>
</Entry>
<Entry title="General Usage" url="usage">
<Content><![CDATA[
<p>This dialog is used to create an new, empty, RTO+ project. The project name is used to
create both the project directory and the project file, as shown in the right hand tree view. This tree also shows the directories that
will be created automatically with the project, under the location specified in the left hand tree. Apart from name and location, all
fields are optional.</p>
<p>New projects contain a single, standard, database that is copied from the installed
location. This database is made the project master. References to the installed standard screens are also added to new projects
(this can take some time).</p>
]]></Content>
</Entry>
<History>
<Revision author="DJC" date="29 Apr 2002" reason="Initial Version"/>
<LastMod><![CDATA[29<sup>th</sup> April 2002]]></LastMod>
</History>
</HelpDoc>
I use 'disable-output-escaping' on the CDATA sections to effectively insert HTML in the XML. However, reading around, I gather that the use of d-o-e is frowned upon. I can see that I could use more XML tags (e.g. <img> , <text> , etc.) to handle things a little better, but I don't want to have to re-write HTML in XML/XSL!! Is there any better way to insert HTML in XML?
I have other problems too. I've tried to split my XSL into a number of templates, and use apply-templates, but my style definitions don't cascade from one template to another. So at the moment, I just have to match the root element and insert everything from my HTML template.
My computer appears to be the only one in the office that can correctly display the XML-transposed-to-HTML. Everyone else's displays the template HTML content from the XSL sheet, but doesn't add the actual content from the XML.
Also, I've compiled the files into a CHM file, but I can't open it. It says 'There is not enough memory available for this task' (file is 81K, I have 512MB RAM and big disks!)
Can anyone help me with any of these problems? In fact, anyone who has ever don anything using XML probably knows more than me...
Arrrgghhhhh!
A typical example of the XML follows:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="XML Help.xsl"?>
<HelpDoc title="RTO+ GUI" subtitle="New Project Dialog">
<Entry title="Dialog" url="dlg">
<Content><![CDATA[
<p align="center">
<img src=".\Media\Images\NewProjectDialog.gif" alt="New Project Dialog" width="657" height="417" />
</p>
]]></Content>
</Entry>
<Entry title="General Usage" url="usage">
<Content><![CDATA[
<p>This dialog is used to create an new, empty, RTO+ project. The project name is used to
create both the project directory and the project file, as shown in the right hand tree view. This tree also shows the directories that
will be created automatically with the project, under the location specified in the left hand tree. Apart from name and location, all
fields are optional.</p>
<p>New projects contain a single, standard, database that is copied from the installed
location. This database is made the project master. References to the installed standard screens are also added to new projects
(this can take some time).</p>
]]></Content>
</Entry>
<History>
<Revision author="DJC" date="29 Apr 2002" reason="Initial Version"/>
<LastMod><![CDATA[29<sup>th</sup> April 2002]]></LastMod>
</History>
</HelpDoc>
I use 'disable-output-escaping' on the CDATA sections to effectively insert HTML in the XML. However, reading around, I gather that the use of d-o-e is frowned upon. I can see that I could use more XML tags (e.g. <img> , <text> , etc.) to handle things a little better, but I don't want to have to re-write HTML in XML/XSL!! Is there any better way to insert HTML in XML?
I have other problems too. I've tried to split my XSL into a number of templates, and use apply-templates, but my style definitions don't cascade from one template to another. So at the moment, I just have to match the root element and insert everything from my HTML template.
My computer appears to be the only one in the office that can correctly display the XML-transposed-to-HTML. Everyone else's displays the template HTML content from the XSL sheet, but doesn't add the actual content from the XML.
Also, I've compiled the files into a CHM file, but I can't open it. It says 'There is not enough memory available for this task' (file is 81K, I have 512MB RAM and big disks!)
Can anyone help me with any of these problems? In fact, anyone who has ever don anything using XML probably knows more than me...
Arrrgghhhhh!