Changeset 973


Ignore:
Timestamp:
12/09/10 12:19:39 (13 years ago)
Author:
dietuyt
Message:

Addition of a mimetype attribute to <ResourceType?>

Location:
metadata/trunk/toolkit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • metadata/trunk/toolkit/comp2schema-header.xsl

    r562 r973  
    88<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    99    xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0">
     10   
     11   
     12    <xsl:template name="PrintHeaderType">
     13        <xs:simpleType name="Resourcetype_simple">
     14            <xs:restriction base="xs:string">   
     15                <xs:enumeration value="Metadata">
     16                    <xs:annotation>
     17                        <xs:documentation>The ResourceProxy
     18                            refers to another component
     19                            metadata instance (e.g. for
     20                            grouping metadata descriptions
     21                            into
     22                            collections)</xs:documentation>
     23                    </xs:annotation>
     24                </xs:enumeration>
     25                <xs:enumeration value="Resource">
     26                    <xs:annotation>
     27                        <xs:documentation>The ResourceProxy
     28                            refers to a file that is not a
     29                            metadata instance (e.g. a text
     30                            document)</xs:documentation>
     31                    </xs:annotation>
     32                </xs:enumeration>
     33            </xs:restriction>   
     34        </xs:simpleType>
     35    </xsl:template>
     36   
     37   
    1038    <xsl:template name="PrintHeader">
     39   
    1140        <xs:element name="Header">
    1241            <xs:complexType>
     
    1948            </xs:complexType>
    2049        </xs:element>
     50
    2151        <xs:element name="Resources">
    2252            <xs:complexType>
     
    2858                                    <xs:complexType>
    2959                                        <xs:sequence>
     60
    3061                                            <xs:element maxOccurs="1" minOccurs="1"
    3162                                                name="ResourceType">
    32                                                 <xs:simpleType>
    33                                                   <xs:restriction base="xs:string">
    34                                                   <xs:enumeration value="Metadata">
    35                                                   <xs:annotation>
    36                                                   <xs:documentation>The ResourceProxy
    37                                                   refers to another component
    38                                                   metadata instance (e.g. for
    39                                                   grouping metadata descriptions
    40                                                   into
    41                                                   collections)</xs:documentation>
    42                                                   </xs:annotation>
    43                                                   </xs:enumeration>
    44                                                   <xs:enumeration value="Resource">
    45                                                   <xs:annotation>
    46                                                   <xs:documentation>The ResourceProxy
    47                                                   refers to a file that is not a
    48                                                   metadata instance (e.g. a text
    49                                                   document)</xs:documentation>
    50                                                   </xs:annotation>
    51                                                   </xs:enumeration>
    52                                                   </xs:restriction>
    53                                                 </xs:simpleType>
     63                                                <xs:complexType>                                               
     64                                                    <xs:simpleContent>
     65                                                        <xs:extension base="Resourcetype_simple">
     66                                                            <xs:attribute name="mimetype" type="xs:string"/>
     67                                                        </xs:extension>
     68                                                    </xs:simpleContent>
     69                                                </xs:complexType>
    5470                                            </xs:element>
     71       
    5572                                            <xs:element maxOccurs="1" minOccurs="1"
    5673                                                name="ResourceRef" type="xs:anyURI"/>
    5774                                        </xs:sequence>
    5875                                        <xs:attribute name="id" type="xs:ID" use="required"/>
     76                                   
    5977                                    </xs:complexType>
    6078                                </xs:element>
  • metadata/trunk/toolkit/comp2schema.xsl

    r810 r973  
    5656            <!--  first create complex types for valueschemes (not inline) -->
    5757            <xsl:call-template name="CreateComplexTypes"/>
     58           
     59            <!-- then create simple type for the ResourceProxy -->
     60            <xsl:call-template name="PrintHeaderType"/>
    5861
    5962            <xs:element name="CMD">
  • metadata/trunk/toolkit/xslt/comp2schema-v2/comp2schema-header.xsl

    r562 r973  
    88<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    99    xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0">
     10
     11    <xsl:template name="PrintHeaderType">
     12        <xs:simpleType name="Resourcetype_simple">
     13            <xs:restriction base="xs:string">   
     14                <xs:enumeration value="Metadata">
     15                    <xs:annotation>
     16                        <xs:documentation>The ResourceProxy
     17                            refers to another component
     18                            metadata instance (e.g. for
     19                            grouping metadata descriptions
     20                            into
     21                            collections)</xs:documentation>
     22                    </xs:annotation>
     23                </xs:enumeration>
     24                <xs:enumeration value="Resource">
     25                    <xs:annotation>
     26                        <xs:documentation>The ResourceProxy
     27                            refers to a file that is not a
     28                            metadata instance (e.g. a text
     29                            document)</xs:documentation>
     30                    </xs:annotation>
     31                </xs:enumeration>
     32            </xs:restriction>   
     33        </xs:simpleType>
     34    </xsl:template>
     35
     36
    1037    <xsl:template name="PrintHeader">
    1138       
     
    3158                                            <xs:element maxOccurs="1" minOccurs="1"
    3259                                                name="ResourceType">
    33                                                 <xs:simpleType>
    34                                                   <xs:restriction base="xs:string">
    35                                                   <xs:enumeration value="Metadata">
    36                                                   <xs:annotation>
    37                                                   <xs:documentation>The ResourceProxy
    38                                                   refers to another component
    39                                                   metadata instance (e.g. for
    40                                                   grouping metadata descriptions
    41                                                   into
    42                                                   collections)</xs:documentation>
    43                                                   </xs:annotation>
    44                                                   </xs:enumeration>
    45                                                   <xs:enumeration value="Resource">
    46                                                   <xs:annotation>
    47                                                   <xs:documentation>The ResourceProxy
    48                                                   refers to a file that is not a
    49                                                   metadata instance (e.g. a text
    50                                                   document)</xs:documentation>
    51                                                   </xs:annotation>
    52                                                   </xs:enumeration>
    53                                                   </xs:restriction>
    54                                                 </xs:simpleType>
     60                                                <xs:complexType>                                               
     61                                                    <xs:simpleContent>
     62                                                        <xs:extension base="Resourcetype_simple">
     63                                                            <xs:attribute name="mimetype" type="xs:string"/>
     64                                                        </xs:extension>
     65                                                    </xs:simpleContent>
     66                                                </xs:complexType>
    5567                                            </xs:element>
    5668                                            <xs:element maxOccurs="1" minOccurs="1"
  • metadata/trunk/toolkit/xslt/comp2schema-v2/comp2schema.xsl

    r816 r973  
    6565            <xsl:call-template name="CreateComplexTypes"/>
    6666
    67 
     67            <!-- then create simple type for the ResourceProxy -->
     68            <xsl:call-template name="PrintHeaderType"/>
    6869
    6970
Note: See TracChangeset for help on using the changeset viewer.