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

Feature: Validate XML against XSD #220

Closed
boddi7 opened this issue Jan 2, 2020 · 15 comments
Closed

Feature: Validate XML against XSD #220

boddi7 opened this issue Jan 2, 2020 · 15 comments
Labels
Feature-Request New features suggested by users

Comments

@boddi7
Copy link

boddi7 commented Jan 2, 2020

I noticed that there is no way to validate a XML file against a XSD file. This would be a great feature for this project and would prevent people parsing invalid XML files.

@github-actions
Copy link

github-actions bot commented Jan 2, 2020

I'm glad you find this repository helpful. I'll try to address your issu ASAP. You can watch the repo for new changes or star it.

@amitguptagwl amitguptagwl added the Feature-Request New features suggested by users label Jan 3, 2020
@amitguptagwl
Copy link
Member

FXP is basically a syntax parser. But yes, parsing/validating against XSD is required in many cases. Hence, it is in the plan in the next major release.

@anxxp
Copy link

anxxp commented Jan 15, 2020

FXP is basically a syntax parser. But yes, parsing/validating against XSD is required in many cases. Hence, it is in the plan in the next major release.

First of all , thanks Amit for this excellent library. Just wanted to know, is there any timeline that you have planned for this feature? This would be really useful.

@amitguptagwl
Copy link
Member

@Anoop29 I'm working on FXP v4. This will take some time to complete. I have to then incorporate some priority issues in that. And then I'll pick this feature. Working in free time, I currently can't comment on any timelines. But hoping to complete v4 in next 2 weeks.

@guerrap
Copy link

guerrap commented Apr 12, 2021

Hi, any update on this?

@pumano
Copy link

pumano commented May 12, 2021

@amitguptagwl any news on this?

@amitguptagwl
Copy link
Member

Sorry I have taken a big gape from opensource in this pandemic. I'm completing cytorus and then will pick FXP v4. Sorry for the delay. But this feature is gonna take long time.

@pumano
Copy link

pumano commented Jun 6, 2021

@amitguptagwl thank you! I personally want validation by xsd schema it's very important for me now, if you find time to implement that, it's will be very good!

@sdykae
Copy link

sdykae commented Jun 16, 2021

This feature will be killing if done ;')
I have a case, duno if is going to work but, xsd files sometimes uses 'refs' and imports another xsd files namespaces to resolve the full xsd. An example is https://cpe.sunat.gob.pe/sites/default/files/inline-files/XSD%202.1.zip from https://cpe.sunat.gob.pe/node/88

These xsd files are used to validate against UBL 2.1 xml standard.
The main xsd is XSD 2.1/maindoc/UBL-Invoice-2.1.xsd and it calls other namespaces from around the dir.
Hope the funcion that calls validation understands and resolves agains relative references from those files ;')

@ehaynes99
Copy link

This would also help with #279

Without the schema, there's no real way it could determine that both of these are strings:

<FullName>Joe Schmoe</FullName>
<PhoneNumber>1234567890</PhoneNumber>

But it could properly differentiate if aware of a schema:

<xsd:element name="FullName" type="xsd:string"/>
<xsd:element name="PhoneNumber" type="xsd:string"/>

@hadwrf
Copy link

hadwrf commented Sep 17, 2021

It would be really useful feature. Please take consider that there are no consistent library doing xsd validation. If anyone knows, please notify me. Thank you.

@pumano
Copy link

pumano commented Sep 17, 2021

without parsing xml using xsd schema, for complex large structures this library is useless. @ehaynes99 show small example of it.

@amitguptagwl
Copy link
Member

All,
I've just completed detailed-xml-validator for some other need. Can you please explore and provide your feedback based on your need.

@Narretz
Copy link

Narretz commented Apr 16, 2024

@amitguptagwl a new schema format is cool I guess, but it doesn't replace the xsd schemas already out there that are used to validate xml files. Imo this issue should be reopened.

@amitguptagwl
Copy link
Member

@Narretz I found XSD little complex than the new format I used in detailed-xml-validator. Though, I've not add more features in that but some existing features make it easy to use. And direct embedding of rules make it to be used by non-technical people as well. Hence, there is no plan for XSD validation currently,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-Request New features suggested by users
Projects
None yet
Development

No branches or pull requests

9 participants