Hello,
I'm trying to distribute XMLmind (XMLmind Standard Edition code, v2
Patch1), personal XXE configurations and additional, usage-specific addon
DTDs, CSSs & template documents at different locations, simulating a future
user setup for our main department.
Unfortunately this setup doesn't work for me though I did my best to follow
the directions given in the Power Users Guide.
I'm working under a Windows system with the newest JDK 1.4.1_01 installed.
For this tests I generally had XMLmind's "Enable cache" flag set to OFF.
In the template XML documents im using PublicIds, so one of them looks
something like:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hi-level-design PUBLIC "-//JK//DTD Hi-Level-Design//EN"
"http://dlmtest:4711/webdav/Xml4Doc/dtd/hld-doc.dtd">
<hi-level-design id="">
<title>Hi level design of component XXX</title>
<metadata>Some metadata </metadata>
<abstract>
<p>Here goes the abstract</p>
</abstract>
</hi-level-design>
The intended distributed setup should sketch like following:
Have plain vanilla XMLmind Standard Edition V2Patch1 installed in its
own directory.
Something like "DriveLetter:\XMLmind_V2R1p1"
Publish our location-specific DTDs, template XML-documents and
XMLmind-specific CSSs on a Tomcat webserver
E.g.
.....
/webapps
/webdav <--- root of managed
directories
/Xml4Doc
/template <--- template XML documents go here
/css <--- CSS
stylesheets, not only XMLmind specific ones, go here
/dtd <--- DTDs,
entities and modules they use go here
Make a copy of the directory structure on the webserver beginning at
directory "Xml4Doc", onto a local drive thus copying DTDs, CSSs and
template files,
e.g. to: F:\UserPools\JK_Common\XML-Resources.
Add a catalog file "catalog.xml" to the XML-Resources directory where
the copies from the webserver have been placed.
The catalog is looking something like
<?xml version="1.0" ?>
<!DOCTYPE catalog
PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
prefer="public">
<group id="JKs">
<system publicId="-//JK//DTD Hi-Level-Design//EN"
uri
="file:///F:/UserPools/JK_Common/XML-Resources/DTD/hld-doc.dtd"
/>
<uri name="http://dlmtest:4711/webdav/Xml4Doc/"
uri="file:///F:/UserPools/JK_Common/XML-Resources/"
/>
</group>
<group id="Dita">
<public publicId="-//IBM//DTD DITA Concept//EN"
uri
="file:///F:/UserPools/JK_Common/XML-Resources/DTD/concept.dtd"/>
..........
</group>
</catalog>
The catalog should be used by XMLmind and other catalog aware XML
tools to resolve PublicIds, other entities to the local copies and
redirect other URIs (like a explicit CSS stylesheet specification) to
local resources.
XMLmind might not recognize the <group> and <uri> elements, but it
should not fail due to their presence, because they are defined in
the XML-catalog specification
Create a directory on the local filesystem containing personal XXE
configurations.
e.g. F:\UserPools\JK_Common\XMLmind_AddOn_Configs
In this directory there are several subdirectories holding XXE
configurations an a configuration list file
"AddOn_Configs.list" listing all contained XXE configurations.
Having a "Dita" subdirectory, a excerpt of the
"AddOn_Configes.list" file might look like:
Dita/ditabase.xxe
Dita/reference.xxe
Dita/task.xxe
Dita/topic.xxe
Dita/hld-doc.xxe
And an excerpt of a specific, personal XXE configuration file
looks something like
<?xml version='1.0' encoding='UTF-8'?>
<cfg:configuration name="HiLevel Design"
xsi:schemaLocation
="http://www.xmlmind.com/xmleditor/schema/configuration
../configuration/xsd/configuration.xsd"
xmlns:xsi
="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:cfg
="http://www.xmlmind.com/xmleditor/schema/configuration">
<cfg:detect>
<cfg:and>
<cfg:dtdPublicId substring
="true">Hi-Level-Design</cfg:dtdPublicId>
<cfg:rootElementNamespace xsi:nil
="true"></cfg:rootElementNamespace>
<cfg:rootElementLocalName>hi-level-design</cfg:rootElementLocalName>
</cfg:and>
</cfg:detect>
<cfg:dtd systemId
="http://dlmtest:4711/webdav/Xml4Doc/dtd/hld-doc.dtd"
publicId="-//JK//DTD Hi-Level-Design//EN" />
<cfg:css name="Hi Level Design style" location
="file:///F:/UserPools/JK_Common/XML-Resources/css/hld-doc.css"
/>
<cfg:template name="Hi Level Design document" location
="file:///F:/UserPools/JK_Common/XML-Resources/template/hld-doc.xml"
/>
<cfg:saveOptions encoding="UTF-8" />
</cfg:configuration>
Now, in order for this setup to work, two additional actions have to be
taken:
add another catalog entry for file "F:
\UserPools\JK_Common\XML-Resources\catalog.xml" in the "DTD catalogs"
pane in the "Open" tab of the "options" panel.
start a command prompt, set environment variable XXE_CONFIG like "set
xxe_conf...@file:///
F:/UserPools/JK_Common/XMLmind_AddOn_Configs/AddOn_Configs.list;+"
and start XMLmind in the command prompt window from the Batch file.
What happens:
XMLmind is starting ok. Opening a new file with "Menubar/File/New", I
see my personal specific document templates in addition to the ones
coming with XMLmind. This means, the distributed configuration setup
works in principle.
As long as the webserver "dlmtest" runs, opening a new "Hi level
design document" by using the template, works ok, though it takes a
considerable time to open the template.
From the messages in the status line you can see that XMLmind is
loading the template XML document from the local file resource though
it could be doing it from the webserver:
Loading document
"file:/F:/UserPools/JK_Common/XML-Resources/template/hld-doc.xml"
The other messages showing up are flipping by so quickly that I was
unable to read or even capture one of them (a message file .... the
messages issued during a XMLmind session would be a great thing in
this case)
Finally I get a styled display of the template document using my
specific CSS stylesheet, the one I specified int the .XXE
configuration file.
This means that the catalog resolution seems to work ok:
When the webserver is not operating, thus simulating offline working
mode, I'm getting the same "Loading document....." message in the
status line. But then a error panel pops up, saying:
'Cannot open file
"file:/F:/UserPools/JK_Common/XML-Resources/template/hld-doc.xml"
Connection refused: connect'
It looks to me as if there is some problem with loading the CSS style
sheet, specified in the .XXE config file with a file-uri pointing to some
general location in the filesystem.
I also tried a traditional setup, using additional directories under
XMLmind's own configuration directory using the same DTDs and CSSs and
appropriately adapted XXE config files. With this setup there is no
problem at all. Opening a new XML document with one of my personal
templates is much much speedier than with the distributed setup.
I'd very much appreciate a response telling me that the intended setup is a
valid one and perhaps pointing me to some fine grain detail that I
overlooked. And if everything is ok conceptually, perhaps it turns out to
be a bug.
Kind regards
Jo Kuhm