We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"> <pic:pic> </pic:pic> </w:document>
const fastXmlParser = require("fast-xml-parser"); const result = fastXmlParser.validate(str); // result is true, but I expect it to be an error object.
I would expect to see an error telling that the "pic" namespace was not defined in the document.
This is what is shown when using : https://xmlvalidation.com/
Would you like to work on this issue?
The text was updated successfully, but these errors were encountered:
Yes, I hope it'll not be tuff to implement.
In validator.js, when we extract attributes name to validate them, we can extract NS to some object.
fast-xml-parser/src/validator.js
Line 80 in 0f1443a
We're already stacking tagName. Instead, we can stack a small object which will contain tagName and NS array attached with that tag.
Line 129 in 0f1443a
Now when we're popping the tagName to verify the closing tag, we can remove those NS from the NS object that we created in starting.
Line 106 in 0f1443a
Validation Now when we extract tag name or attribute name we can validate if the NS is bound or not.
Line 298 in 0f1443a
Sorry, something went wrong.
Added a PR for this: #275 PS: Blocked due to this. Would love to see this in the master soon.
Successfully merging a pull request may close this issue.
Description
Input
Code
Expected behavior
I would expect to see an error telling that the "pic" namespace was not defined in the document.
This is what is shown when using : https://xmlvalidation.com/
Would you like to work on this issue?
The text was updated successfully, but these errors were encountered: