Annotation of nsdl/lib/stylesheets/lomnsdl_to_loncapa.xsl, revision 1.1
1.1 ! harris41 1: <?xml version="1.0"?>
! 2: <xsl:stylesheet
! 3: xmlns:lom="http://nsdl.lon-capa.org/lom/elements/6.4/"
! 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: <loncapa:loncapa
! 9: xmlns:loncapa="http://nsdl.lon-capa.org/loncapa/elements/1.1/">
! 10: <xsl:text>
! 11: </xsl:text>
! 12: <xsl:apply-templates select="/*/lom:General/lom:Identifier"/>
! 13: <xsl:apply-templates select="/*/lom:General/lom:Title"/>
! 14: <xsl:apply-templates select="/*/lom:General/lom:Language"/>
! 15: <xsl:apply-templates select="/*/lom:General/lom:Description"/>
! 16: <xsl:apply-templates select="/*/lom:General/lom:Keyword"/>
! 17: <xsl:apply-templates select="/*/lom:LifeCycle/lom:Contribute"/>
! 18: <xsl:apply-templates select="/*/lom:Technical/lom:Format"/>
! 19: <xsl:apply-templates select="/*/lom:Technical/lom:Size"/>
! 20: <xsl:apply-templates select="/*/lom:Educational/lom:Description"/>
! 21: <xsl:apply-templates select="/*/lom:Rights/lom:CopyrightandOtherRestrictions"/>
! 22: <xsl:apply-templates select="/*/lom:Rights/lom:Description"/>
! 23: </loncapa:loncapa>
! 24: </xsl:template>
! 25: <xsl:template match="lom:General/lom:Identifier">
! 26: <uri>http://nsdl.lon-capa.org/gateres/<xsl:value-of select="lom:Catalog"/>/<xsl:value-of select="lom:Entry"/>
! 27: </uri>
! 28: <xsl:text>
! 29: </xsl:text>
! 30: </xsl:template>
! 31: <xsl:template match="lom:General/lom:Title">
! 32: <title>
! 33: <xsl:choose>
! 34: <xsl:when
! 35: test="function-available('external:lomnsdl_GeneralTitle_to_loncapa_title')"
! 36: >
! 37: <xsl:value-of select=
! 38: "external:lomnsdl_GeneralTitle_to_loncapa_title(.)"/>
! 39: </xsl:when>
! 40: <xsl:otherwise>
! 41: Function external:lomnsdl_GeneralTitle_to_loncapa_title() is not available!
! 42: </xsl:otherwise>
! 43: </xsl:choose>
! 44: </title>
! 45: <xsl:text>
! 46: </xsl:text>
! 47: </xsl:template>
! 48: <xsl:template match="lom:General/lom:Language">
! 49: <language>
! 50: <xsl:choose>
! 51: <xsl:when
! 52: test=
! 53: "function-available('external:lomnsdl_GeneralLanguage_to_loncapa_language')"
! 54: >
! 55: <xsl:value-of select=
! 56: "external:lomnsdl_GeneralLanguage_to_loncapa_language(.)"/>
! 57: </xsl:when>
! 58: <xsl:otherwise>
! 59: Function external:lomnsdl_GeneralLanguage_to_loncapa_language() is not
! 60: available!
! 61: </xsl:otherwise>
! 62: </xsl:choose>
! 63: </language>
! 64: <xsl:text>
! 65: </xsl:text>
! 66: </xsl:template>
! 67: <xsl:template match="lom:General/lom:Keyword">
! 68: <keywords>
! 69: <xsl:choose>
! 70: <xsl:when
! 71: test=
! 72: "function-available('external:lomnsdl_GeneralKeyword_to_loncapa_keywords')"
! 73: >
! 74: <xsl:value-of select=
! 75: "external:lomnsdl_GeneralKeyword_to_loncapa_keywords(.)"/>
! 76: </xsl:when>
! 77: <xsl:otherwise>
! 78: Function external:lomnsdl_GeneralKeyword_to_loncapa_keywords() is not
! 79: available!
! 80: </xsl:otherwise>
! 81: </xsl:choose>
! 82: </keywords>
! 83: <xsl:text>
! 84: </xsl:text>
! 85: </xsl:template>
! 86: <xsl:template match="lom:LifeCycle/lom:Contribute">
! 87: <xsl:choose>
! 88: <xsl:when
! 89: test="function-available('external:lomnsdl_LifeCycleContribute_prepare_converter_INFO')"
! 90: >
! 91: <xsl:value-of select=
! 92: "external:lomnsdl_LifeCycleContribute_prepare_converter_INFO(.)"/>
! 93: </xsl:when>
! 94: <xsl:otherwise>
! 95: Function external:lomnsdl_LifeCycleContribute_prepare_converter_INFO()
! 96: is not available!
! 97: </xsl:otherwise>
! 98: </xsl:choose>
! 99: <xsl:apply-templates select="/*/lom:LifeCycle/lom:Contribute/lom:Role"/>
! 100: <xsl:apply-templates select="/*/lom:LifeCycle/lom:Contribute/lom:Entity"/>
! 101: <xsl:apply-templates select="/*/lom:LifeCycle/lom:Contribute/lom:Date"/>
! 102: <xsl:choose>
! 103: <xsl:when
! 104: test="function-available('external:converter_INFO_to_loncapa_lastrevisiondate')"
! 105: >
! 106: <xsl:value-of select=
! 107: "external:converter_INFO_to_loncapa_lastrevisiondate(.)"/>
! 108: </xsl:when>
! 109: <xsl:otherwise>
! 110: Function external:converter_INFO_to_loncapa_lastrevisiondate()
! 111: is not available!
! 112: </xsl:otherwise>
! 113: </xsl:choose>
! 114: <xsl:choose>
! 115: <xsl:when
! 116: test="function-available('external:converter_INFO_to_loncapa_creationdate')"
! 117: >
! 118: <xsl:value-of select=
! 119: "external:converter_INFO_to_loncapa_creationdate(.)"/>
! 120: </xsl:when>
! 121: <xsl:otherwise>
! 122: Function external:converter_INFO_to_loncapa_creationdate()
! 123: is not available!
! 124: </xsl:otherwise>
! 125: </xsl:choose>
! 126: <xsl:choose>
! 127: <xsl:when
! 128: test="function-available('external:converter_INFO_to_loncapa_author')"
! 129: >
! 130: <xsl:value-of select=
! 131: "external:converter_INFO_to_loncapa_author(.)"/>
! 132: </xsl:when>
! 133: <xsl:otherwise>
! 134: Function external:converter_INFO_to_loncapa_author()
! 135: is not available!
! 136: </xsl:otherwise>
! 137: </xsl:choose>
! 138: <xsl:choose>
! 139: <xsl:when
! 140: test="function-available('external:converter_INFO_to_loncapa_owner')"
! 141: >
! 142: <xsl:value-of select=
! 143: "external:converter_INFO_to_loncapa_owner(.)"/>
! 144: </xsl:when>
! 145: <xsl:otherwise>
! 146: Function external:converter_INFO_to_loncapa_owner()
! 147: is not available!
! 148: </xsl:otherwise>
! 149: </xsl:choose>
! 150: </xsl:template>
! 151: <xsl:template match="lom:LifeCycle/lom:Contribute/lom:Role">
! 152: <xsl:choose>
! 153: <xsl:when
! 154: test="function-available('external:lomnsdl_LifeCycleContributeRole_to_converter_INFO')"
! 155: >
! 156: <xsl:value-of select=
! 157: "external:lomnsdl_LifeCycleContributeRole_to_converter_INFO(.)"/>
! 158: </xsl:when>
! 159: <xsl:otherwise>
! 160: Function external:lomnsdl_LifeCycleContributeRole_to_converter_INFO() is not
! 161: available!
! 162: </xsl:otherwise>
! 163: </xsl:choose>
! 164: </xsl:template>
! 165: <xsl:template match="lom:LifeCycle/lom:Contribute/lom:Entry">
! 166: <xsl:choose>
! 167: <xsl:when
! 168: test="function-available('external:lomnsdl_LifeCycleContributeEntry_to_converter_INFO')"
! 169: >
! 170: <xsl:value-of select=
! 171: "external:lomnsdl_LifeCycleContributeEntry_to_converter_INFO(.)"/>
! 172: </xsl:when>
! 173: <xsl:otherwise>
! 174: Function external:lomnsdl_LifeCycleContributeEntry_to_converter_INFO() is not
! 175: available!
! 176: </xsl:otherwise>
! 177: </xsl:choose>
! 178: </xsl:template>
! 179: <xsl:template match="lom:LifeCycle/lom:Contribute/lom:Date">
! 180: <xsl:choose>
! 181: <xsl:when
! 182: test="function-available('external:lomnsdl_LifeCycleContributeDate_to_converter_INFO')"
! 183: >
! 184: <xsl:value-of select=
! 185: "external:lomnsdl_LifeCycleContributeDate_to_converter_INFO(.)"/>
! 186: </xsl:when>
! 187: <xsl:otherwise>
! 188: Function external:lomnsdl_LifeCycleContributeDate_to_converter_INFO() is not
! 189: available!
! 190: </xsl:otherwise>
! 191: </xsl:choose>
! 192: </xsl:template>
! 193: <xsl:template match="lom:Technical/lom:Format">
! 194: <mime>
! 195: <xsl:choose>
! 196: <xsl:when
! 197: test="function-available('external:lomnsdl_TechnicalFormat_to_loncapa_mime')"
! 198: >
! 199: <xsl:value-of select=
! 200: "external:lomnsdl_TechnicalFormat_to_loncapa_mime(.)"/>
! 201: </xsl:when>
! 202: <xsl:otherwise>
! 203: Function external:lomnsdl_TechnicalFormat_to_loncapa_mime() is not available!
! 204: </xsl:otherwise>
! 205: </xsl:choose>
! 206: </mime>
! 207: <xsl:text>
! 208: </xsl:text>
! 209: </xsl:template>
! 210: <xsl:template match="lom:Technical/lom:Size">
! 211: <bytesize>
! 212: <xsl:choose>
! 213: <xsl:when
! 214: test="function-available('external:lomnsdl_TechnicalSize_to_loncapa_bytesize')"
! 215: >
! 216: <xsl:value-of select=
! 217: "external:lomnsdl_TechnicalSize_to_loncapa_bytesize(.)"/>
! 218: </xsl:when>
! 219: <xsl:otherwise>
! 220: Function external:lomnsdl_TechnicalSize_to_loncapa_bytesize() is not available!
! 221: </xsl:otherwise>
! 222: </xsl:choose>
! 223: </bytesize>
! 224: <xsl:text>
! 225: </xsl:text>
! 226: </xsl:template>
! 227: <xsl:template match="lom:Educational/lom:Description">
! 228: <notes>
! 229: <xsl:choose>
! 230: <xsl:when
! 231: test="function-available('external:lomnsdl_EducationalDescription_to_loncapa_notes')"
! 232: >
! 233: <xsl:value-of select=
! 234: "external:lomnsdl_EducationalDescription_to_loncapa_notes(.)"/>
! 235: </xsl:when>
! 236: <xsl:otherwise>
! 237: Function external:lomnsdl_EducationalDescription_to_loncapa_notes() is not
! 238: available!
! 239: </xsl:otherwise>
! 240: </xsl:choose>
! 241: </notes>
! 242: <xsl:text>
! 243: </xsl:text>
! 244: </xsl:template>
! 245: <xsl:template match="lom:Rights">
! 246: <xsl:choose>
! 247: <xsl:when
! 248: test="function-available('external:lomnsdl_Rights_prepare_converter_INFO')"
! 249: >
! 250: <xsl:value-of select=
! 251: "external:lomnsdl_Rights_prepare_converter_INFO(.)"/>
! 252: </xsl:when>
! 253: <xsl:otherwise>
! 254: Function external:lomnsdl_Rights_prepare_converter_INFO() is not available!
! 255: </xsl:otherwise>
! 256: </xsl:choose>
! 257: <xsl:apply-templates select="/*/lom:Rights/lom:CopyrightandOtherRestrictions"/>
! 258: <xsl:apply-templates select="/*/lom:Rights/lom:Description"/>
! 259: <xsl:choose>
! 260: <xsl:when
! 261: test=
! 262: "function-available('external:converter_INFO_to_loncapa_copyright')"
! 263: >
! 264: <xsl:value-of select=
! 265: "external:converter_INFO_to_loncapa_copyright(.)"/>
! 266: </xsl:when>
! 267: <xsl:otherwise>
! 268: Function external:converter_INFO_to_loncapa_copyright() is not available!
! 269: </xsl:otherwise>
! 270: </xsl:choose>
! 271: </xsl:template>
! 272: <xsl:template match="lom:Rights/lom:CopyrightandOtherRestrictions">
! 273: <xsl:choose>
! 274: <xsl:when
! 275: test="function-available('external:lomnsdl_RightsCopyrightandOtherRestrictions_to_converter_INFO')"
! 276: >
! 277: <xsl:value-of select=
! 278: "external:lomnsdl_RightsCopyrightandOtherRestrictions_to_converter_INFO(.)"/>
! 279: </xsl:when>
! 280: <xsl:otherwise>
! 281: Function
! 282: external:lomnsdl_RightsCopyrightandOtherRestrictions_to_converter_INFO()
! 283: is not available!
! 284: </xsl:otherwise>
! 285: </xsl:choose>
! 286: </xsl:template>
! 287: <xsl:template match="lom:Rights/lom:Description">
! 288: <xsl:choose>
! 289: <xsl:when
! 290: test="function-available('external:lomnsdl_RightsDescription_to_converter_INFO')"
! 291: >
! 292: <xsl:value-of select=
! 293: "external:lomnsdl_RightsDescription_to_converter_INFO(.)"/>
! 294: </xsl:when>
! 295: <xsl:otherwise>
! 296: Function external:lomnsdl_RightsDescription_to_converter_INFO() is not
! 297: available!
! 298: </xsl:otherwise>
! 299: </xsl:choose>
! 300: </xsl:template>
! 301: </xsl:stylesheet>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>