2013-07-01 122 views
-1

所以我試圖將XML文件轉換爲RDF,但不知道如何去做。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> 

我已經開始抵消權(第一次也是最後一次)......任何提示將幫助很多。謝謝

+0

你遇到過一些問題嗎? –

回答

1

我會建議的第一件事是你使用W3C validator。這樣做,你會發現你的RDF有一些錯誤。這些行是錯誤的:

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

其次,我建議使用突出RDF語法的文本編輯器(emacs運作良好)。這樣,你會很容易地看到你的語法錯誤。

+0

好的會做謝謝... –