Open expede opened 8 years ago
Hi,
Yes, it is related to the problem from 2009. The schema for xslt imports the schema for XML-schema (XMLSchema.xsd). That schema uses the 'notation' feature, which is not supported.
What you can easily do is remove some of these imports. They are probably only referred to via "xs:any" types. This means that you will still be able to parse the XML documents, but there will be no value for these "any" elements. That means that you are fine if you are not interested in these values, or of they do not occur.
If you do really need these values, then you could try what I did for SOAP: remove the reference to XML Schema (so use an edited version of the xslt schema), compile it and then add a simplified version of XMLSchema.xsd to the result using the (undocumented) function erlsom:add_xsd_model() - see here for an example.
In any case you have to be aware that the result of parsing an XML that has such a complex schema will be a pretty complicated data structure, so getting the information that you need from that will probably not be easy.
Good luck, Willem
Thanks for the quick response, @willemdj 😄
Thanks for the suggestions. I tried removing the imports, but it looks like the schema is relying on more than the xs:any
tags. I need to be able to display, modify, and validate the modified XML doc, so I can't skip fields, and the schema is part of an external standard 😭
Does erlsom:add_xsd_model
allow me to merge an arbitrary tree into a schema?
getting the information that you need from that will probably not be easy.
Couldn't agree more, but it's unavoidable 😢
Thanks again!
erlsom:add_xsd_model
allows you include the schema for XML schema. So you could try to remove the import of that schema from the relevant XSDs (such as the one for XLST), then compile that and finally apply erlsom:add_xsd_model
to the result.
If you can let me know exactly which XSD/standard you are trying to use, I can take a closer look and maybe make some more specific suggestions.
I just took another look, and I think that I wasn't going far enough down the chain of import
dependencies. I'm going to give your earlier suggestion another whirl, but I'm having encouraging results so far 😄 Thanks!
Everything appears good with add_xsd_model
👍 Thanks for the help!
Hello,
I'm experiencing an issue when compiling XSD that includes some of the W3C schema.
These appear to be the lines that break compilation:
I also get the same error when I download and attempt compilation on those schemas directly.
This may be related to #45 and this exchange from 2009. If that is the case, has a workaround found?
Thanks! 😄