Closed srinivas-gangji closed 1 year ago
I'm glad you find this repository helpful. I'll try to address your issue ASAP. You can watch the repo for new changes or star it.
Can you please share the sample XML?
@amitguptagwl After spending sometime validating from my end, I am observing that this error occurs when I am validating below xml
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fn="http://www.w3.org/2005/xpath-functions" version="2.0">
</xsl:stylesheet>
Note : Please note that his only happens on production build ( i.e minified version of the library, using development build, doesn't produce any errors)
Update : @amitguptagwl I was able to resolve my issue by moving the validation mechanism to nodejs.
okay
Description
Running latest version causes below error ``` Uncaught TypeError: Assignment to constant variable. at h (validator.js:399:1) at C2Vs.t.validate (validator.js:121:1) ``` I think that the issue is caused due to the 'const' assignment in validator.js ```js } else { const isValid = validateAttributeString(attrStr, options); if (isValid !== true) { //the result from the nested function returns the position of the error within the attribute //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute //this gives us the absolute index in the entire xml, which we can use to find the line at last return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); } ``` ### InputUsing version 4.1.3
Code
Output
expected data
Would you like to work on this issue?
Bookmark this repository for further updates.