4 ms·
Why would anyone add complexity to the syntax when you can make it simpler by removing the XML namespace? If you need to add namespaces, then you have already
by mozumder 11y ago
Why would anyone add complexity to the syntax when you can make it simpler by removing the XML namespace?
If you need to add namespaces, then you have already failed.
- ketralnis 11y agoIf you have XML namespaces, you can embed foreign XML types in your XML (like the grandparent's SVG example) and also keep your schema-validating XML generators/parsers. That's good for the same reason static type checking is good. It can also simplify the code that parses it. With an SVG XML document embedded right in your TV XML document, you can e.g. use your functions that take an SVG node regardless of whether it was the root node of a document or embedded in another document and render it to the screen. It can also let you do versioning. For instance, let's give a schema like <render> <image src="..." /> </render> Then in version 2 you support multiple screens, so now you want <render> <screen number="1"> <image src="..." /> </screen> <screen number="2"> <image src="..." /> </screen> </render> Example #2 should be an error in schema v1, and example #1 should be an error in schema v2 Part of that problem is solved with schema versioning and part of it is solved with namespaces.
- mozumder 11y agoYou can do all sorts of stuff if you make it more complicated. Doing more isn't a good thing.
- deleted 11y ago[deleted]
- SapphireSun 11y agoIt's if you want to have backwards compatible syntax supported by later devices. This will naturally happen as you add features and modify old ones. It's even more important in hardware devices that might might not be able to be updated later. EDIT: I think someone is probably down-voting me for a technical reason. Would you please explain it?
- mderazon 11y agoIf Apple wants to break BC they just do it. They control the entire ecosystem and has been known to break stuff pretty frequently and force everyone to keep up
- SapphireSun 11y agoI imagine they break stuff frequently, but not as frequently as they could if they wanted - though someone from Apple would know better than me of course.
- sosborn 11y ago> been known to break stuff pretty frequently Apple is really good about giving developers a heads up before deprecating anything.
- pilsetnieks 11y agoAs I understand it, you don't need to worry about backwards compatibility. You submit these pseudo-XML views along with your app when you publish it but what they do from there on out is up to them - they could "recompile" them to newer versions, they could compile them to some binary representation, whatever. But anyway, it's not your problem. Your responsibility is getting the app to the app store, their problem is getting the app from the app store to the devices, in whatever format they see fit. Despite the technological similarities, this isn't publishing to the web where you have to handle everything by yourself.
- jerf 11y agoAt this point in development, it would manifest by adding the attribute xmlns="http://apple.com/TVML/1.0" (or similar) to the top-level tag. And absolutely nothing else has to change. For that matter, even ignoring the issues of being able to embed foreign content later, just sheer versioning is a good enough reason to add that. And once you agree versioning is a good idea, why not do it via namespace? It's not like version="1.0" is materially different or shorter. If you're expressing a certain crabbiness about this being in XML in the first place, you'd have to take that up with Apple. But once you're using XML, you ought to take advantage of what comes with it.
- JonoW 11y agoNo, he just means adding a default namespace, it's a one-liner and shouldn't make anything more complicated