Changeset 5244


Ignore:
Timestamp:
05/20/14 19:46:58 (10 years ago)
Author:
Menzo Windhouwer
Message:

M xsl/Component2RDF.xsl

  • fixed the URI: the relative URIs were resolved wrongly
File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMDI-Interoperability/CMD2RDF/trunk/xsl/Component2RDF.xsl

    r5243 r5244  
    1818        <!-- for the output base replace the xml extension by rdf -->
    1919        <xsl:result-document href="{concat($out,'/',Header/ID,'.rdf')}">
    20             <rdf:RDF xml:base="{if (@isProfile='true') then (cmd:ppath(Header/ID,'rdf')) else (cmd:cpath(Header/ID,'rdf'))}#">
     20            <rdf:RDF xml:base="{if (@isProfile='true') then (cmd:ppath(Header/ID,'rdf')) else (cmd:cpath(Header/ID,'rdf'))}">
    2121                <xsl:apply-templates>
    2222                    <xsl:with-param name="context" tunnel="yes" select="''"/>
     
    5050            <xsl:result-document href="{concat($out,'/',@ComponentId,'.rdf')}">
    5151                <!-- for the output base replace the xml extension by rdf -->
    52                 <rdf:RDF xml:base="{cmd:cpath(@ComponentId,'rdf')}#">
     52                <rdf:RDF xml:base="{cmd:cpath(@ComponentId,'rdf')}">
    5353                    <xsl:call-template name="CMD_Component">
    5454                        <xsl:with-param name="context" tunnel="yes" select="''"/>
     
    6464        <xsl:variable name="id" select="cmd:path($context,@name)"/>
    6565        <!-- a component maps to an RDF class -->
    66         <rdfs:Class rdf:about="{$id}">
     66        <rdfs:Class rdf:about="#{$id}">
    6767            <xsl:choose>
    6868                <xsl:when test="parent::CMD_ComponentSpec/@isProfile='true'">
     
    106106        <xsl:variable name="has" select="cmd:path($context,concat('has',@name))"/>
    107107        <!-- element becomes a class to be able to group attributes and value together -->
    108         <rdfs:Class rdf:about="{$id}">
     108        <rdfs:Class rdf:about="#{$id}">
    109109            <rdfs:subClassOf rdf:resource="&cmdm;Element"/>
    110110            <xsl:call-template name="generic"/>
     
    114114            <rdfs:subPropertyOf rdf:resource="&cmdm;hasElementValue"/>
    115115            <!-- the domain of the value property is the class corresponding to the CMD element -->
    116             <rdfs:domain rdf:resource="{$id}"/>
     116            <rdfs:domain rdf:resource="#{$id}"/>
    117117            <xsl:choose>
    118118                <!-- if the value scheme is an enumeration the range consists of the labels of the values -->
     
    132132        <!-- if there is an value enumeration also have a hasElementEntity property -->
    133133        <xsl:if test="exists(ValueScheme/enumeration)">
    134             <rdf:Class rdf:about="{$id}Entity">
     134            <rdf:Class rdf:about="#{$id}Entity">
    135135                <rdf:subClassOf rdf:resource="&cmdm;Entity"/>
    136136            </rdf:Class>
    137             <rdf:Property rdf:about="{$has}ElementEntity">
     137            <rdf:Property rdf:about="#{$has}ElementEntity">
    138138                <rdfs:subPropertyOf rdf:resource="&cmdm;hasElementEntity"/>
    139139                <!-- the domain of the value property is the class corresponding to the CMD element -->
    140                 <rdfs:domain rdf:resource="{$id}"/>
     140                <rdfs:domain rdf:resource="#{$id}"/>
    141141                <!-- the range consists of a superclass for the specific value classes -->
    142                 <rdfs:range rdf:resource="{$id}Entity"/>
     142                <rdfs:range rdf:resource="#{$id}Entity"/>
    143143            </rdf:Property>
    144144        </xsl:if>
     
    157157        <xsl:variable name="id" select="replace($label,'\s','')"/>
    158158        <!-- a value in a value scheme becomes a subclass of that scheme -->
    159         <rdf:Class rdf:about="{$context}Value{$STEP}{$id}">
    160             <rdf:subClassOf rdf:resource="{$context}Entity"/>
     159        <rdf:Class rdf:about="#{$context}Value{$STEP}{$id}">
     160            <rdf:subClassOf rdf:resource="#{$context}Entity"/>
    161161            <xsl:call-template name="generic"/>
    162162            <rdfs:label>
     
    173173        <xsl:variable name="has" select="concat(cmd:path($context,concat('has',Name)),'Attribute')"/>
    174174        <!-- element becomes a class to be able to group attributes and value together -->
    175         <rdfs:Class rdf:about="{$id}">
     175        <rdfs:Class rdf:about="#{$id}">
    176176            <rdfs:subClassOf rdf:resource="&cmdm;Attribute"/>
    177177            <xsl:call-template name="generic"/>
    178178        </rdfs:Class>
    179179        <!-- an attribute becomes a property -->
    180         <rdf:Property rdf:about="{$has}Value">
     180        <rdf:Property rdf:about="#{$has}Value">
    181181            <rdfs:subPropertyOf rdf:resource="&cmdm;hasAttributeValue"/>
    182182            <!-- the domain is the CMD element RDF class -->
    183             <rdfs:domain rdf:resource="{$id}"/>
     183            <rdfs:domain rdf:resource="#{$id}"/>
    184184            <xsl:choose>
    185185                <!-- if the value scheme is an enumeration the range is the labels -->
     
    199199        <!-- if there is an value enumeration also have a hasAttributeEntity property -->
    200200        <xsl:if test="exists(ValueScheme/enumeration)">
    201             <rdf:Class rdf:about="{$id}Entity">
     201            <rdf:Class rdf:about="#{$id}Entity">
    202202                <rdf:subClassOf rdf:resource="&cmdm;Entity"/>
    203203            </rdf:Class>
    204             <rdf:Property rdf:about="{$has}Entity">
     204            <rdf:Property rdf:about="#{$has}Entity">
    205205                <rdfs:subPropertyOf rdf:resource="&cmdm;hasAttributeEntity"/>
    206                 <!-- the domain is the CMD element RDF class -->
    207                 <rdfs:domain rdf:resource="{id}"/>
     206                <!-- the domain is the CMD Attribute RDF class -->
     207                <rdfs:domain rdf:resource="#{$id}"/>
    208208                <!-- the range consists of a superclass for the specific value classes -->
    209209                <rdfs:range rdf:resource="{$id}Entity"/>
Note: See TracChangeset for help on using the changeset viewer.