I've been trying to keep an OWL ontology in the BaseX database. It's a little contrived but I thought it should work. But whenever I insert the ontology it corrupts my entire collection.
I have a single Ontology node, that initially is just an empty element. Then I perform the following query:
replace node collection('bm_test_iam')/BOT-L/Ontology with <Ontology xmlns="http://www.w3.org/2002/07/owl#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xml:base="http://www.w3.org/2002/07/owl#"> <Prefix name="rdf" IRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/> <Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/> <Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/> <Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/> <SubClassOf> <Class IRI="http://ar#boat"/> <Class IRI="http://ar#vehicle"/> </SubClassOf> </Ontology>
I get an error. Same thing when I run this query from the BasX UI. This is what I see in the "Query Info" panel:
Query: replace node collection('bm_test_iam')/BOT-L/Ontology with <Ontology xmlns="http://www.w3.org/2002/07/owl#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xml:base="http://www.w3.org/2002/07/owl#"> <Prefix name="rdf" IRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/> <Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/> <Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/> <Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/> <SubClassOf> <Class IRI="http://ar#boat"/> <Class IRI="http://ar#vehicle"/> </SubClassOf> </Ontology> Error: Possible bug? Feedback is welcome: basex-talk@mailman.uni-konstanz.de BaseX 6.3.2: java.lang.RuntimeException: Possible bug? Feedback is welcome: basex-talk@mailman.uni-konstanz.de BaseX 6.3.2: Data Access out of bounds [pre:699, indexSize:5, access:5 > 4]
org.basex.util.Util.notexpected(Util.java:46) org.basex.io.TableDiskAccess.cursor(TableDiskAccess.java:323) org.basex.io.TableDiskAccess.read1(TableDiskAccess.java:92) org.basex.data.Data.kind(Data.java:324) org.basex.query.item.DBNode$4.next(DBNode.java:272) org.basex.query.path.IterStep$1.next(IterStep.java:45) org.basex.query.iter.NodeIter.next(NodeIter.java:1) org.basex.query.path.IterPath$1.next(IterPath.java:66) org.basex.query.path.IterPath$1.next(IterPath.java:1) org.basex.query.up.Replace.item(Replace.java:59) org.basex.query.expr.ParseExpr.iter(ParseExpr.java:47) org.basex.query.QueryContext.iter(QueryContext.java:360) org.basex.query.QueryContext.iter(QueryContext.java:324) org.basex.query.QueryContext.eval(QueryContext.java:282) org.basex.query.QueryProcessor.execute(QueryProcessor.java:104) org.basex.core.cmd.AQuery.query(AQuery.java:83) org.basex.core.cmd.XQuery.run(XQuery.java:22) org.basex.core.Command.run(Command.java:245) org.basex.core.Command.exec(Command.java:227) org.basex.core.Command.execute(Command.java:66) org.basex.gui.GUI.exec(GUI.java:383) org.basex.gui.GUI$5.run(GUI.java:346)
Note: the XML I try to insert is created by Pellet, so I have little control over it.
Not only does the query fail, but any subsequent query on the same collection now gives me a "Possible Bug?" message. Any ideas would be greatly appreciated.
Mark Boon
Mark, thanks for your mails. Just a short one.. Does the same error occur with the latest version of BaseX (6.5)? Christian
On Thu, Jan 20, 2011 at 10:06 PM, Mark Boon mboon@blueplanetsoftware.com wrote:
I've been trying to keep an OWL ontology in the BaseX database. It's a little contrived but I thought it should work. But whenever I insert the ontology it corrupts my entire collection. I have a single Ontology node, that initially is just an empty element. Then I perform the following query: replace node collection('bm_test_iam')/BOT-L/Ontology with <Ontology xmlns="http://www.w3.org/2002/07/owl#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xml:base="http://www.w3.org/2002/07/owl#"> <Prefix name="rdf" IRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/> <Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/> <Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/> <Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/> <SubClassOf> <Class IRI="http://ar#boat"/> <Class IRI="http://ar#vehicle"/> </SubClassOf>
</Ontology> I get an error. Same thing when I run this query from the BasX UI. This is what I see in the "Query Info" panel: Query: replace node collection('bm_test_iam')/BOT-L/Ontology with <Ontology xmlns="http://www.w3.org/2002/07/owl#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xml:base="http://www.w3.org/2002/07/owl#"> <Prefix name="rdf" IRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/> <Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/> <Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/> <Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/> <SubClassOf> <Class IRI="http://ar#boat"/> <Class IRI="http://ar#vehicle"/> </SubClassOf> </Ontology> Error: Possible bug? Feedback is welcome: basex-talk@mailman.uni-konstanz.de BaseX 6.3.2: java.lang.RuntimeException: Possible bug? Feedback is welcome: basex-talk@mailman.uni-konstanz.de BaseX 6.3.2: Data Access out of bounds [pre:699, indexSize:5, access:5 > 4] org.basex.util.Util.notexpected(Util.java:46) org.basex.io.TableDiskAccess.cursor(TableDiskAccess.java:323) org.basex.io.TableDiskAccess.read1(TableDiskAccess.java:92) org.basex.data.Data.kind(Data.java:324) org.basex.query.item.DBNode$4.next(DBNode.java:272) org.basex.query.path.IterStep$1.next(IterStep.java:45) org.basex.query.iter.NodeIter.next(NodeIter.java:1) org.basex.query.path.IterPath$1.next(IterPath.java:66) org.basex.query.path.IterPath$1.next(IterPath.java:1) org.basex.query.up.Replace.item(Replace.java:59) org.basex.query.expr.ParseExpr.iter(ParseExpr.java:47) org.basex.query.QueryContext.iter(QueryContext.java:360) org.basex.query.QueryContext.iter(QueryContext.java:324) org.basex.query.QueryContext.eval(QueryContext.java:282) org.basex.query.QueryProcessor.execute(QueryProcessor.java:104) org.basex.core.cmd.AQuery.query(AQuery.java:83) org.basex.core.cmd.XQuery.run(XQuery.java:22) org.basex.core.Command.run(Command.java:245) org.basex.core.Command.exec(Command.java:227) org.basex.core.Command.execute(Command.java:66) org.basex.gui.GUI.exec(GUI.java:383) org.basex.gui.GUI$5.run(GUI.java:346) Note: the XML I try to insert is created by Pellet, so I have little control over it. Not only does the query fail, but any subsequent query on the same collection now gives me a "Possible Bug?" message. Any ideas would be greatly appreciated. Mark Boon
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
On Jan 20, 2011, at 11:09 AM, Christian Grün wrote:
Mark, thanks for your mails. Just a short one.. Does the same error occur with the latest version of BaseX (6.5)? Christian
Actually, I just picked up this work where I left it a few weeks ago. Some reorganization at work made me change e-mail so I hadn't followed this list either. So I missed that a new version came out. I'll try it immediately. I'll get back with the result.
Mark
OK, I tried with BaseX 6.5. Now I don't get an error, but now my Ontology element remains empty.
This is the output of the query:
Query: replace node collection('bm_test_iam')/BOT-L/Ontology with <Ontology xmlns="http://www.w3.org/2002/07/owl#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xml:base="http://www.w3.org/2002/07/owl#"> Compiling: - pre-evaluating collection("bm_test_iam") Result: replace node document-node { "bm_test_iam" }/*:BOT-L/*:Ontology with element { "Ontology" } { attribute { "xml:base" } { "http://www.w3.org/2002/07/owl#" }, element { "Prefix" } { attribute { "name" } { "rdf" }, attribute { "IRI" } { "http://www.w3.org/1999/02/22-rdf-syntax-ns#" } }, element { "Prefix" } { attribute { "name" } { "rdfs" }, attribute { "IRI" } { "http://www.w3.org/2000/01/rdf-schema#" } }, element { "Prefix" } { attribute { "name" } { "xsd" }, attribute { "IRI" } { "http://www.w3.org/2001/XMLSchema#" } }, element { "Prefix" } { attribute { "name" } { "owl" }, attribute { "IRI" } { "http://www.w3.org/2002/07/owl#" } }, element { "SubClassOf" } { element { "Class" } { attribute { "IRI" } { "http://ar#boat" } }, element { "Class" } { attribute { "IRI" } { "http://ar#vehicle" } } } } Query plan: <Replace> <IterPath> <document-node() name="bm_test_iam"/> <IterStep axis="child" test="*:BOT-L"/> <IterStep axis="child" test="*:Ontology"/> </IterPath> <CElem> <Item value="Ontology" type="xs:QName"/> <CAttr> <Item value="xml:base" type="xs:QName"/> <Item value="http://www.w3.org/2002/07/owl#" type="xs:string"/> </CAttr> <CElem> <Item value="Prefix" type="xs:QName"/> <CAttr> <Item value="name" type="xs:QName"/> <Item value="rdf" type="xs:string"/> </CAttr> <CAttr> <Item value="IRI" type="xs:QName"/> <Item value="http://www.w3.org/1999/02/22-rdf-syntax-ns#" type="xs:string"/> </CAttr> </CElem> <CElem> <Item value="Prefix" type="xs:QName"/> <CAttr> <Item value="name" type="xs:QName"/> <Item value="rdfs" type="xs:string"/> </CAttr> <CAttr> <Item value="IRI" type="xs:QName"/> <Item value="http://www.w3.org/2000/01/rdf-schema#" type="xs:string"/> </CAttr> </CElem> <CElem> <Item value="Prefix" type="xs:QName"/> <CAttr> <Item value="name" type="xs:QName"/> <Item value="xsd" type="xs:string"/> </CAttr> <CAttr> <Item value="IRI" type="xs:QName"/> <Item value="http://www.w3.org/2001/XMLSchema#" type="xs:string"/> </CAttr> </CElem> <CElem> <Item value="Prefix" type="xs:QName"/> <CAttr> <Item value="name" type="xs:QName"/> <Item value="owl" type="xs:string"/> </CAttr> <CAttr> <Item value="IRI" type="xs:QName"/> <Item value="http://www.w3.org/2002/07/owl#" type="xs:string"/> </CAttr> </CElem> <CElem> <Item value="SubClassOf" type="xs:QName"/> <CElem> <Item value="Class" type="xs:QName"/> <CAttr> <Item value="IRI" type="xs:QName"/> <Item value="http://ar#boat" type="xs:string"/> </CAttr> </CElem> <CElem> <Item value="Class" type="xs:QName"/> <CAttr> <Item value="IRI" type="xs:QName"/> <Item value="http://ar#vehicle" type="xs:string"/> </CAttr> </CElem> </CElem> </CElem> </Replace> Timing: - Parsing: 0.87 ms - Compiling: 1.21 ms - Evaluating: 2.33 ms - Printing: 0.14 ms - Total Time: 4.55 ms
When I now do collection('bm_test_iam')/BOT-L/Ontology the "Text" panel just contains:
<Ontology/>
where I expected it to contain the XML I just inserted.
Mark Boon
On Jan 20, 2011, at 11:13 AM, Mark Boon wrote:
On Jan 20, 2011, at 11:09 AM, Christian Grün wrote:
Mark, thanks for your mails. Just a short one.. Does the same error occur with the latest version of BaseX (6.5)? Christian
Actually, I just picked up this work where I left it a few weeks ago. Some reorganization at work made me change e-mail so I hadn't followed this list either. So I missed that a new version came out. I'll try it immediately. I'll get back with the result.
Mark
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Hi Mark,
I'm sorry, but I think I need some more information to find a helpful answer. Do you have a little example (sscce) that allows us to reproduce the issue?
Christian ___________________________
On Thu, Jan 20, 2011 at 10:27 PM, Mark Boon mboon@blueplanetsoftware.com wrote:
OK, I tried with BaseX 6.5. Now I don't get an error, but now my Ontology element remains empty. This is the output of the query: Query: replace node collection('bm_test_iam')/BOT-L/Ontology with <Ontology xmlns="http://www.w3.org/2002/07/owl#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xml:base="http://www.w3.org/2002/07/owl#"> Compiling:
- pre-evaluating collection("bm_test_iam")
Result: replace node document-node { "bm_test_iam" }/*:BOT-L/*:Ontology with element { "Ontology" } { attribute { "xml:base" } { "http://www.w3.org/2002/07/owl#" }, element { "Prefix" } { attribute { "name" } { "rdf" }, attribute { "IRI" } { "http://www.w3.org/1999/02/22-rdf-syntax-ns#" } }, element { "Prefix" } { attribute { "name" } { "rdfs" }, attribute { "IRI" } { "http://www.w3.org/2000/01/rdf-schema#" } }, element { "Prefix" } { attribute { "name" } { "xsd" }, attribute { "IRI" } { "http://www.w3.org/2001/XMLSchema#" } }, element { "Prefix" } { attribute { "name" } { "owl" }, attribute { "IRI" } { "http://www.w3.org/2002/07/owl#" } }, element { "SubClassOf" } { element { "Class" } { attribute { "IRI" } { "http://ar#boat" } }, element { "Class" } { attribute { "IRI" } { "http://ar#vehicle" } } } } Query plan:
<Replace> <IterPath> <document-node() name="bm_test_iam"/> <IterStep axis="child" test="*:BOT-L"/> <IterStep axis="child" test="*:Ontology"/> </IterPath> <CElem> <Item value="Ontology" type="xs:QName"/> <CAttr> <Item value="xml:base" type="xs:QName"/> <Item value="http://www.w3.org/2002/07/owl#" type="xs:string"/> </CAttr> <CElem> <Item value="Prefix" type="xs:QName"/> <CAttr> <Item value="name" type="xs:QName"/> <Item value="rdf" type="xs:string"/> </CAttr> <CAttr> <Item value="IRI" type="xs:QName"/> <Item value="http://www.w3.org/1999/02/22-rdf-syntax-ns#" type="xs:string"/> </CAttr> </CElem> <CElem> <Item value="Prefix" type="xs:QName"/> <CAttr> <Item value="name" type="xs:QName"/> <Item value="rdfs" type="xs:string"/> </CAttr> <CAttr> <Item value="IRI" type="xs:QName"/> <Item value="http://www.w3.org/2000/01/rdf-schema#" type="xs:string"/> </CAttr> </CElem> <CElem> <Item value="Prefix" type="xs:QName"/> <CAttr> <Item value="name" type="xs:QName"/> <Item value="xsd" type="xs:string"/> </CAttr> <CAttr> <Item value="IRI" type="xs:QName"/> <Item value="http://www.w3.org/2001/XMLSchema#" type="xs:string"/> </CAttr> </CElem> <CElem> <Item value="Prefix" type="xs:QName"/> <CAttr> <Item value="name" type="xs:QName"/> <Item value="owl" type="xs:string"/> </CAttr> <CAttr> <Item value="IRI" type="xs:QName"/> <Item value="http://www.w3.org/2002/07/owl#" type="xs:string"/> </CAttr> </CElem> <CElem> <Item value="SubClassOf" type="xs:QName"/> <CElem> <Item value="Class" type="xs:QName"/> <CAttr> <Item value="IRI" type="xs:QName"/> <Item value="http://ar#boat" type="xs:string"/> </CAttr> </CElem> <CElem> <Item value="Class" type="xs:QName"/> <CAttr> <Item value="IRI" type="xs:QName"/> <Item value="http://ar#vehicle" type="xs:string"/> </CAttr> </CElem> </CElem> </CElem> </Replace> Timing: - Parsing: 0.87 ms - Compiling: 1.21 ms - Evaluating: 2.33 ms - Printing: 0.14 ms - Total Time: 4.55 ms When I now do collection('bm_test_iam')/BOT-L/Ontology the "Text" panel just contains: <Ontology/> where I expected it to contain the XML I just inserted. Mark Boon
On Jan 20, 2011, at 11:13 AM, Mark Boon wrote:
On Jan 20, 2011, at 11:09 AM, Christian Grün wrote:
Mark, thanks for your mails. Just a short one.. Does the same error occur with the latest version of BaseX (6.5)? Christian
Actually, I just picked up this work where I left it a few weeks ago. Some reorganization at work made me change e-mail so I hadn't followed this list either. So I missed that a new version came out. I'll try it immediately. I'll get back with the result. Mark _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
basex-talk@mailman.uni-konstanz.de