xmlcatalog

How to use saxon built-in catalog feature

别来无恙 提交于 2020-01-11 10:35:29
问题 I downloaded SaxonHE9-4-0-6J and want to process XHTML on CLI. However Saxon tries to load DTD from W3C and it takes too much time for every simple command. I have xml catalog, which I use successfully with xmllint by set env variable pointing to catalog file, but I have no idea how to make Saxon use it. Google reveals whole history of changes (thus confusion) in regards of using catalogs with Saxon, and none made me happy. I downloaded resolver.jar and set it in my CLASSPATH, but I can't

JAXB separate episodes with annox customizations fails : SAXParseException2

泄露秘密 提交于 2019-12-20 03:07:43
问题 I have 2 maven modules. First one contains only a xsd schema to generate base POJO classes. Second on contains a xsd schema that imports first one with a catalog file and generate new POJO classes. Both generation works. Now, I add annotations to both xsd files with annox (Swagger annotations). First module compilation succeeded but seconds module compilation fails with and exceptions : [ERROR] Error while generating code.Location : com.sun.istack.SAXParseException2; systemId: jar:file:/C:

Cannot resolve the name 'X' to a(n) 'type definition' component

拥有回忆 提交于 2019-12-12 21:09:52
问题 There are many postings with the same title as this. I have looked at many of them, but their situations seem to be different from mine. I have a Java application that is configured at run-time by an XML file. There is a corresponding XML schema that defines the structure of the XML. The schema imports other schema to use type definitions they define. The application reads in the schema and configuration file and loads the XML as Java objects. The application is built using Apache Maven and

XML Catalog file failing to resolve

大兔子大兔子 提交于 2019-12-08 05:36:07
问题 I'm using an OASIS v 1.1 compatible resolver (Norm Walsh's XMLResolver in conjunction with the catalog below. However, I'm pretty sure I've made some sort of obvious error here (this is the first time I've needed to use v 1.1 features) since attempting to resolve OxChapML.dtd fails. Can anyone see something obviously wrong with this? Or even subtly wrong? <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN" "http://www.oasis-open.org/committees

Can XMLCatalog be used for schema imports?

梦想的初衷 提交于 2019-12-04 04:17:17
问题 Can you use XMLCatalog to resolve xsds in schema import statements? If so, what is the preferred/best practice? I want to package the xsds in a jar, so using a relative schemaLocation has not worked. So far I am trying to do something like: SchemaFactory factory = SchemaFactory .newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); XMLCatalogResolver catalogResolver = new XMLCatalogResolver( new String[]{"/path/to/catalog.xml"}); factory.setResourceResolver(catalogResolver); Schema schema =

Resolving type definitions from imported schema in XJC fails

久未见 提交于 2019-12-03 08:56:17
问题 I've got this API using JAXB to conveniently use object models, generated from XML Schemas by the XJC (XML-to-Java) compiler, through named references. It abstracts the creation of JAXB contexts and finding ObjectFactory methods away by all sorts of background magic and reflection. The basic gist of it is that you'd always define one general schema, and then any number (may also be 0) of schemas "extending" that general one, each resulting in its own data model. The general schema carries the

JAXB separate episodes with annox customizations fails : SAXParseException2

≯℡__Kan透↙ 提交于 2019-12-01 23:09:41
I have 2 maven modules. First one contains only a xsd schema to generate base POJO classes. Second on contains a xsd schema that imports first one with a catalog file and generate new POJO classes. Both generation works. Now, I add annotations to both xsd files with annox (Swagger annotations). First module compilation succeeded but seconds module compilation fails with and exceptions : [ERROR] Error while generating code.Location : com.sun.istack.SAXParseException2; systemId: jar:file:/C:/commons-0.0.1-SNAPSHOT.jar!/Commons.xsd; lineNumber: 15; columnNumber: 36; compiler was unable to honor