<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:text>
[Namespaces:
  owl	= http://www.w3.org/2002/07/owl#
  rdfs  = http://www.w3.org/2000/01/rdf-schema#
  rdf   = http://www.w3.org/1999/02/22-rdf-syntax-ns#
]
 
Ontology(
 
  Class(ard:Attribute)
  Class(ard:Property)
 
  ObjectProperty(ard:is_attribute_of domain(ard:Property) range(ard:Attribute))
  ObjectProperty(ard:has_attribute inverseOf(ard:is_attribute_of))
 
  ObjectProperty(ard:depends_on domain(ard:property) range(ard:Property))
  ObjectProperty(ard:is_prerequisite_for inverseOf(ard:Property))
 
  ObjectProperty(ard:transformed_into domain(ard:Property) range(Property))
  ObjectProperty(ard:transformed_from inverseOf(ard:transformed_into))
 
  </xsl:text>
  <xsl:for-each select="hml/attribute_set/att">Individual(ard:<xsl:value-of select="@id"/> type(ard:Attribute) Label("<xsl:value-of select="@name"/>")<xsl:if test="desc"> Comment("<xsl:value-of select="desc"/>")</xsl:if>)
  </xsl:for-each>
 
  <xsl:text> 
  </xsl:text>
 
  <xsl:for-each select="hml/property_set/property">Individual(ard:<xsl:value-of select="@id"/> type(ard:Property)<xsl:for-each select="attref"><xsl:text>
    </xsl:text>value(ard:has_attribute ard:<xsl:value-of select="@ref"/>)</xsl:for-each>
    <xsl:for-each select="/hml/ard/dep[@dependent=current()/@id]"><xsl:text>
    </xsl:text>value(ard:depends_on ard:<xsl:value-of select="@independent"/>)</xsl:for-each>
    <xsl:for-each select="/hml/tph/trans[@dst=current()/@id]"><xsl:text>
    </xsl:text>value(ard:transformed_from ard:<xsl:value-of select="@src"/>)</xsl:for-each><xsl:text>)
 
  </xsl:text></xsl:for-each>
)
</xsl:template>
</xsl:stylesheet>
pl/miw/miw08_ard_xml/ard_owl_xsl.txt · ostatnio zmienione: 2017/07/17 08:08 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0