On 03/24/10 16:33, Andrea Chiumenti wrote:
XURI nodeTableName = URI.create(m_xContext, "gam3:tableName");
The code generates this rdf file:
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="http://wwww.wingstech.it/gam3/v1.0">
<ns1:tableId xmlns:ns1="gam3:">A_TABLE</ns1:tableId>
<ns2:tableName xmlns:ns2="gam3:">12345</ns2:tableName>
</rdf:Description>
</rdf:RDF>
What I needed was instead something like this:
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="http://wwww.wingstech.it/gam3/v1.0">
<gam3:tableId>A_TABLE</gam3:tableId>
<gam3:tableName>12345</gam3:tableName>
</rdf:Description>
</rdf:RDF>
In the URI.create call, the parameter should include the namespace URI,
not the prefix. A prefix (like "ns1") is then generated. You can see it
in the example output: If "gam3:" was replaced by something like
"http://www.wingstech.it/gam3/v1.0/", it would be equivalent to the
second fragment (except for the namespace definition, which is missing
there).
Niklas
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]