6 ms·
>If you're using Schemas for your XML then you need namespaces in case you've got two different elements from different schemas that have the same name. Isn't
by tonyedgecombe 5y ago
>If you're using Schemas for your XML then you need namespaces in case you've got two different elements from different schemas that have the same name.
Isn't that where the problems start, I'm willing to bet 99% of XML documents don't have more than one schema. We have ended up with a ton of complexity to support a minority of use cases. It's no wonder people embraced JSON.
- buzer 5y agoThese days I wouldn't be surprised if fairly large portion of XML documents that are still in use/produced did have multiple schemas. Most of the simple use cases have already moved to JSON or similar formats. One very common case where there are multiple schemas is SAML. SAML protocol responses have their own schema, SAML assertions have their own schema, assertions usually define their type with different schema (XML schema instance) & XML signatures have their own schema. https://www.samltool.com/generic_sso_res.php https://www.samltool.com/generic_sso_res.php for example
- codeulike 5y agoyes exactly, they tried to make xml V1 cover every eventuality for all time and created a fussy mess
- le-mark 5y agoSo many schemas are all or nearly all optional elements, so the point about typing rarely works oh in practice.
- usrusr 5y agoEven worse than that: 99% of all schemas mandate exclusivity (or at least exclusive subtrees, it's been a while). The dominant schema techniques rule out markup unless you explicitly bends over for it while jumping through hoops.