-
Notifications
You must be signed in to change notification settings - Fork 8
XML Key Ordering, missing namespaces, decimal conversion additions #204
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
XML Key Ordering, missing namespaces, decimal conversion additions #204
Conversation
|
Thanks Alex! |
|
Of course, it came from the requirement that our NF seems to require list elements with a key defined to have the first children in the order defined in that key, which may not be the alphabetical order. In the current sort implementation, abc would be the first child and before id which would cause the config to be rejected by the NF. SchemaBound takes this key priority ordering into account when generating the XML structure, placing them in the correct order (according to the schema) first, then sorting the remaining non-key children alphabetically. This PR actually should depend on sdcio/schema-server#134 which fixes the order of the keys sent by the schema-server to match the order given in the Yang model. |
|
You seem to be totally right...
|
Happy to look into this, could you give an example of what your idea is? I am not sure how the data type would be used to define the order of the list children |
|
right now we're using tvToString and then do use tring order... to lets take the type into account and convert (u)int(8,16,32) to (u)ints and not use string comparison. |
…d NormalizedAbsPath function to utils, handle empty string to Parse(U)Int
d4bf449 to
f804b64
Compare
…eleting prefixes from key names as well
i will approve schema-server and bump the version; then will update this PR with the adjusted version |
hansthienpondt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR includes several fixes: