RDF从头开始

时间:2013-07-01 20:26:57

标签: xml rdf

所以我试图将XML文件转换为RDF,但不明白如何。

在这里,我开始从头开始创建自己的RDF:

<?xml version="1.0" encoding="UTF-8"?>

    <rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:db="http://drugbank.ca#">

    <rdf:Description rdf:about="http://drugbank.ca/DB00001">
      <db:name>Lepirudin</db:name>
      <db:description:>Lepirudin is identical to natural hirudin except for substitution of leucine for isoleucine at the N-terminal end of the molecule and the absence of a sulfate group on the tyrosine at position 63. It is produced via yeast cells.</db:description>
      <db:substrate></db:substrate>
      <db:enzymes></db:enzymes>
      <db:mechanism-of-action>Lepirudin forms a stable non-covalent complex with alpha-thrombin, thereby abolishing its ability to cleave fibrinogen and initiate the clotting cascade. The inhibition of thrombin prevents the blood clotting cascade.</db:mechanism-of-action>
      <db:targets>inhibitor # Turpie AG: Anticoagulants in acute coronary syndromes. Am J Cardiol. 1999 Sep 2;84(5A):2M-6M. "Pubmed":http://www.ncbi.nlm.nih.gov/pubmed/10505536
     # Warkentin TE: Venous thromboembolism in heparin-induced thrombocytopenia. Curr Opin Pulm Med. 2000 Jul;6(4):343-51. "Pubmed":http://www.ncbi.nlm.nih.gov/pubmed/10912644
     # Eriksson BI: New therapeutic options in deep vein thrombosis prophylaxis. Semin Hematol. 2000 Jul;37(3 Suppl 5):7-9. "Pubmed":http://www.ncbi.nlm.nih.gov/pubmed/11055889
     # Fabrizio MC: Use of ecarin clotting time (ECT) with lepirudin therapy in heparin-induced thrombocytopenia and cardiopulmonary bypass. J Extra Corpor Technol. 2001 May;33(2):117-25. "Pubmed":http://www.ncbi.nlm.nih.gov/pubmed/11467439
     # Szaba FM, Smiley ST: Roles for thrombin and fibrin(ogen) in cytokine/chemokine production and macrophage adhesion in vivo. Blood. 2002 Feb 1;99(3):1053-9. "Pubmed":http://www.ncbi.nlm.nih.gov/pubmed/11807012
     # Chen X, Ji ZL, Chen YZ: TTD: Therapeutic Target Database. Nucleic Acids Res. 2002 Jan 1;30(1):412-5. "Pubmed":http://www.ncbi.nlm.nih.gov/pubmed/11752352 yes</db:targets>
    </rdf:Description>

    <rdf:Description rdf:about="http://drugbank.ca/DB00002>
      <db:name></db:name>
      <db:description:></db:description>
      <db:substrate></db:substrate>
      <db:enzymes></db:enzymes>
      <db:mechanism-of-action></db:mechanism-of-action>
      <db:targets></db:targets>
    </rdf:Description>

    .
    .
    .


    </rdf:RDF>

我是否开始正确(第一次和最后一次)......任何提示都会有所帮助。感谢

1 个答案:

答案 0 :(得分:1)

我建议的第一件事是你使用W3C validator。这样做,您将看到RDF中存在一些错误。这些行是错误的:

<db:description:>Lepirudin ..
<rdf:Description rdf:about="http://drugbank.ca/DB00002>
<db:description:></db:description>

其次,我建议使用突出显示RDF语法的文本编辑器(emacs运行良好)。这样,您将很容易看到语法错误的位置。