<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:&#23435;&#20307;;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:\00D0\00C2\00CB\00CE\00CC\00E5;}
@font-face
        {font-family:"\@&#23435;&#20307;";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
 /* Page Definitions */
 @page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        layout-grid:15.6pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'>

<div class=Section1 style='layout-grid:15.6pt'>

<p class=MsoNormal style='layout-grid-mode:char'><font size=1 face=Arial><span
lang=EN-US style='font-size:9.0pt;font-family:Arial'>I want to parse a ntriple
file into Redland model in .net platform using redland dotnet binding API like
this. But It doesn&#8217;t work. &nbsp;I don&#8217;t know why?<o:p></o:p></span></font></p>

<p class=MsoNormal style='layout-grid-mode:char'><font size=1 face=Arial><span
lang=EN-US style='font-size:9.0pt;font-family:Arial'>As for the &#8220;rdfxml&#8221; file,
it can work.<o:p></o:p></span></font></p>

<p class=MsoNormal style='layout-grid-mode:char'><font size=1 face=Arial><span
lang=EN-US style='font-size:9.0pt;font-family:Arial'>How can I parse ntriple
string into a Redland model?<o:p></o:p></span></font></p>

<p class=MsoNormal style='layout-grid-mode:char'><font size=1 face=Arial><span
lang=EN-US style='font-size:9.0pt;font-family:Arial'>Thank you in advance!<o:p></o:p></span></font></p>

<p class=MsoNormal align=right style='text-align:right;layout-grid-mode:char'><font
size=2 color=teal face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;
font-family:\00D0\00C2\00CB\00CE\00CC\00E5;color:teal'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 color=teal face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;
font-family:\00D0\00C2\00CB\00CE\00CC\00E5;color:teal'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 color=teal face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;
font-family:\00D0\00C2\00CB\00CE\00CC\00E5;color:teal'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 color=teal face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;
font-family:\00D0\00C2\00CB\00CE\00CC\00E5;color:teal'>String</span></font><font
size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'>
lang = <font color=blue><span style='color:blue'>null</span></font>;<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'>schemaFileName<font
color=maroon><span style='color:maroon'> = &quot;dc.nt&quot;</span></font>;<o:p></o:p></span></font></p>

<p class=MsoNormal style='layout-grid-mode:char'><font size=1 face=Arial><span
lang=EN-US style='font-size:9.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'>Redland.<font
color=teal><span style='color:teal'>Storage</span></font> storage = <font
color=blue><span style='color:blue'>new</span></font> <font color=teal><span
style='color:teal'>Storage</span></font>(<font color=maroon><span
style='color:maroon'>&quot;memory&quot;</span></font>, <font color=maroon><span
style='color:maroon'>&quot;test&quot;</span></font>, <font color=blue><span
style='color:blue'>null</span></font>);<o:p></o:p></span></font></p>

<p class=MsoNormal style='layout-grid-mode:char'><font size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span
lang=EN-US style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'>Redland.<font
color=teal><span style='color:teal'>Model</span></font> model = <font
color=blue><span style='color:blue'>new</span></font> <font color=teal><span
style='color:teal'>Model</span></font>(storage);<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 color=teal face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;
font-family:\00D0\00C2\00CB\00CE\00CC\00E5;color:teal'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 color=teal face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;
font-family:\00D0\00C2\00CB\00CE\00CC\00E5;color:teal'>StreamReader</span></font><font
size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'>
sr = <font color=teal><span style='color:teal'>File</span></font>.OpenText(schemaFileName);<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 color=teal face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;
font-family:\00D0\00C2\00CB\00CE\00CC\00E5;color:teal'>String</span></font><font
size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'>
s =
sr.ReadToEnd();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 color=blue face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;
font-family:\00D0\00C2\00CB\00CE\00CC\00E5;color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 color=blue face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;
font-family:\00D0\00C2\00CB\00CE\00CC\00E5;color:blue'>if</span></font><font
size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'>
(schemaFileName.EndsWith(<font color=maroon><span style='color:maroon'>&quot;.nt&quot;</span></font>))<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
lang = <font color=maroon><span style='color:maroon'>&quot;ntriples&quot;</span></font>;<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 color=blue face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;
font-family:\00D0\00C2\00CB\00CE\00CC\00E5;color:blue'>else</span></font><font
size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'>
<font color=blue><span style='color:blue'>if</span></font>
(schemaFileName.EndsWith(<font color=maroon><span style='color:maroon'>&quot;.rdf&quot;</span></font>))<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
lang = <font color=maroon><span style='color:maroon'>&quot;rdfxml&quot;</span></font>;<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 color=blue face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;
font-family:\00D0\00C2\00CB\00CE\00CC\00E5;color:blue'>else</span></font><font
size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'>
<font color=blue><span style='color:blue'>if</span></font>
(schemaFileName.EndsWith(<font color=maroon><span style='color:maroon'>&quot;.ttl&quot;</span></font>))<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;text-indent:5.5pt;
layout-grid-mode:char'><font size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US
style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'>&nbsp;&nbsp;&nbsp;&nbsp;
lang = <font color=maroon><span style='color:maroon'>&quot;turtle&quot;</span></font>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'>Redland.<font
color=teal><span style='color:teal'>Uri</span></font> baseuri = <font
color=blue><span style='color:blue'>new</span></font> Redland.<font color=teal><span
style='color:teal'>Uri</span></font>(<font color=maroon><span style='color:
maroon'>&quot;http://xx/xx#&quot;</span></font>);<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;layout-grid-mode:char'><font
size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span lang=EN-US style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'>Redland.<font
color=teal><span style='color:teal'>Parser</span></font> parser = <font
color=blue><span style='color:blue'>new</span></font> <font color=teal><span
style='color:teal'>Parser</span></font>(lang);<font color=green><span
style='color:green'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></font></span></font></p>

<p class=MsoNormal style='layout-grid-mode:char'><font size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span
lang=EN-US style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'>parser.ParseStringIntoModel(s,
baseuri, model);<o:p></o:p></span></font></p>

<p class=MsoNormal style='layout-grid-mode:char'><font size=2 face=&ETH;&Acirc;&Euml;&Icirc;&Igrave;&aring;><span
lang=EN-US style='font-size:11.0pt;font-family:\00D0\00C2\00CB\00CE\00CC\00E5'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='layout-grid-mode:char'><font size=1 face=Arial><span
lang=EN-US style='font-size:9.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-US style='font-size:
9.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>