Changeset 5234
- Timestamp:
- 05/19/14 15:41:49 (10 years ago)
- Location:
- CMDI-Interoperability/CMD2RDF/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
CMDI-Interoperability/CMD2RDF/trunk/build-dist.props
r5214 r5234 16 16 # cache.dir=${basedir.cmd2rdf}/cmd-profiles 17 17 18 # the file path (base-uri() is used as xml:base and main subject of the RDF 19 # it should have a nice URI and not some local-file name 20 # thus we want to translate the base-uri: 21 # part of the base-uri to be replaced (it has to be exactly in the format as the XSLT-transformer sees it) 22 #base.strip=${in.dir} 23 24 # prefix to be added instead of the stripped part 25 #base.add=http://www.clarin.eu/cmd/ 26 18 27 # where to write the converted data 19 28 #out.dir=data/cmd-rdf -
CMDI-Interoperability/CMD2RDF/trunk/build.xml
r5217 r5234 23 23 <property name="cache.dir" location="${basedir.cmd2rdf}/cmd-profiles" /> 24 24 25 <property name="base.strip" location="${in.dir}" /> 26 <property name="base.add" value="http://www.clarin.eu/cmd/" /> 27 25 28 <property name="out.dir" value="data/cmd-rdf" /> 26 29 <property name="smc.base" value="../../../SMC/" /> … … 44 47 45 48 <saxon-xslt style="xsl/CMDRecord2RDFcache.xsl" 46 basedir="${in.dir}" includes="**/ *.xml" destdir="${out.dir}" extension=".rdf"49 basedir="${in.dir}" includes="**/oai_meertens_knaw_nl_http___hdl_handle_net_10744_mi_022000e4_0cc1_4699_849c_4b41a01d4f01.xml" destdir="${out.dir}" extension=".rdf" 47 50 force="true" > 51 <param name="base_strip" expression="${base.strip}"/> 52 <param name="base_add" expression="${base.add}"/> 48 53 <param name="cache_dir" expression="${cache.dir}"/> 49 54 <!-- <param name="cache" expression="refresh"/>--> -
CMDI-Interoperability/CMD2RDF/trunk/xsl/CMDRecord2RDF.xsl
r4830 r5234 22 22 <xsl:output method="xml" encoding="UTF-8"/> 23 23 24 <xsl:param name="base" select="base-uri()"/> 24 <!-- allow to rewrite the urls --> 25 <xsl:param name="base_strip" select="base-uri()"/> 26 <xsl:param name="base_add" select="''"/> 27 28 <xsl:variable name="about" select="replace(if ($base_strip=base-uri()) then base-uri() else replace(base-uri(), $base_strip, $base_add),'([./])(xml|cmdi)$','$1rdf')"/> 25 29 26 30 <xsl:include href="CMD2RDF.xsl"/> … … 30 34 <!-- let's create some RDF --> 31 35 <xsl:template match="/cmd:CMD"> 32 <rdf:RDF xml:base="{ replace($base,'([./])(xml|cmdi)$','$1rdf')}">36 <rdf:RDF xml:base="{$about}"> 33 37 <!-- The CMDI is seen as OA Annotation of a (set of) resource(s) --> 34 <oa:Annotation rdf:about="{$ base}">38 <oa:Annotation rdf:about="{$about}"> 35 39 <xsl:apply-templates select="cmd:Resources" mode="resources"/> 36 40 <oa:hasBody> … … 43 47 <!-- The CMDI is an ORE ResourceMap to other metadata descriptions --> 44 48 <xsl:if test="exists(cmd:Resources/ResourceProxyList/ResourceProxy[ResourceType='Metadata'])"> 45 <ore:ResourceMap rdf:about="{$ base}">49 <ore:ResourceMap rdf:about="{$about}"> 46 50 <ore:describes> 47 51 <ore:Aggregation>
Note: See TracChangeset
for help on using the changeset viewer.