Live data from Hacker News

Apple TV Markup Language

developer.apple.com

71–74 of 74 posts

Re: Apple TV Markup Language

#71
post #3

Earlier quoted context omitted.

It's not like HTML except for being XML which looks a lot like SGML. It's significantly more limited and more specific to the task than HTML. HTML comes with a lot of baggage that makes it unsuitable for a really specific use case.

It's not like HTML except for being XML which looks a lot like SGML. XML does not only look a lot like SGML, it is a proper subset of SGML: XML is an application profile or restricted form of SGML, the Standard Generalized Markup Language [ISO 8879]. By construction, XML documents are conforming SGML documents. http://www.w3.org/TR/xml11/

Unlike HTML, btw, which started out as a loose subset of SGML but has abandoned the goal of SGML compatibility in favour of conceptual simplicity.

Re: Apple TV Markup Language

#72
The main problem is that we are still using XML to do component definition and composition. We need to better language (no, json and yaml are not the answer).

I am working on a new language concept (still at early thinking) but the alert template document would be defined as:

  alert#update_available [  //Composition is separated from definition
     btn#update,
     btn#cancel
  ]

  alert { //All alert elements are defined as alertTemplate
     type: alertTemplate
  }

  btn { //All btn elements are define as button
     type: button
  }

  alert#update_available { //Define the title and description for the alert with ID update_available
     title: Get the latest tvOS version
     description: Get the latest tvOS version
  }

  btn#update {
     text: Update Now
  }

  btn#cancel {
     text: Cancel
  }

  //We could override the settings like CSS
  (@language = "pt_br") { 
  //If variable language is pt_br override the content with Brazilian Portuguese texts
    btn#update {
       text: Atualize Agora
    }

    btn#cancel {
       text: Cancelar
    }
  }

Re: Apple TV Markup Language

#73
post #67

Oh look, it's XAML for an Apple device. That's only half-sarcastic; it does seem to be a similar but much-simplified markup language that learned a lot from HTML5. Will be interesting to watch it develop. As others have commented, though, XML without namespaces is not a fun ride (in my humble experience). [0] https://en.wikipedia.org/wiki/Extensible_Application_Markup_...

If XHTML had prevailed, we would already had XAML for the web, instead HTML keeps getting hacks.

Re: Apple TV Markup Language

#74
post #20

If any of the authors are reading, you really ought to consider putting this into an XML namespace. It can just be a mysterious invocation to most users today, but if you need to extend this in the future (inline SVG? inline XHTML?), it'll save your bacon to have done it in the first version.

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.

No, he just means adding a default namespace, it's a one-liner and shouldn't make anything more complicated
Post reply on HN