4 ms·
Cardinality is the easy way to resolve this. If the data has a cardinality of 1, it should be an attribute. If cardinality > 1, it should be a child element/nod
by TedDoesntTalk 5mo ago
Cardinality is the easy way to resolve this. If the data has a cardinality of 1, it should be an attribute. If cardinality > 1, it should be a child element/node.
- throw310822 5mo agoNot sure I understand. How do you represent an object nested in another object?
- audunw 5mo agoIt’s not easy though. When we started with html we assumed images could only have one source. It was obvious that cardinality was 1. Later we realised we could have multiple versions of the same image. With audio tags that was resolved. I’ve come to realise that it’s almost always a mistake to assume a cardinality of 1, unless it’s something that is defined to be artificially unique like the id attribute.