Ferdinand Soethe wrote: > Johannes Schaefer wrote: > > JS> This looks very much like what I've once used to > JS> extend the sdocbook DTD (see below). > JS> But I think you've got it running anyway by now.
Copied your answer here, so that the code is present still. See below.
> No, I haven't. Does the dtd look right? Testing that is a > bit difficult as so many things could go wrong (and not be > detected). So somebody saying this way to do it is right > would be much appreciated.
Actually I tried this outside of Forrest as a proof of concept. Using Saxon [1] I got an XML document that conforms to my extended DTD [2] transformed to sDocBook and from there to HTML/PDF.
I'm quite confident that this works inside Forrest as well.
You'll have to work out how to do the ENTITY resolution.
> <!ENTITY % sdocbook SYSTEM "sdocbook.dtd">
I simply copied the sdocbook stuff to the directory in which I was experimenting and used SYSTEM.
>> FS> <!ENTITY % document PUBLIC >> FS> "-//APACHE//ENTITIES Documentation V2.0//EN" >> FS> "document-v20.mod">
You did the resolution with PUBLIC. I don't know if this works. Try it out! Maybe you can put it into a input-plugin?!
Cheers Johannes
[1] http://saxon.sourceforge.net/ [2] see code snippet below
Johannes Schaefer wrote:
This looks very much like what I've once used to extend the sdocbook DTD (see below). But I think you've got it running anyway by now.
Johannes
[2]
<!ENTITY % sdocbook SYSTEM "sdocbook.dtd"> %sdocbook;
<!-- title-less section: the title will be inserted by the stylesheet --> <!ENTITY % tlsection "sectioninfo?, (((%divcomponent.mix;)+, section*) | section+)">
<!ELEMENT control ((%sect.title.content;), purpose, look, section*) >
<!ELEMENT purpose (%tlsection;) > <!ELEMENT look (%tlsection;) >
[/2]
Ferdinand Soethe wrote:
After some more reading ....
Given this structure
FS> <coursedata> FS> <structuredpart> FS> ... FS> </structuredpart> FS> <webtext> FS> content in here should validate against document-v20 FS> </webtext> FS> </coursedata>
will this be ok for a dtd?
FS> <?xml version="1.0" encoding="UTF-8"?>
FS> FS> FS> <!-- =============================================================== -->
FS> <!-- Include the Common ISO Character Entity Sets -->
FS> <!-- =============================================================== -->
FS> FS> <!ENTITY % common-charents PUBLIC
FS> "-//APACHE//ENTITIES Common Character Entity Sets V1.0//EN"
FS> "common-charents-v10.mod">
FS> %common-charents;
FS> FS> <!-- =============================================================== -->
FS> <!-- Document -->
FS> <!-- =============================================================== -->
FS> FS> <!ENTITY % document PUBLIC
FS> "-//APACHE//ENTITIES Documentation V2.0//EN"
FS> "document-v20.mod">
FS> %document;
FS> FS> <!-- webtext can have anything that body can in normal docs -->
FS> <!ELEMENT webtext (%sections; | %blocks;)+>
FS> FS> <!-- Need to define Elements of my structured part here -->
FS> FS> FS> <!-- My main structure -->
FS> <!ELEMENT coursedata (webtext | structuredpart )+>
Thanks Ferdinand Soethe
--
User Interface Design GmbH * Teinacher Str. 38 * D-71634 Ludwigsburg
Fon +49 (0)7141 377 000 * Fax +49 (0)7141 377 00-99
Geschäftsstelle: User Interface Design GmbH * Lehrer-Götz-Weg 11 * D-81825 München
www.uidesign.de
Buch "User Interface Tuning" von Joachim Machate & Michael Burmester
www.user-interface-tuning.de
Besuchen Sie uns auf der Hannover Messe 11.-15. April 2005 Halle 2, Stand C14 auf dem MMI Gemeinschaftsstand www.uidesign.de/hmi2005
Nächstes TAE-Seminar zu User Interface Design Ostfildern-Nellingen, 07.-08. April 2005 www.tae.de TAE-Veranstaltung Nr. 31189