Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serializing EXI grammars #17

Open
danielpeintner opened this issue Nov 15, 2022 · 2 comments
Open

Serializing EXI grammars #17

danielpeintner opened this issue Nov 15, 2022 · 2 comments

Comments

@danielpeintner
Copy link
Member

Serializing the grammar to XML, or to JSON would likely solve my problem. I will investigate per the links you provided.

A standard and portable form for these grammars would be nice, but is not required, nor do we need the serialization of the grammar to be reusable across versions of Exificient nor versions of Java.

There are actually two reasons why a serialized grammar is needed.

(1) performance - the penalty of converting a large XSD into a grammar at startup

(2) resolver - eliminate the need to have multiple things to use the schema-aware EXI file: (a) entire schema and (b) software linked to our URI resolver (Apache Daffodil has a specific resolver that uses XML Catalogs, relative paths, and classpath search of directories/jars - which enables packaging XSD schemas into jar files like any reusable software module.)

Originally posted by @mbeckerle in EXIficient/exificient-core#8 (comment)

@danielpeintner
Copy link
Member Author

(1) performance - the penalty of converting a large XSD into a grammar at startup

You may want to try it out but my guess is that there is not much difference.
Feel free to provide some tests / measurements

(2) resolver - eliminate the need to have multiple things to use the schema-aware EXI file: (a) entire schema and (b) software linked to our URI resolver (Apache Daffodil has a specific resolver that uses XML Catalogs, relative paths, and classpath search of directories/jars - which enables packaging XSD schemas into jar files like any reusable software module.)

I am not sure whether I fully understand this problem description / concern.
Yes, you might be able to reduce dependency (like removing the xerces jar) and you may alo want to pack the XSDs in the classpath to avoid loading files e.g., from the web but I think this is all doable ..

@mbeckerle Note: we will not have the time to actually work on this feature in the near future without external support.. I am happy to take a look at your work.

@mbeckerle
Copy link

@danielpeintner Understood. There's a chance we'll be able to contribute something eventually. Right now the other ticket about maxOccurs="999" (or other large value that is not "unbounded") is a much higher priority issue for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants