Eliot Kimber | 31 Dec 17:59
Favicon

[Serna] Migrating Custom DITA Templates from 3.4 to 3.5.1

I have custom DITA templates that work with Serna 3.4 but I'm having 
trouble getting them to work with 3.5 (or rather, I'm having trouble 
getting editing of my DITA content to work at all with 3.5, but since 
everything hinges on templates, that's my focus).

My setup is:

- OS X Tiger

- Serna 3.5.1

- catalog-dita_template.xml from my local Open Toolkit directory added 
to the catalog list, set like so:

$SERNA_XML/catalog.xml:$XML_CATALOG_FILES:/Applications/DITA-OT1.3.1/catalog-dita_template.xml

- Within the xml/ directory I have a templates/ directory containing 
templates for my local DITA map and topic shell DTDs. Here is a typical 
such template:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE t:document-template PUBLIC "-//Syntext//DTD Syntext Document 
Template V2.0//EN" "doctemplate.dtd" [
<!ENTITY dita13.common SYSTEM 
"../../plugins/dita/oasis-dita-11-common.ent">]>
<t:document-template 
xmlns:t="http://www.syntext.com/Extensions/DocTemplate-2.0">
   <t:category>RSuite Docs</t:category>
   <t:name>Concept</t:name>

(Continue reading)

Paul Antonov | 2 Jan 15:12
Favicon

Re: [Serna] Migrating Custom DITA Templates from 3.4 to 3.5.1


Eliot,

it seems that Serna does not use proper template, maybe because you are 
trying to use obsolete directory layout. Serna searches for '.sdt' 
(document template) files in two places: in all sub-directories of 
$DATA_DIR/plugins (Serna3_5.app/Contens/plugins on Mac), and in all 
sub-directories of location specified by 'Additional plugins' path in 
Preferences. It is desirable to use paths relative to $TEMPLATE_DIR in 
your .sdt files, because it makes them location-independent.

You can look at any plugins/dita/*.sdt files to get the idea.

If you will still have trouble with your setup, just zip your project it 
and send it to me, and I'll try to fix it for you.

PS. When in doubt, use Document->Document Properties to examine actual
     (resolved) template, catalog, schema and stylesheet paths (and other
      properties).

Regards,

-- Paul

On Mon, 31 Dec 2007, Eliot Kimber wrote:

> I have custom DITA templates that work with Serna 3.4 but I'm having trouble 
> getting them to work with 3.5 (or rather, I'm having trouble getting editing 
> of my DITA content to work at all with 3.5, but since everything hinges on 
> templates, that's my focus).
(Continue reading)

Eliot Kimber | 2 Jan 15:24
Favicon

Re: [Serna] Migrating Custom DITA Templates from 3.4 to 3.5.1

Paul Antonov wrote:
> 
> Eliot,
> 
> it seems that Serna does not use proper template, maybe because you are 
> trying to use obsolete directory layout. Serna searches for '.sdt' 
> (document template) files in two places: in all sub-directories of 
> $DATA_DIR/plugins (Serna3_5.app/Contens/plugins on Mac), and in all 
> sub-directories of location specified by 'Additional plugins' path in 
> Preferences. It is desirable to use paths relative to $TEMPLATE_DIR in 
> your .sdt files, because it makes them location-independent.

I'm not sure I fully understand the implications here. Are you saying 
that all the dependencies for the template (that is, all the components 
of my DTDs) should be stored relative to the templates/ directory?

If so, that's exactly what I'm trying to avoid, having to have multiple 
copies of my local declarations--in the case of DITA stuff, if you've 
got a local install of the Toolkit then you've already had to configure 
it to resolve your local shells and any local specializations you might 
be using--there should be no need to make copies of those for editors 
that can use XML catalogs to resolve the references from shell DTDs to 
their dependencies.

Except for Arbortext Editor (which doesn't support XML catalogs), I 
should, in theory, be able to use a single set of declarations and 
catalogs with all XML editors. That ensures that all DITA-aware tools 
are always using the same exact declarations.

Thanks,
(Continue reading)

Paul Antonov | 2 Jan 16:03
Favicon

Re: [Serna] Migrating Custom DITA Templates from 3.4 to 3.5.1


Eliot,

there are no implications, except that you should place .sdt files in 
locations where they will be found (if you want to keep your project 
outside Serna, use 'Additional plugins' path setting), and that it is a 
best practice to use $TEMPLATE_PATH for building relative paths for files 
which are stored inside your plugin folder. Nothing prevents you to use 
absolute paths and/or $DATA_DIR relative paths, however.

This is also completely orthogonal to catalog support. However, from your 
error message I can guess that Serna uses wrong .sdt file, which in turn 
points to the wrong catalog (template-specific catalogs also have higher 
precedence).

Regards,

-- Paul

On Wed, 2 Jan 2008, Eliot Kimber wrote:

> Paul Antonov wrote:
>> 
>> Eliot,
>> 
>> it seems that Serna does not use proper template, maybe because you are 
>> trying to use obsolete directory layout. Serna searches for '.sdt' 
>> (document template) files in two places: in all sub-directories of 
>> $DATA_DIR/plugins (Serna3_5.app/Contens/plugins on Mac), and in all 
>> sub-directories of location specified by 'Additional plugins' path in 
(Continue reading)

Eliot Kimber | 2 Jan 20:28
Favicon

Re: [Serna] Migrating Custom DITA Templates from 3.4 to 3.5.1

Paul Antonov wrote:
> 
> Eliot,
> 
> there are no implications, except that you should place .sdt files in 
> locations where they will be found (if you want to keep your project 
> outside Serna, use 'Additional plugins' path setting), and that it is a 
> best practice to use $TEMPLATE_PATH for building relative paths for 
> files which are stored inside your plugin folder. Nothing prevents you 
> to use absolute paths and/or $DATA_DIR relative paths, however.

I think the documentation may be out of date. Looking at the entry for 
Document Template Development in the 3.5 Developer's Guide (via the 
online help), there is only this statement about finding templates:

"In order to be visible for Serna, the document templates must reside 
either in directory sernaInstallationPath/xml/templates or in any 
subdirectory of sernaInstallationPath/plugins and have suffix *.sdt."

It doesn't say anything about the the additional plugins path, although 
I do see that in the options.

The "additional plugins" path is very good--just the right way to do it, 
I think.

I removed my templates from the Serna xml/ directory and added their 
base location to the additional plugins path. I verified that my 
templates show up in the File->New... dialog and was able to create a 
new doc with the template with no errors on open.

(Continue reading)

cherdn | 14 Jan 10:58
Favicon

Re: [Serna] Migrating Custom DITA Templates from 3.4 to 3.5.1

Hello Eliot,

> I think the documentation may be out of date. Looking at the entry for 
> Document Template Development in the 3.5 Developer's Guide (via the online 
> help), there is only this statement about finding templates:
>
> "In order to be visible for Serna, the document templates must reside either 
> in directory sernaInstallationPath/xml/templates or in any subdirectory of 
> sernaInstallationPath/plugins and have suffix *.sdt."
>
> It doesn't say anything about the the additional plugins path, although I do 
> see that in the options.
>
> The "additional plugins" path is very good--just the right way to do it, I 
> think.

We've added some information in our Documentation (offline version) about 
Document Template Development. See:

Syntext Serna 3.5 Developer's Guide -> Document Template Development -> 
Introduction to Document Template Development.

In the online there is still an old version of Serna's Documentation. 
It'll be renewed soon.

Thank you.
Regards,
Daria Chernova

>
(Continue reading)


Gmane