projectodd / vdx Goto Github PK
View Code? Open in Web Editor NEWHelpful error messages when xml parsing fails
License: Apache License 2.0
Helpful error messages when xml parsing fails
License: Apache License 2.0
Types that use xs:extension
don't show the extended attributes. Not yet reported upstream.
We currently don't show the other valid attributes if we find the given attribute on another element.
This can happen when a element can contain a sequence of xs:any
. One way to do this is to search the document for occurrences of the known parent, but requires parsing the doc, which we've been able to avoid so far.
Some WildFly parsers have code to detect duplicate attributes, but that code is never called, since the stax parser will throw before then when it sees a dupe. VDX shouldn't treat that as an unknown error.
The list of alternate element paths can be overwhelming for common attributes (if you misplace a 'name' attribute, for example).
It should ignore failures to parse the document
In the standalone.xml logging subsystem, the formatter
element has a different type, depending on where it is located. This causes vdx to report name
as an alternate attribute, even when it's not. We should be able to find the correct formatter
in the schema given the source doc and location in the doc.
WF currently reports duplicate unnamed elements as unexpected elements. We should be able to detect this case by the presence of that element as an earlier sibling.
A couple of options:
Use Constructor.newInstance()
instead.
This requires knowing the current parent element so we can search the schema for legal children of that element to compare against.
To reduce the width of the output. For example:
====================== Validation Error in standalone.xml ======================
89: </console-handler>
90: <periodic-rotating-file-handler name="FILE" autoflush="true"
91: category="WARN">
^ 'category' isn't an allowed attribute for the 'periodic-rotating-file-handler' element
92: <formatter>
93: <named-formatter name="PATTERN"/>
94: </formatter>
'category' is allowed on elements: subsystem > logger, subsystem > logging-profiles > logging-profile > logger
Did you intend to put it on one of those elements?
================================================================================
should be:
====================== Validation Error in standalone.xml ======================
89: </console-handler>
90: <periodic-rotating-file-handler name="FILE" autoflush="true"
91: category="WARN">
^ 'category' isn't an allowed attribute for the 'periodic-rotating-file-handler' element
92: <formatter>
93: <named-formatter name="PATTERN"/>
94: </formatter>
'category' is allowed on elements: subsystem > logger, subsystem > logging-profiles > logging-profile > logger
Did you intend to put it on one of those elements?
================================================================================
Due to trying to split a url using File.separator
instead of /
.
... based on the length of the word.
Currently only unexpected attributes and elements are handled.
This can happen when there are similar non-prefixed paths in the schema, and the prefixer treats them as the same path.
This would potentially allow supporting WildFly Swarm.
This is a requirement for logging in WildFly. Possibly make output of this code optional if we intend to ever use VDX with other projects.
I played a bit with latest WF build (https://ci.wildfly.org/guestAuth/repository/download/WF_Nightly/latest.lastFinished/wildfly-11.0.0.Alpha1-SNAPSHOT.zip) and noticed regression in SmokeStandaloneTestCase#emptyConfigFile - https://github.com/jboss-eap-qe/vdx-wildfly-testsuite/blob/master/src/test/java/org/wildfly/test/integration/vdx/standalone/SmokeStandaloneTestCase.java#L88.
Older: OPVDX002: Failed to pretty print validation error: Index: 0, Size: 0
Latest: OPVDX002: Failed to pretty print validation error: null
I'm sure it's in VDX 1.1.4 as I patched older build (which was using VDX 1.1.3) with new VDX and the issue appeared too.
Since they are contextually part of the same message.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.