2011-11-28

resourceFormat and distributionFormat

Now I'm writing schematron to examine how elements of ISO 19115 is used in
actual WIS Initial MD Set.

Today I had to write following schematron.

<pattern name="fmts-eqv">
<!-- activates only if there is resourceFormat -->
<rule context="gmd:resourceFormat">
<assert test="(*/gmd:name/*/text()
=
/*/gmd:distributionInfo/*/gmd:distributionFormat/*/gmd:name/*/text())
or ('BUFR'
=
/*/gmd:distributionInfo/*/gmd:distributionFormat/*/gmd:name/*/text())
or ('CREX'
=
/*/gmd:distributionInfo/*/gmd:distributionFormat/*/gmd:name/*/text())
">resourceFormat/name and distributionFormat/name <!--
-->must be equal, or the latter be BUFR/CREX</assert>
</rule>
</pattern>

Please tolerate I had to write three similar comparisons since libxml2
doesn't support match() function.

The point is resourceFormat/*/name does not necessarily equal to
distributionFormat/*/name. Surprising, isn't it?

That takes place for TDCF (i.e. BUFR and CREX) messages converted from
alphanumeric data. This is very interesting and (so far) practical
approach. But there's also limitation. I'm curious what to do if TDCF is
directly created at the data source.

No comments :

Post a Comment