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

Not validating against a given XSD schema #5

Closed
Leigh-M opened this issue Jan 10, 2022 · 1 comment
Closed

Not validating against a given XSD schema #5

Leigh-M opened this issue Jan 10, 2022 · 1 comment

Comments

@Leigh-M
Copy link

Leigh-M commented Jan 10, 2022

The module appears to just verify if the XML file is valid XML, I can pass in an XSD schema which it accepts, eg:

<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="1.1"> <xs:element name="job-opportunities"> <xs:complexType> <xs:sequence> <xs:element ref="job-opportunity" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="isMigration" type="shortTextInputType"/> <xs:attribute name="isIncremental" type="xs:boolean" default="false"/> <xs:attribute name="datasourceKey" type="shortTextInputType"/> </xs:complexType> </xs:element> <xs:element name="job-opportunity"> <xs:complexType> <xs:sequence> <xs:element name="job-id" type="textInputID" minOccurs="1" maxOccurs="1"/> ...

And if I remove for eg 'job-id' from one of the input objects (XML fields) then it should fail validation - however it passes validation

@amitguptagwl
Copy link
Member

amitguptagwl commented Jan 11, 2022

This module uses it's own rule file which is different than XSD and looks more like XML data file. More features would be added in future versions. Currently, it just ensures frequency, type, range, and null validations only on top of syntax check done by FXP.

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