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

For Dynamic XSD support. #28

Open
ponmanikandanb opened this issue Mar 12, 2020 · 1 comment
Open

For Dynamic XSD support. #28

ponmanikandanb opened this issue Mar 12, 2020 · 1 comment

Comments

@ponmanikandanb
Copy link

I have a XSD having many XSD are imported.
I want to generate the schema, My XSD are not stored in a directory.
How can i solve this.

I try to convert the XSD to Avro. My XSD having more than one imported XSDs. I want to resolve all the imported XSD. I will get the XSDs dynamically, so i will pass the XSD and the imported XSD in the form of String. org.apache.xerces.xni.parser.XMLEntityResolver resolve the XSD via resource(directory). I want to resolve XSD by passing the imported XSD as String.

@GeethanadhP
Copy link
Owner

are you asking the code help in general or about this library??

if its the library, then as long as they are included and referenced in the root xsd, they should come out in the output avsc

if you get them dynamically, then writethem to a file instead and then call the library :)

if you want help in general, i have been out of the java world for quite sometime, i forgot most of what i wirte here :(, so probably have look here https://github.com/GeethanadhP/xml-avro/blob/master/src/main/scala/in/dreamlabs/xmlavro/SchemaBuilder.scala
my class SchemaResolver extends the XMLEntityResolver to resolve the tags, as part of the class it reads the other included xsd's, but instead you can use as string io stream there..
Hope thats what you are looking

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