Moa-bibclass.xsl
From DLXS Documentation
Main Page > Mounting Collections: Class-specific Steps > Mounting a Bib Class Collection > Preparing BibClass Data > moa-bibclass.xsl
<?xml version="1.0" encoding="UTF-8"?> <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8"/> <!--This assumes that the records are each called HEADER, and that they are wrapped in a root element called COLL--> <xsl:template match="COLL"> <BIBDB> <GROUP> <xsl:apply-templates/> </GROUP> </BIBDB> </xsl:template> <xsl:template match="HEADER"> <xsl:element name="A"> <xsl:attribute name="ID"><xsl:apply-templates select="FILEDESC/PUBLICATIONSTMT/IDNO[@TYPE='dlps']"/></xsl:attribute> <xsl:attribute name="DT">2007-07-03</xsl:attribute> <B> <xsl:apply-templates select="FILEDESC/SOURCEDESC/BIBLFULL/TITLESTMT/TITLE[@TYPE=245]"/> <xsl:apply-templates select="FILEDESC/SOURCEDESC/BIBLFULL/TITLESTMT/AUTHOR"/> </B> <xsl:apply-templates select="FILEDESC/SOURCEDESC/BIBLFULL/EXTENT"/> <E> <xsl:apply-templates select="FILEDESC/SOURCEDESC/BIBLFULL/PUBLICATIONSTMT/PUBPLACE"/> <xsl:apply-templates select="FILEDESC/SOURCEDESC/BIBLFULL/PUBLICATIONSTMT/PUBLISHER"/> <xsl:apply-templates select="FILEDESC/SOURCEDESC/BIBLFULL/PUBLICATIONSTMT/DATE"/> <xsl:for-each select="FILEDESC/PUBLICATIONSTMT/IDNO"> <W> <xsl:attribute name="A"><xsl:value-of select="@TYPE"/></xsl:attribute> <xsl:apply-templates/> </W> </xsl:for-each> <X> <xsl:apply-templates select="FILEDESC/PUBLICATIONSTMT/AVAILABILITY"/> </X> </E> <SG> <xsl:apply-templates select="PROFILEDESC/TEXTCLASS/KEYWORDS/TERM"/> </SG> <G> <xsl:apply-templates select="FILEDESC/SOURCEDESC/BIBLFULL/NOTESSTMT/NOTE"/> </G> <J><URL>http://www.hti.umich.edu/cgi/t/text/text-idx?c=moa;idno=<xsl:apply-templates select="FILEDESC/PUBLICATIONSTMT/IDNO[@TYPE='dlps']"/></URL> <COLLS><COLL>moa</COLL></COLLS></J><FMT>xml</FMT><LANG>ENG</LANG><TYPE>text</TYPE> <xsl:apply-templates/> </xsl:element> </xsl:template> <xsl:template match="IDNO"> <xsl:apply-templates/> </xsl:template> <xsl:template match="FILEDESC/SOURCEDESC/BIBLFULL/TITLESTMT/TITLE[@TYPE=245]"> <K> <xsl:apply-templates/> </K> </xsl:template> <xsl:template match="FILEDESC/SOURCEDESC/BIBLFULL/TITLESTMT/AUTHOR"> <L> <xsl:apply-templates/> </L> </xsl:template> <xsl:template match="FILEDESC/SOURCEDESC/BIBLFULL/EXTENT"> <D> <xsl:apply-templates/> </D> </xsl:template> <xsl:template match="FILEDESC/SOURCEDESC/BIBLFULL/PUBLICATIONSTMT/PUBPLACE"> <U> <xsl:apply-templates/> </U> </xsl:template> <xsl:template match="FILEDESC/SOURCEDESC/BIBLFULL/PUBLICATIONSTMT/PUBLISHER"> <T> <xsl:apply-templates/> </T> </xsl:template> <xsl:template match="FILEDESC/SOURCEDESC/BIBLFULL/PUBLICATIONSTMT/DATE"> <YR> <xsl:apply-templates/> </YR> </xsl:template> <xsl:template match="//AVAILABILITY/P"> <xsl:apply-templates/> </xsl:template> <xsl:template match="FILEDESC/SOURCEDESC/BIBLFULL/NOTESSTMT/NOTE"> <AA> <xsl:apply-templates/> </AA> </xsl:template> <xsl:template match="//TERM"> <SU><xsl:apply-templates/></SU> </xsl:template> <xsl:template match="FILEDESC"/> <xsl:template match="ENCODINGDESC"/> <xsl:template match="PROFILEDESC"/> </xsl:transform>