Thomas Beale wrote:
Sam Heard wrote:
Hi Peter
I have discussed this at some depth with quite a few people and we do
need something that works easily in Java, C#, Eiffel, Python, Ruby.
The benefit is that a script that is relatively short and a css will
provide a lot of power and local adaptability and be an asset we can
share in all these environments. Accessing a component written in
another language is always difficult (Eiffel from Java, C# from
Eiffel etc) so it makes sense to go down this road. So far we have
gone down the coding route and find we have lots of people doing the
same thing and keeping it all synchronised and upto date is difficult.
well, to be fair, C-based languages talk to each other;
Java doesn't talk to any other compiled language easily,
??? Ummm...that's a surprise seeing how things like our schema checker
calls out to a variety of engines including the MS one. Gee I must be
like a bumblebee.
& then there's SWT etc.etc.etc.
Usually the problem with apps like that is that the designers never
intended for them to be called on by outside processes & that's the case
whether you're writing the outside app in C, Java or Bash.
but nearly everything can call a script, because it is an operating
system call. My take on this from experience would be:*
*
* everything, no matter how trivial you think it will be to start
with, will get much more complex due to people wanting it to do more
* complexity = pain, in a language with weak semantics
* complexity = maintenance
I have in the past written various PERL scripts that quickly became
larger than I originally expected. PERL is powerful, but almost
unreadable (without total discipline and an amazing memory, and
possibly a background in deciphering egyptian hieroglyphics)....in the
end it has always become a maintenance problem, and every time I have
chosen what seems to be an easy option, I have regretted it.
Others will be more involved in this than me, so I won't comment
further, other than to say: think very carefully about maintainability!
XSLT requires design not different from anything else.
Use the unix app mentality i.e. that a given script does one job well &
then have a number of scripts & alles will be in ordnung.
e.g. wrt the publishing mech you have:
D:\Data\Java\workspaces\3.3\PublishArchetypes\PublishOpenEHR\xslt>ls
BranchReport.xslt ProduceReport1.xslt
processADLFileList.xslt
CombineBranchFileLists.xslt Release.xslt processFileList.xslt
CommonReportTemplates.xslt ValidateAndFileList.xslt setTextAsVal.xslt
ProcessArchetypes.xslt Xhtml-reports test
ProcessTemplates.xslt identity.xslt
ProduceReport.xslt
Where each script has a specific job.
e.g. in the above Xhtml-reports folder you then have:
D:\Data\Java\workspaces\3.3\PublishArchetypes\PublishOpenEHR\xslt\Xhtml-reports>
ls
ArtefactList.xslt Dependencies.xslt Errors.xslt TypesFolders.xslt
ChangeHistory.xslt Doc.css Orphans.xslt UsedBy.xslt
CommonTemplates.xslt DraftInRelease.xslt Template.xslt filterErrors.xslt
etc.
Equally my XSLT which turn HL7V3 mif into SVG are organized :
D:\Data\Java\workspaces\3.3\xmlprocess\Applications\MifTVJSF\xslt\svg>ls
ClassElements.xsl MIF2SVGGenerator.xsl TextElements.xsl
CommonTemplates.xsl MIF2SVGProcessor.xsl lineintersect.xslt
CreateSortedMifAttributes.xsl MIFV1Processor.xsl sortedMifClassAtts.xml
MIF2SVG.css MiscElements.xsl
As I have built it in the expectation of Mif version 2 & indeed v2.1
v2.2 etc.
I have a horror of being handed vast XSLT scripts which have been
created in the same way as the earth i.e. through steady accretion.
Adam