Split documents via entities

Are you missing a feature? Request its implementation here.
jens
Posts: 6
Joined: Sat Jan 03, 2004 11:02 am

Split documents via entities

Post by jens »

Hi,

actually the new version of oxygen looks nice - good work :)

However, oxygen is not very useful for editing "large" documents, which are split via entities.
I.e., if one writes a longer document e.g. a docBOOK, one probably separates all chapters
into single files and "binds" them together via a main.dbk using Entities. However since
oxygen does not let one assign "meta-information" to a file (e.g. via project properties),
oxygen has no clue when one edits the "chapter" files ... :(

One example (file sendmail.dbk):

<?xml version="1.0" encoding="iso-8859-1"?>

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
[
<!ENTITY % links SYSTEM "links.xml">
<!ENTITY % locallinks SYSTEM "locallinks.xml">
<!ENTITY chapter-install SYSTEM "./install.dbk">
<!ENTITY chapter-mailrouting SYSTEM "./mailrouting.dbk">
<!ENTITY chapter-config SYSTEM "./config.dbk">
<!ENTITY chapter-antispam SYSTEM "./antispam.dbk">
%links;
%locallinks;
]
>
<book lang="de" id="sendmail_workshop">
<title>Sendmail in der Praxis</title>
<subtitle>Workshop: Magdeburger Linuxtag 2003</subtitle>
...
&chapter-install;
&chapter-mailrouting;
&chapter-config;
&chapter-antispam;
</book>

and e.g. a chapter file (install.dbk) would look like:

<?xml version="1.0" encoding="iso-8859-1"?>

<chapter id="install">
<title>Sendmail Installation</title>
...
</chapter>

<!--
Local Variables:
mode: xml
sgml-parent-document: ("sendmail.dbk" "book" "chapter")
sgml-indent-step: 2
tab-width: 2
sgml-indent-data: 1
End:
-->


With emacs (psgml mode) editing the chapter file is no problem, since it uses the comment
at the end of the document to find the parent document of the file as well as the root
aka context element for the document, and the "element container" of the current file.
It even allows a 4th argument (has-seen) . For more information see
http://www.xemacs.org/Documentation/pac ... .html#SEC9

It would be really helpful to have a similar feature like the emacs psgml sgml-parent-document variable in oxygen, too.

What do you think ?

Regards,
--
jens.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

Thank you for your message. It is interesting to keep a partial context and use that information when providing editing support for a document. We surely will think of how we can take advantage of this to improve futher versions of oXygen.

In the meanwhile you can use the default DTD/schema to enable the content completion for documents without a DTD/schema specified as the included documents in your case. Also you can use XInclude and that will make your problem disapear as each document is a valid document also by itself. If you need a sample showing how to use oXygen with Docbook and XInclude just write to support@oxygenxml.com - this sample will be also included in the oXygen samples starting with the 4.0 release.

All the best,
George
jens
Posts: 6
Joined: Sat Jan 03, 2004 11:02 am

Post by jens »

Hi,

I've had a look a look at the samples you sent. Hmmm, after hours and downloading
the latest xalan, I got the file processed with the xinclude statements - at least
at the command line (but not with ant :().

Anyway, processing it is magnitudes slower than just using entities. So there are
some reason for not using xincludes:

- java 1.4.x does and probably will not support xincludes
- java 1.5.x will probably support it, but will be released ... (at the end of this year?)
- xinclude processing seems to slow down applications awfully

Those are suffient (at least for me) to say: not usable for production environments

So, the emacs like feature would be really a good thing ...
--
jens.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

It is neither the XSLT engine nor the JDK that should support XInclude but the XML parser. You should use Xerces (2.6+) with any Xalan, Saxon, etc. XSLT engine and any Java 1.2+.

XInclude processing is generally slower as each included document is validated against its DTD and if you used a http reference without an XML Catalog that may cause some noticeable delays. If you change the reference to the DTD to point to a local copy or use an XML Catalog that may speed up the process a lot.

Anyway we will consider adding some context information for an edited file.

Best Regards,
George
jens
Posts: 6
Joined: Sat Jan 03, 2004 11:02 am

Post by jens »

Hi,

is there any advance in external entity support?
--
jens.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

We plan for the next release to add support for a processing instruction that will specify a DTD to be used by the content completion.

Best Regards,
George
Post Reply