[GeoNetwork-devel] Generate schematron's XSL using ant instead of sh

Hi all, for the time being we are using a shell script to generate the
XSL used for schematron reporting. I would prefer to generate and copy
those 2 files using ant when building geonetwork in the
xml/schemas/iso19139 directory (see patch attached). Then we could also
remove temporary XSL.

Does this sounds good to you ?

Ciao.
Francois

(attachments)

build.xml.patch (1.48 KB)

Francois-Xavier Prunayre wrote:

Hi all, for the time being we are using a shell script to generate the
XSL used for schematron reporting. I would prefer to generate and copy
those 2 files using ant when building geonetwork in the
xml/schemas/iso19139 directory (see patch attached). Then we could also
remove temporary XSL.

Does this sounds good to you ?

Ciao.
Francois

Hi Francois,

Sounds good to me! The shell script was only ever to show people who wanted to modify the rules how to regenerate the report xslts - I think you are considering this approach to support language packs? We could also use it for national profile packs too.

Can we use the existing xalan.jar (instead of adding in saxon) to do the transformation? I think I only used saxon in that script because I was experimenting with it and needed it for other conversion xslts (its still used in the BlueNet MEST sandbox for that reason).

Cheers,
Simon

Hi Simon,

On lun, 2008-10-06 at 21:38 +1100, Simon Pigot wrote:

you are considering this approach to support language packs?

Yes it does. Alert message are identified in .sch files and translated
in loc/en/schematron.xml then.

We could
also use it for national profile packs too.

Do you think for profil we could have only a schematron file which
contains only rules for the profil and then run the main iso19139
schematron.xsl and include profil specific rules if a profil var is
defined ? Something like <xsl:include
href="../iso19139.mcp/schematron.mcp.xsl"/>.

Can we use the existing xalan.jar (instead of adding in saxon) to do the
transformation?

Yep using :
<java jar="web/geonetwork/WEB-INF/lib/xalan.jar"
    fork="true"
    failonerror="true"
    dir="${schematronDir}"
    maxmemory="128m"
    >
    <arg line="-IN allSchtrnRules.sch -OUT
${schemaDir}/schematron_xml.xsl -XSL
schematron-report-geonetwork-xml.xsl"/>
it works fine.

Do you think we should move the schematrons directory to the
xml/schemas/iso19139 as it applied only to iso19139 ? and clean unused
file (eg. READMEprocessrules.sh) and file generated (eg.
schematron_xml.xsl) ?

Ciao.

Francois