Annotation of nsdl/lib/stylesheets/loncapa_to_dcnsdl.xsl, revision 1.1
1.1 ! harris41 1: <?xml version="1.0"?>
! 2: <xsl:stylesheet
! 3: xmlns:loncapa="http://nsdl.lon-capa.org/loncapa/elements/1.1/"
! 4: xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
! 5: xmlns:external="http://nsdl.lon-capa.org/namespace/ExternalFunction/"
! 6: >
! 7: <xsl:template match="/">
! 8: <dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/">
! 9: <xsl:text>
! 10: </xsl:text>
! 11: <!-- xsl:apply-templates select="/*/loncapa:*"/ -->
! 12: <xsl:apply-templates select="/*/loncapa:title"/>
! 13: <xsl:apply-templates select="/*/loncapa:author"/>
! 14: <xsl:apply-templates select="/*/loncapa:owner"/>
! 15: <xsl:apply-templates select="/*/loncapa:subject"/>
! 16: <xsl:apply-templates select="/*/loncapa:abstract"/>
! 17: <xsl:apply-templates select="/*/loncapa:lastrevisiondate"/>
! 18: <xsl:apply-templates select="/*/loncapa:mime"/>
! 19: <xsl:apply-templates select="/*/loncapa:uri"/>
! 20: <xsl:apply-templates select="/*/loncapa:language"/>
! 21: <xsl:apply-templates select="/*/loncapa:copyright"/>
! 22: <dc:relation>[unknown]</dc:relation>
! 23: <xsl:text>
! 24: </xsl:text>
! 25: <dc:source>[unknown]</dc:source>
! 26: <xsl:text>
! 27: </xsl:text>
! 28: <dc:coverage>[unknown]</dc:coverage>
! 29: <xsl:text>
! 30: </xsl:text>
! 31: <xsl:apply-templates select="/*/loncapa:copyright"/>
! 32: </dc:dc>
! 33: <xsl:text>
! 34: </xsl:text>
! 35: </xsl:template>
! 36: <xsl:template match="loncapa:title">
! 37: <dc:title>
! 38: <xsl:choose>
! 39: <xsl:when
! 40: test=
! 41: "function-available('external:loncapa_title_to_dcnsdl_title')"
! 42: >
! 43: <xsl:value-of select="external:loncapa_title_to_dcnsdl_title(.)"/>
! 44: </xsl:when>
! 45: <xsl:otherwise>
! 46: Function external:loncapa_title_to_dcnsdl_title() is not available!
! 47: </xsl:otherwise>
! 48: </xsl:choose>
! 49: </dc:title>
! 50: <xsl:text>
! 51: </xsl:text>
! 52: </xsl:template>
! 53: <xsl:template match="loncapa:author">
! 54: <dc:contributor>
! 55: <xsl:choose>
! 56: <xsl:when
! 57: test=
! 58: "function-available('external:loncapa_author_to_dcnsdl_contributor')"
! 59: >
! 60: <xsl:value-of
! 61: select="external:loncapa_author_to_dcnsdl_contributor(.)"/>
! 62: </xsl:when>
! 63: <xsl:otherwise>
! 64: Function external:loncapa_author_to_dcnsdl_contributor() is not available!
! 65: </xsl:otherwise>
! 66: </xsl:choose>
! 67: </dc:contributor>
! 68: <xsl:text>
! 69: </xsl:text>
! 70: <dc:creator>
! 71: <xsl:choose>
! 72: <xsl:when
! 73: test=
! 74: "function-available('external:loncapa_author_to_dcnsdl_creator')"
! 75: >
! 76: <xsl:value-of
! 77: select="external:loncapa_author_to_dcnsdl_creator(.)"/>
! 78: </xsl:when>
! 79: <xsl:otherwise>
! 80: Function external:loncapa_author_to_dcnsdl_creator() is not available!
! 81: </xsl:otherwise>
! 82: </xsl:choose>
! 83: </dc:creator>
! 84: <xsl:text>
! 85: </xsl:text>
! 86: </xsl:template>
! 87: <xsl:template match="loncapa:owner">
! 88: <dc:publisher>
! 89: <xsl:choose>
! 90: <xsl:when
! 91: test=
! 92: "function-available('external:loncapa_owner_to_dcnsdl_publisher')"
! 93: >
! 94: <xsl:value-of
! 95: select="external:loncapa_owner_to_dcnsdl_publisher(.)"/>
! 96: </xsl:when>
! 97: <xsl:otherwise>
! 98: Function external:loncapa_owner_to_dcnsdl_publisher() is not available!
! 99: </xsl:otherwise>
! 100: </xsl:choose>
! 101: </dc:publisher>
! 102: <xsl:text>
! 103: </xsl:text>
! 104: </xsl:template>
! 105: <xsl:template match="loncapa:subject">
! 106: <dc:subject>
! 107: <xsl:choose>
! 108: <xsl:when
! 109: test=
! 110: "function-available('external:loncapa_subject_to_dcnsdl_subject')"
! 111: >
! 112: <xsl:value-of
! 113: select="external:loncapa_subject_to_dcnsdl_subject(.)"/>
! 114: </xsl:when>
! 115: <xsl:otherwise>
! 116: Function external:loncapa_subject_to_dcnsdl_subject() is not available!
! 117: </xsl:otherwise>
! 118: </xsl:choose>
! 119: </dc:subject>
! 120: <xsl:text>
! 121: </xsl:text>
! 122: </xsl:template>
! 123: <xsl:template match="loncapa:abstract">
! 124: <dc:description>
! 125: <xsl:choose>
! 126: <xsl:when
! 127: test=
! 128: "function-available('external:loncapa_abstract_to_dcnsdl_description')"
! 129: >
! 130: <xsl:value-of
! 131: select="external:loncapa_abstract_to_dcnsdl_description(.)"/>
! 132: </xsl:when>
! 133: <xsl:otherwise>
! 134: Function external:loncapa_abstract_to_dcnsdl_description() is not available!
! 135: </xsl:otherwise>
! 136: </xsl:choose>
! 137: </dc:description>
! 138: <xsl:text>
! 139: </xsl:text>
! 140: </xsl:template>
! 141: <xsl:template match="loncapa:lastrevisiondate">
! 142: <date>
! 143: <xsl:choose>
! 144: <xsl:when
! 145: test=
! 146: "function-available('external:loncapa_lastrevisiondate_to_dcnsdl_date')"
! 147: >
! 148: <xsl:value-of select=
! 149: "external:loncapa_lastrevisiondate_to_dcnsdl_date(.)"/>
! 150: </xsl:when>
! 151: <xsl:otherwise>
! 152: Function external:loncapa_lastrevisiondate_to_dcnsdl_date() is not available!
! 153: </xsl:otherwise>
! 154: </xsl:choose>
! 155: </date>
! 156: <xsl:text>
! 157: </xsl:text>
! 158: </xsl:template>
! 159: <xsl:template match="loncapa:mime">
! 160: <dc:type>
! 161: <xsl:choose>
! 162: <xsl:when
! 163: test=
! 164: "function-available('external:loncapa_mime_to_dcnsdl_type')"
! 165: >
! 166: <xsl:value-of select="external:loncapa_mime_to_dcnsdl_type(.)"/>
! 167: </xsl:when>
! 168: <xsl:otherwise>
! 169: Function external:loncapa_mime_to_dcnsdl_type() is not available!
! 170: </xsl:otherwise>
! 171: </xsl:choose>
! 172: </dc:type>
! 173: <xsl:text>
! 174: </xsl:text>
! 175: <dc:format>
! 176: <xsl:choose>
! 177: <xsl:when
! 178: test=
! 179: "function-available('external:loncapa_mime_to_dcnsdl_format')"
! 180: >
! 181: <xsl:value-of select="external:loncapa_mime_to_dcnsdl_format(.)"/>
! 182: </xsl:when>
! 183: <xsl:otherwise>
! 184: Function external:loncapa_mime_to_dcnsdl_format() is not available!
! 185: </xsl:otherwise>
! 186: </xsl:choose>
! 187: </dc:format>
! 188: <xsl:text>
! 189: </xsl:text>
! 190: </xsl:template>
! 191: <xsl:template match="loncapa:uri">
! 192: <dc:identifier>
! 193: <xsl:choose>
! 194: <xsl:when
! 195: test=
! 196: "function-available('external:loncapa_uri_to_dcnsdl_identifier')"
! 197: >
! 198: <xsl:value-of select=
! 199: "external:loncapa_uri_to_dcnsdl_identifier(.)"/>
! 200: </xsl:when>
! 201: <xsl:otherwise>
! 202: Function external:loncapa_uri_to_dcnsdl_identifier() is not available!
! 203: </xsl:otherwise>
! 204: </xsl:choose>
! 205: </dc:identifier>
! 206: <xsl:text>
! 207: </xsl:text>
! 208: </xsl:template>
! 209: <xsl:template match="loncapa:language">
! 210: <dc:language>
! 211: <xsl:choose>
! 212: <xsl:when
! 213: test=
! 214: "function-available('external:loncapa_language_to_dcnsdl_language')"
! 215: >
! 216: <xsl:value-of select=
! 217: "external:loncapa_language_to_dcnsdl_language(.)"/>
! 218: </xsl:when>
! 219: <xsl:otherwise>
! 220: Function external:loncapa_language_to_dcnsdl_language() is not available!
! 221: </xsl:otherwise>
! 222: </xsl:choose>
! 223: </dc:language>
! 224: <xsl:text>
! 225: </xsl:text>
! 226: </xsl:template>
! 227: <xsl:template match="loncapa:copyright">
! 228: <dc:rights>
! 229: <xsl:choose>
! 230: <xsl:when
! 231: test=
! 232: "function-available('external:loncapa_copyright_to_dcnsdl_rights')"
! 233: >
! 234: <xsl:value-of select=
! 235: "external:loncapa_copyright_to_dcnsdl_rights(.)"/>
! 236: </xsl:when>
! 237: <xsl:otherwise>
! 238: Function external:loncapa_copyright_to_dcnsdl_rights() is not available!
! 239: </xsl:otherwise>
! 240: </xsl:choose>
! 241: </dc:rights>
! 242: <xsl:text>
! 243: </xsl:text>
! 244: </xsl:template>
! 245: </xsl:stylesheet>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>