afs commented on issue #2828: URL: https://github.com/apache/jena/issues/2828#issuecomment-2466686235
Great analysis! `ext.xerces` exists to provide XSD datatypes and nothing more. `public` within `ext.xerces` doesn't contribute to the Jena API; it's only the Java need for one package to access classes in another. So I don't think this is a Jena6 matter and deleting and slimming down the code can happen as "internal" improvements. It has been valuable to have all the details of datatypes implemented in an efficient manner. Jena forked off the Xerces codebase when it switched to using the JDK parser, or user choice of XML parser, and then Jena stopped shipping a Xerces jar and ICU4J (which is huge). `ext.xerces` is not connected to any XML processing including RDF/XML parsing. Presumably why `NamespaceContext` isn't used. There is a use of `ext.xerces.impl.xpath.regex` in ARQ. It gives exact implementation of `REGEX` in SPARQL ([XPath/XQuery Functions and Operators regular expressions](https://www.w3.org/TR/xpath-functions-3/#regex-syntax)). The JDK regex subsystem is very close but not exact (there is a regex flag not provided) - JDK regex is used by default. I've opened the task #2833 to extract the regex engine for SPARQL/ARQ's use. The only use in the datatypes area of `xpath.regex` I can find is in `XSSimpleTypeDecl` to support pattern facets. Such custom XSD datatypes are (probably!) not needed and would be better implemented using the JDK code (which in openJDK is Xerces related, from a much older Xerces). I experimented by passing null from `XSDDatatype.parse` and deleting `ConfigurableValidationState`, `ValidationManager`, `ValidationState`. ``` typeDeclaration.validate(lexicalForm, null, resultInfo); ``` The build passed just fine. Your plan looks good and doesn't need to be coupled to Jena6, nor deprecate classes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
