Closed paulemilechilin closed 1 month ago
More details : The current implementation only includes elements where the type attribute starts with xsd:. However, in some cases, the type prefix may start with xs: instead, causing relevant elements to be omitted from properties. current implementation : const properties = typeElementsEls .filter((el) => getElementAttribute(el, 'type').startsWith('xsd:')) .reduce( (prev, curr) => ({ ...prev,
getElementAttribute(curr, 'type')
),
}),
);
proposed implementation : something like : const properties = typeElementsEls .filter((el) => /^xsd:|^xs:/.test(getElementAttribute(el, 'type'))) .reduce( (prev, curr) => ({ ...prev,
getElementAttribute(curr, 'type')
),
}),
{}
);
Thank you for the suggestions! I implemented it. Let me know if that works for you!
When calling the parseFeatureTypeInfo function, there is a problem with how the properties field is handled. Currently, the logic to parse the properties only processes elements where the type attribute starts with xsd:. This results in certain elements being excluded if their type does not follow this pattern, causing incomplete or incorrect feature type information. Proposed Solution: remove .startsWith('xsd:') on getElementAttribute(el, 'type')