Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a flag to control the use of identityref types with values #118

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apteryx-xml.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ typedef enum
SCH_F_ADD_MISSING_NULL = (1 << 12), /* Add missing nodes with NULL values */
SCH_F_SET_NULL = (1 << 13), /* Set all nodes to NULL */
SCH_F_FILTER_RDEPTH = (1 << 14), /* Set filter based on depth value */
SCH_F_IDREF_VALUES = (1 << 15), /* Expand identityref based values to include type information */
} sch_flags;
GNode *sch_path_to_gnode (sch_instance * instance, sch_node * schema, const char * path, int flags, sch_node ** rschema);
bool sch_query_to_gnode (sch_instance * instance, sch_node * schema, GNode *parent, const char * query, int flags, int *rflags);
Expand Down
2 changes: 1 addition & 1 deletion schema.c
Original file line number Diff line number Diff line change
Expand Up @@ -3593,7 +3593,7 @@ _sch_gnode_to_json (sch_instance * instance, sch_node * schema, xmlNs *ns, GNode
value = sch_translate_to (schema, value);
}

if (value)
if (value && (flags & SCH_F_IDREF_VALUES))
{
/* Check to see if the schema has any identityref information */
xmlChar *idref_module = xmlGetProp ((xmlNode *)schema, (const xmlChar *)"idref_module");
Expand Down
Loading