Hi Christian,

Sorry for the delay, I installed a BaseX server on my side just to test things out but I have not used BaseX before.

So:

- I created a new database.
- Added an XML document to the database, the XML document containing a reference to the RNG schema. - Add an extra XML catalog to the BaseX configuration. In the ".basex" config file I added:

CATFILE=file:/D:/projects/eXml/frameworks/dita/DITA-OT2.x/catalog-dita.xml

Did I correctly add the reference to the XML catalog or should it be a file-like path instead?
For example if I

- Added the "dita-ng.jar" to the "lib/custom" folder. I thought things out and the "dita-ng.jar" does not need to be added with high priority in the class path, just adding it there should be enough.

- Create a new XQuery which loads the XML document and tries to list the root element (in order to see if the default attributes are loaded or not).

- Run the XQuery and I can do that as well as I installed an add-on for Oxygen XML Editor which allows me to run an XQuery:

http://argon-author.com/

After running the XQuery the returned XML content does not contain the default attributes expanded. So it does not work.

I will try to find more time to add some System.err's in the Java code of the "dita-ng.jar" and re-pack it, restart the server. Will I find that extra logging in the console I used to start "basexhttp.bat"? Or do I need to first configure the logging?

Regards,
Radu

Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

On 10/18/2018 12:16 AM, Christian Grün wrote:
Hi Radu,

Do you think the DITA parsing should work if dita-ng.jar is placed first
in the classpath?

Cheers,
Christian




Jason Davis <jason.da...@hortonworks.com
<mailto:jason.da...@hortonworks.com>> schrieb am Mo., 15. Okt. 2018, 17:46:

    Hi Christian, Radu,

    I’ve tried adding the dita-ng.jar to the lib/custom dir of basex and
    then manually modified the startup script to load it first. I can
    even confirm that it’s the first jar on the path using:

    proc:property('java.class.path')

    However, the database still fails to parse the XML with default
    attributes applied. I find myself having to cobble together an
    undesirable workaround whereby I manually supply the default
    attribute values myself in order to get my project to work with
    BaseX. Do you have any further suggestions for how I might get this
    to work?

    Thanks,
    Jason

    On 10/3/18, 3:24 AM, "Christian Grün" <christian.gr...@gmail.com
    <mailto:christian.gr...@gmail.com>> wrote:

        Hi Jason (cc to the list),

        > I set the CP variable like so:
        >
    
CP=$MAIN/BaseX.jar:$MAIN/lib/custom/dita-ng.jar:$MAIN/lib/*:$MAIN/lib/custom/*:$CLASSPATH
        >
        > This appears to be slightly different than the example you
    linked Christian. I’m using BaseX 9.0.2. Does this make a difference?

        The start scripts in the official distributions are created from the
        GitHub examples I linked, so they are slightly different.

        > I added an echo $CLASSPATH line under the CP variable. When I
    run the script, the echo statement is blank.

        In the script, no value will be bound to the $CLASSPATH variable.
        Instead, you can assign values to this variable by yourself, which
        will then be appended to the $CP variable. If you didn’t do so,
    and if
        your Linux environment does not have any other values assigned
    to this
        variable (which is the default), the output will necessarily be
    empty.

        > Is there a way to see how the classpath is set when running
    this script?

        To answer the "how": It will be set via the line that you will find
        some lines below in the script, and the -cp Java argument:

          exec java -cp "$CP" $BASEX_JVM org.basex.BaseX "$@"

        If you want to know which value is bound to $CP, try "echo $CP". In
        Java, the full user class path at runtime will be bound to the
        "java.class.path" system property. It can e.g. be retrieved via
        proc:property('java.class.path') [1].

        Christian

        [1] http://docs.basex.org/wiki/Process_Module#proc:property






Reply via email to