My mistake. It appears I may have misstated my problem. The query I used worked fine for importing resources. The problem appears to be related to how BaseX parses the resources. It doesn’t appear to take into account default attribute values. Given that the Relax NG spec clearly states default attributes are not part of the design, this doesn’t come across as a surprise. However, default attributes are meaningful with regard to DITA and there is a Java framework you can install as a plugin to the DITA Open Toolkit that supports parsing of Relax NG DITA content with default attributes [1].

 

Is it possible to setup databases created in BaseX with Relax NG parsing of default attributes? Is it just a matter of including the dita-ng.jar from the DITA OT plugin in my classpath?

 

Thanks,

Jason

 

[1] https://github.com/oxygenxml/dita-relaxng-defaults

 

 

From: Jason Davis <jason.davis@hortonworks.com>
Date: Monday, September 17, 2018 at 10:36 AM
To: Robert Crews <rcrews@hortonworks.com>, "basex-talk@mailman.uni-konstanz.de" <basex-talk@mailman.uni-konstanz.de>
Subject: Re: Importing XML (DITA) validated with Relax NG schemas?

 

Robert sent this email to the list on my behalf last week. However, it’s not getting any traction. So, I am bumping it.

 

While I think BaseX is great and shows a lot of promise, my implementation of it is currently dysfunctional and I’m stumped on how to get my project moving. There is very little in the way of documentation regarding managing XML that validates against Relax NG. I’ve made some progress in terms of using XQuery to handle the import (which appears to be the only way of validating against Relax NG) but I keep running into odd errors such as “Resource ‘…’ does not exist” when it in fact does exist. Can someone on the BaseX team please respond to this thread and provide a bit of insight?

 

Thanks,

Jason

 

 

From: Robert Crews <rcrews@hortonworks.com>
Date: Wednesday, September 12, 2018 at 12:59 PM
To: "basex-talk@mailman.uni-konstanz.de" <basex-talk@mailman.uni-konstanz.de>
Subject: Importing XML (DITA) validated with Relax NG schemas?

 

I’m trying to set up BaseX to manage a repository of DITA content. The DITA content has been specialized to validate against Relax NG schemas instead of DTDs. While importing content that validate against DTDs is straight forward, I have not yet figured out the best way to import Relax NG based content. So, I have a few questions:

Thanks for your help!

[1] http://docs.basex.org/wiki/Validation_Module#RelaxNG_Validation

[2] http://docs.basex.org/wiki/Catalog_Resolver
      http://docs.basex.org/wiki/Options#CATFILE
      For reference, here is how Oxygen handles catalog resolution. See the bottom of Table 1. Catalog Mappings for a summary of how Relax NG is resolved.