I need to create my own SchemaPatternBuilder in
|
SchemaPatternBuilder spb = new SchemaPatternBuilder(); |
because the default SchemaPatternBuilder create ElementPattern, AttributePattern with a shared locator.
When the parse is done all locator for all pattern are false because they share the same locator (for validation it is enough, but in my case I need to get the proper locator after the parse is done.
That's why I extend SchemaPatternBuilder to copy locator.
How to customize SchemaPatternBuilder in SchemaReaderImpl?
To fix this problem I create my own SchemaReaderImpl and I do:
SchemaPatternBuilder spb = properties.get(SCHEMA_PATTERN_BUILDER);
if (spb == null) {
spb = new SchemaPatternBuilder();
}
If you like the idea, I could create a PR.
I need to create my own SchemaPatternBuilder in
jing-trang/mod/rng-validate/src/main/com/thaiopensource/validate/rng/impl/SchemaReaderImpl.java
Line 53 in 84ec6ad
When the parse is done all locator for all pattern are false because they share the same locator (for validation it is enough, but in my case I need to get the proper locator after the parse is done.
That's why I extend SchemaPatternBuilder to copy locator.
How to customize SchemaPatternBuilder in SchemaReaderImpl?
To fix this problem I create my own SchemaReaderImpl and I do:
If you like the idea, I could create a PR.