You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Burn Lewis <bu...@gmail.com> on 2015/02/05 14:47:34 UTC

UIMA-AS doesn't allow dd2spring to use a custom parser

If an application uses -Duima.framework_impl to insert a custom XML parser
that modifies descriptors by, for example, substituting values for some
entity references, then the Saxon parser used by dd2spring may fail when
reading the unmodified descriptors.  So we must also provide a hook to
allow dd2spring to use a custom parser when it constructs the spring
context files.

One approach would be to add another system property, perhaps
-Duima.dd2spring_saxparser.  But since this is only needed if
-Duima.framework_impl is specified it would be simpler to say the dd2spring
parser's class name must be derived from the custom framework's class name,
e.g. by appending, say, "_SAXParser".  One advantage of this approach is
that if the pre-processing done by dd2spring is ever moved into Java then
this problem would go away as only one parser would be used.

I am currently testing a modification to Dd2spring.java that checks if such
a class exists and if so adds it to the xslt transform call.

Burn