Skip to content
Snippets Groups Projects
Commit f91e94c5 authored by David Maus's avatar David Maus
Browse files

Static Repository erstellen

parent 663690c0
No related branches found
No related tags found
No related merge requests found
<xsl:transform version="2.0" <xsl:transform version="2.0"
exclude-result-prefixes="#all"
xpath-default-namespace="http://www.tei-c.org/ns/1.0" xpath-default-namespace="http://www.tei-c.org/ns/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="node() | @*"> <xsl:template match="node() | @*">
...@@ -8,6 +10,14 @@ ...@@ -8,6 +10,14 @@
</xsl:copy> </xsl:copy>
</xsl:template> </xsl:template>
<xsl:template match="TEI">
<xsl:copy>
<xsl:attribute name="xsi:schemaLocation">http://www.tei-c.org/ns/1.0 http://selbstzeugnisse.hab.de/repertorium.xsd</xsl:attribute>
<xsl:apply-templates select="@* except @xsi:*"/>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="@ref[starts-with(., '../../register.xml')]"> <xsl:template match="@ref[starts-with(., '../../register.xml')]">
<xsl:if test="document(.)/idno[@type = 'URI']"> <xsl:if test="document(.)/idno[@type = 'URI']">
<xsl:attribute name="ref" select="document(.)/idno[@type = 'URI']"/> <xsl:attribute name="ref" select="document(.)/idno[@type = 'URI']"/>
......
<xsl:transform version="1.0" <xsl:transform version="2.0"
exclude-result-prefixes="tei" exclude-result-prefixes="#all"
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:tei="http://www.tei-c.org/ns/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="tei:msDesc"> <xsl:template match="tei:msDesc">
<oai_dc:dc> <oai_dc:dc xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<xsl:apply-templates/> <xsl:apply-templates/>
</oai_dc:dc> </oai_dc:dc>
</xsl:template> </xsl:template>
...@@ -90,7 +89,7 @@ ...@@ -90,7 +89,7 @@
<xsl:template match="tei:msItem"> <xsl:template match="tei:msItem">
<dc:type> <dc:type>
<xsl:value-of select="id(substring(@class, 2))/tei:catDesc/tei:term"/> <xsl:value-of select="document(@class)/tei:catDesc/tei:term"/>
</dc:type> </dc:type>
<xsl:apply-templates/> <xsl:apply-templates/>
</xsl:template> </xsl:template>
......
<p:declare-step version="1.0" <p:declare-step version="1.0"
exclude-inline-prefixes="#all"
xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:c="http://www.w3.org/ns/xproc-step"
xmlns:s="http://selbstzeugnisse.hab.de/ns" xmlns:s="http://selbstzeugnisse.hab.de/ns"
xmlns:p="http://www.w3.org/ns/xproc"> xmlns:p="http://www.w3.org/ns/xproc">
<p:serialization method="xml" port="result"/>
<p:import href="library.xpl"/> <p:import href="library.xpl"/>
<p:documentation xmlns="http://www.w3.org/1999/xhtml"> <p:documentation xmlns="http://www.w3.org/1999/xhtml">
...@@ -20,7 +23,7 @@ ...@@ -20,7 +23,7 @@
</p:load> </p:load>
<p:xslt> <p:xslt>
<p:input port="stylesheet"> <p:input port="stylesheet">
<p:document href="oais-resolve.xsl"/> <p:document href="oais-tei.xsl"/>
</p:input> </p:input>
<p:input port="parameters"> <p:input port="parameters">
<p:empty/> <p:empty/>
......
<xsl:transform version="2.0" <xsl:transform version="2.0"
xpath-default-namespace="http://www.tei-c.org/ns/1.0" xpath-default-namespace="http://www.tei-c.org/ns/1.0"
xmlns="http://www.openarchives.org/OAI/2.0/static-repository" xmlns="http://www.openarchives.org/OAI/2.0/static-repository"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai="http://www.openarchives.org/OAI/2.0/" xmlns:oai="http://www.openarchives.org/OAI/2.0/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="oais-tei2dc.xsl"/>
<xsl:template match="/"> <xsl:template match="/">
<Repository xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/static-repository http://www.openarchives.org/OAI/2.0/static-repository.xsd"> <Repository xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/static-repository http://www.openarchives.org/OAI/2.0/static-repository.xsd">
<Identify> <Identify>
...@@ -24,27 +27,42 @@ ...@@ -24,27 +27,42 @@
</oai:metadataFormat> </oai:metadataFormat>
<oai:metadataFormat> <oai:metadataFormat>
<oai:metadataPrefix>tei</oai:metadataPrefix> <oai:metadataPrefix>tei</oai:metadataPrefix>
<oai:schema>http://selbstzeugnisse.hab.de/daten/oai-repertorium.xsd</oai:schema> <oai:schema>http://selbstzeugnisse.hab.de/repertorium.xsd</oai:schema>
<oai:metadataNamespace>http://www.tei-c.org/ns/1.0</oai:metadataNamespace> <oai:metadataNamespace>http://www.tei-c.org/ns/1.0</oai:metadataNamespace>
</oai:metadataFormat> </oai:metadataFormat>
</ListMetadataFormats> </ListMetadataFormats>
<ListRecords metadataPrefix="tei"> <ListRecords metadataPrefix="tei">
<xsl:apply-templates/> <xsl:apply-templates mode="tei"/>
</ListRecords>
<ListRecords metadataPrefix="oai_dc">
<xsl:apply-templates mode="oai_dc"/>
</ListRecords> </ListRecords>
</Repository> </Repository>
</xsl:template> </xsl:template>
<xsl:template match="TEI"> <xsl:template match="TEI" mode="tei">
<oai:record> <oai:record>
<oai:header> <xsl:call-template name="header"/>
<oai:identifier><xsl:value-of select="concat('oai:selbstzeugnisse.hab.de:', @xml:id)"/></oai:identifier>
<oai:datestamp><xsl:value-of select="format-date(current-date(), '[Y]-[M01]-[D01]')"/></oai:datestamp>
</oai:header>
<oai:metadata> <oai:metadata>
<xsl:sequence select="."/> <xsl:sequence select="."/>
</oai:metadata> </oai:metadata>
</oai:record> </oai:record>
</xsl:template> </xsl:template>
<xsl:template match="TEI" mode="oai_dc">
<oai:record>
<xsl:call-template name="header"/>
<oai:metadata>
<xsl:apply-templates select=".//msDesc"/>
</oai:metadata>
</oai:record>
</xsl:template>
<xsl:template name="header">
<oai:header>
<oai:identifier><xsl:value-of select="concat('oai:selbstzeugnisse.hab.de:', tokenize(@xml:id, '\.')[3])"/></oai:identifier>
<oai:datestamp><xsl:value-of select="format-date(current-date(), '[Y]-[M01]-[D01]')"/></oai:datestamp>
</oai:header>
</xsl:template>
</xsl:transform> </xsl:transform>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment