Skip to content

Conversation

@WReaganHarper
Copy link

  1. Value attributes in ___props were being set to undefined self key.
  2. Attributes with multiple values were handled improperly in ___props.
  3. According to XML spec, an attribute may only have one attribute of a given name. Therefore, the whole if statement "if self[lName] ~= nil then" block can go away, and the code in the else is all that should live. I kept it for backwards compatibility, but added a warning.
  4. Attribute values can now be directly referenced via node:properties().attribute_name as well as node["@attribute_name"] and node:properties()[attribute_number].value. This allows "for attr_name, attr_val in pairs(node:properties()) do" to work.

1) Value attributes in ___props were being set to undefined self key.
2) Attributes with multiple values were handled improperly in ___props.
3) According to XML spec, an attribute may only have one attribute of a given name. Therefore, the whole if statement "if self[lName] ~= nil then" block can go away, and the code in the else is all that should live. I kept it for backwards compatibility, but added a warning.
4) Attribute values can now be directly referenced via node:properties().attribute_name as well as node["@attribute_name"] and node:properties()[attribute_number].value. This allows "for attr_name, attr_val in pairs(node:properties()) do" to work.
@lfeng1420
Copy link

219 + table.insert(self.___props, {naame = name, value = self[lName] })
naame or name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants