|
From: Artur H. <ko...@pl...> - 2003-06-23 13:07:43
|
> Simple string replacement should be sufficient. I don't think we need worry
> about looping.
> Keeping it simple will make the project more usable by others.
Yes, ok, when I talked about loops I was thinking about accessing
multiple elements for example, lets assume we have custom project which
has part of configuration as follows:
<project>
<name>
<unix>generguide</unix>
<short>Generic Guides</short>
<full>Generic Software Developers' Guide</full>
</name>
<site href="http://generguide.sourceforge.net/">Home Site</site>
<site href=http://sourceforge.net/projects/generguide/>Project Management Site</site>
<developers>
<developer>
<name>Cameron Shorter</name>
<role>Manager</role>
<email>ca...@us...</email>
</developer>
<developer>
<name>Artur Hefczyc</name>
<role>Developer</role>
<email>ko...@us...</email>
</developer>
<developer>
<name>Neo</name>
<role>Developer</name>
<email>ne...@us...</email>
</developer>
</developers>
</project>
We can refer easily to each type of project name. Both methods can
be used as well: xinclude with xpointer or simple translation from
entity to character string value.
However use of 'site' configuration is not yet that easy. But probably
possible to accomplish with both methods or at last we can simplify
config file definition without lost functionality.
And than if we want to put list of developers in project document
we have to indicate in generic document where it should be
placed.
We can not accomplish it with <xinclude> tag + xpointer or
something like that because we don't want to have tags from config
file in our document and the more there is no way access multiple elements
from config file. Simple entity use can't help here as well.
If we simplify config file format for defining list of developers we will
lost some functionality.
To solve problem of such case I have following idea:
In generic document we will put entity &developers-list; for example.
Config file can contain developers definition as above.
Config processing tool will extract all elements from config file and create
entities definition with following values:
project-unix-name="generguide"
project-short-name="Generic Guides"
project-full-name="Generic Software Developers' Guide"
project-sites-list=file:/path/to/sites-file.xml
project-developers=file:/path/to/developers-file.xml
and also generate 2 XML files, one for project sites list and second for
sdcobook table containing list of developers.
So we don't lost
1. Simplicity for including project custom data
2. Flexibility for customizing project
> I still think we can use replacement of generic sections with project specific
> sections as well.
This is the main reason to avoid cross-referencing documents.
But if you find it necessary there is something called "olinks". I don't know
exactly how to use it but I have seen some documents on the Internet
explaining it. So you can assign me a task to learn how to do it.
Artur
--
Artur Hefczyc
Open Source Developer
http://www.geotools.org/
http://wttools.sourceforge.net/
|