Changeset 3801 for CMDI-Interoperability
- Timestamp:
- 10/18/13 11:39:14 (11 years ago)
- Location:
- CMDI-Interoperability/CMD2RDF/trunk/xsl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
CMDI-Interoperability/CMD2RDF/trunk/xsl/CMDRecord2RDF.xsl
r3799 r3801 170 170 <!-- find the matching instances --> 171 171 <xsl:for-each select="$instance/@*[local-name()=$name]"> 172 <xsl:element name="{$has}Value" namespace="{$ns}"> 173 <!-- map the CMD XSD datatype to a datatype supported by RDF --> 174 <xsl:attribute name="rdf:datatype" select="concat('&xsd;',cmd:datatype($profile/Type))"/> 175 <!-- copy the literal --> 176 <xsl:value-of select="."/> 177 </xsl:element> 178 <xsl:if test="exists($profile/ValueScheme/enumeration)"> 179 <xsl:element name="{$has}Entity" namespace="{$ns}"> 180 <xsl:attribute name="rdf:resource" select="concat($ns,$id,'ValueScheme',$STEP,replace(.,'\s',''))"/> 172 <cmdm:contains> 173 <xsl:element name="{$id}" namespace="{$ns}"> 174 <xsl:attribute name="rdf:about" select="concat('#',generate-id(.))"/> 175 <xsl:element name="{$has}Value" namespace="{$ns}"> 176 <!-- map the CMD XSD datatype to a datatype supported by RDF --> 177 <xsl:attribute name="rdf:datatype" select="concat('&xsd;',cmd:datatype($profile/Type))"/> 178 <!-- copy the literal --> 179 <xsl:value-of select="."/> 180 </xsl:element> 181 <xsl:if test="exists($profile/ValueScheme/enumeration)"> 182 <xsl:element name="{$has}Entity" namespace="{$ns}"> 183 <xsl:attribute name="rdf:resource" select="concat($ns,$id,'ValueScheme',$STEP,replace(.,'\s',''))"/> 184 </xsl:element> 185 </xsl:if> 181 186 </xsl:element> 182 </ xsl:if>187 </cmdm:contains> 183 188 </xsl:for-each> 184 189 </xsl:template> -
CMDI-Interoperability/CMD2RDF/trunk/xsl/Component2RDF.xsl
r3799 r3801 146 146 <xsl:variable name="id" select="concat(cmd:path($context,Name),'Attribute')"/> 147 147 <xsl:variable name="has" select="concat(cmd:path($context,concat('has',Name)),'Attribute')"/> 148 <!-- element becomes a class to be able to group attributes and value together --> 149 <rdfs:Class rdf:about="{$id}"> 150 <rdfs:subClassOf rdf:resource="&cmdm;Attribute"/> 151 <xsl:call-template name="generic"/> 152 </rdfs:Class> 148 153 <!-- an attribute becomes a property --> 149 154 <rdf:Property rdf:about="{$has}Value"> 150 155 <rdfs:subPropertyOf rdf:resource="&cmdm;hasAttributeValue"/> 151 <xsl:call-template name="generic"/>152 156 <!-- the domain is the CMD element RDF class --> 153 <rdfs:domain rdf:resource="{$ context}"/>157 <rdfs:domain rdf:resource="{$id}"/> 154 158 <xsl:choose> 155 159 <!-- if the value scheme is an enumeration the range is the labels --> … … 172 176 <rdfs:subPropertyOf rdf:resource="&cmdm;hasAttributeEntity"/> 173 177 <!-- the domain is the CMD element RDF class --> 174 <rdfs:domain rdf:resource="{ $context}"/>178 <rdfs:domain rdf:resource="{id}"/> 175 179 <!-- the range consists of a superclass for the specific value classes --> 176 180 <rdfs:range rdf:resource="{$id}Value"/>
Note: See TracChangeset
for help on using the changeset viewer.