Changeset 5244
- Timestamp:
- 05/20/14 19:46:58 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CMDI-Interoperability/CMD2RDF/trunk/xsl/Component2RDF.xsl
r5243 r5244 18 18 <!-- for the output base replace the xml extension by rdf --> 19 19 <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'))}"> 21 21 <xsl:apply-templates> 22 22 <xsl:with-param name="context" tunnel="yes" select="''"/> … … 50 50 <xsl:result-document href="{concat($out,'/',@ComponentId,'.rdf')}"> 51 51 <!-- 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')}"> 53 53 <xsl:call-template name="CMD_Component"> 54 54 <xsl:with-param name="context" tunnel="yes" select="''"/> … … 64 64 <xsl:variable name="id" select="cmd:path($context,@name)"/> 65 65 <!-- a component maps to an RDF class --> 66 <rdfs:Class rdf:about=" {$id}">66 <rdfs:Class rdf:about="#{$id}"> 67 67 <xsl:choose> 68 68 <xsl:when test="parent::CMD_ComponentSpec/@isProfile='true'"> … … 106 106 <xsl:variable name="has" select="cmd:path($context,concat('has',@name))"/> 107 107 <!-- 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}"> 109 109 <rdfs:subClassOf rdf:resource="&cmdm;Element"/> 110 110 <xsl:call-template name="generic"/> … … 114 114 <rdfs:subPropertyOf rdf:resource="&cmdm;hasElementValue"/> 115 115 <!-- 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}"/> 117 117 <xsl:choose> 118 118 <!-- if the value scheme is an enumeration the range consists of the labels of the values --> … … 132 132 <!-- if there is an value enumeration also have a hasElementEntity property --> 133 133 <xsl:if test="exists(ValueScheme/enumeration)"> 134 <rdf:Class rdf:about=" {$id}Entity">134 <rdf:Class rdf:about="#{$id}Entity"> 135 135 <rdf:subClassOf rdf:resource="&cmdm;Entity"/> 136 136 </rdf:Class> 137 <rdf:Property rdf:about=" {$has}ElementEntity">137 <rdf:Property rdf:about="#{$has}ElementEntity"> 138 138 <rdfs:subPropertyOf rdf:resource="&cmdm;hasElementEntity"/> 139 139 <!-- 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}"/> 141 141 <!-- 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"/> 143 143 </rdf:Property> 144 144 </xsl:if> … … 157 157 <xsl:variable name="id" select="replace($label,'\s','')"/> 158 158 <!-- 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"/> 161 161 <xsl:call-template name="generic"/> 162 162 <rdfs:label> … … 173 173 <xsl:variable name="has" select="concat(cmd:path($context,concat('has',Name)),'Attribute')"/> 174 174 <!-- 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}"> 176 176 <rdfs:subClassOf rdf:resource="&cmdm;Attribute"/> 177 177 <xsl:call-template name="generic"/> 178 178 </rdfs:Class> 179 179 <!-- an attribute becomes a property --> 180 <rdf:Property rdf:about=" {$has}Value">180 <rdf:Property rdf:about="#{$has}Value"> 181 181 <rdfs:subPropertyOf rdf:resource="&cmdm;hasAttributeValue"/> 182 182 <!-- the domain is the CMD element RDF class --> 183 <rdfs:domain rdf:resource=" {$id}"/>183 <rdfs:domain rdf:resource="#{$id}"/> 184 184 <xsl:choose> 185 185 <!-- if the value scheme is an enumeration the range is the labels --> … … 199 199 <!-- if there is an value enumeration also have a hasAttributeEntity property --> 200 200 <xsl:if test="exists(ValueScheme/enumeration)"> 201 <rdf:Class rdf:about=" {$id}Entity">201 <rdf:Class rdf:about="#{$id}Entity"> 202 202 <rdf:subClassOf rdf:resource="&cmdm;Entity"/> 203 203 </rdf:Class> 204 <rdf:Property rdf:about=" {$has}Entity">204 <rdf:Property rdf:about="#{$has}Entity"> 205 205 <rdfs:subPropertyOf rdf:resource="&cmdm;hasAttributeEntity"/> 206 <!-- the domain is the CMD elementRDF class -->207 <rdfs:domain rdf:resource=" {id}"/>206 <!-- the domain is the CMD Attribute RDF class --> 207 <rdfs:domain rdf:resource="#{$id}"/> 208 208 <!-- the range consists of a superclass for the specific value classes --> 209 209 <rdfs:range rdf:resource="{$id}Entity"/>
Note: See TracChangeset
for help on using the changeset viewer.