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.davis@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.gruen@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