- this.qname = ctx.getStatementArgument();
- this.path = Utils.getSchemaPath(ctx);
- //:TODO init other fields
-
- initSubstatementCollections();
- }
-
- private void initSubstatementCollections() {
- Collection<? extends EffectiveStatement<?, ?>> effectiveSubstatements = effectiveSubstatements();
-
- LinkedList<UnknownSchemaNode> unknownNodes = new LinkedList<UnknownSchemaNode>();
+ this.original = ctx.getOriginalCtx() == null ? null : (LeafListSchemaNode) ctx.getOriginalCtx()
+ .buildEffective();
+
+ final TypeEffectiveStatement<?> typeStmt = SourceException.throwIfNull(
+ firstSubstatementOfType(TypeEffectiveStatement.class), ctx.getStatementSourceReference(),
+ "Leaf-list is missing a 'type' statement");
+
+ final ConcreteTypeBuilder<?> builder = ConcreteTypes.concreteTypeBuilder(typeStmt.getTypeDefinition(),
+ ctx.getSchemaPath().get());
+ boolean isUserOrdered = false;
+ for (EffectiveStatement<?, ?> stmt : effectiveSubstatements()) {
+ if (stmt instanceof OrderedByEffectiveStatementImpl) {
+ isUserOrdered = ORDER_BY_USER_KEYWORD.equals(stmt.argument());
+ }