Skip to content

How to customize SchemaPatternBuilder in SchemaReaderImpl? #275

@angelozerr

Description

@angelozerr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions