go-perl

 view release on metacpan or  search on metacpan

GO/xsl/oboxml_to_obd_prestore.xsl  view on Meta::CPAN

      </xsl:if>
      <xsl:if test="prodtype">
        <link>
          <predicate_id>
            <xsl:text>is_a</xsl:text> <!-- TODO: is_a vs instance_of -->
          </predicate_id>
          <object_id>
            <node>
              <uid>
                <xsl:value-of select="prodtype"/>
              </uid>
            </node>
          </object_id>
        </link>
      </xsl:if>
      <xsl:comment>
        <xsl:text>annotations</xsl:text>
      </xsl:comment>
      <xsl:for-each select="assoc">
        <link>
          <predicate_id>
            <xsl:text>influences</xsl:text> <!-- TODO -->
          </predicate_id>
          <object_id>
            <node>
              <uid>
                <xsl:value-of select="termacc"/>
              </uid>
            </node>
          </object_id>
          <source_id>
            <node>
              <uid>
                <xsl:value-of select="../proddb"/>
              </uid>
            </node>
          </source_id>
          <xsl:call-template name="link_audit"/>
          <xsl:if test="is_not=1">
            <is_negated><xsl:text>t</xsl:text></is_negated>
          </xsl:if>
          <xsl:comment>the annotation is the attribution for the link</xsl:comment>
          <reiflink_node_id>
            <node>
              <!-- id is optional -->
              <xsl:apply-templates select="id" mode="id"/>
              <is_anonymous><xsl:text>t</xsl:text></is_anonymous>
              <is_reiflink><xsl:text>t</xsl:text></is_reiflink>
              <metatype><xsl:text>I</xsl:text></metatype>
              <!-- type -->
              <link>
                <predicate_id>
                  <xsl:text>instance_of</xsl:text>
                </predicate_id>
                <object_id>
                  <node>
                    <uid>oban:Annotation</uid>
                  </node>
                </object_id>
              </link>
              <!-- assocdata -->
              <xsl:if test="assocdate">
                <!-- TODO -->
              </xsl:if>
            </node>
          </reiflink_node_id>
        </link>
      </xsl:for-each>
    </node>
    <!-- xsl:value-of select="../proddb"/?? -->
    <!-- xsl:value-of select="prodtype"/?? -->
    <!-- xsl:value-of select="prodtaxa"/?? -->
  </xsl:template>

  <!-- obo-format 1.3 annotation extension -->
  <xsl:template match="annotation">
    <link>
      <predicate_id>
        <node>
          <uid>
            <xsl:value-of select="relation"/>
          </uid>
        </node>
      </predicate_id>
      <node_id>
        <node>
          <uid>
            <xsl:value-of select="subject"/>
          </uid>
        </node>
      </node_id>
      <object_id>
        <xsl:apply-templates select="object" mode="id-or-expression"/>
      </object_id>
      <source_id>
        <node>
          <uid>
            <xsl:value-of select="namespace"/>
          </uid>
        </node>
      </source_id>
      <xsl:call-template name="link_audit"/>
      <xsl:if test="is_negated=1">
        <is_negated>
          <xsl:text>t</xsl:text>
        </is_negated>
      </xsl:if>
      <xsl:comment>the annotation is the attributation for the link</xsl:comment>
      <reiflink_node_id>
        <node>
          
          <is_anonymous><xsl:text>t</xsl:text></is_anonymous>
          <metatype><xsl:text>I</xsl:text></metatype>
          <!-- type -->
          <link>
            <predicate_id>
              <xsl:text>instance_of</xsl:text>
            </predicate_id>
            <object_id>
              <node>
                <uid>oban:Annotation</uid>



( run in 1.620 second using v1.01-cache-2.11-cpan-364913b4093 )