News for hackers. Stuff that matters.
Re:When XML Beats JSON: UI Layouts by Mikhail_Edoshin on Thursday October 31, 2019 @02:09AM (#21406125)
I want to address that reuse/repetition thing. It's totally possible to do this in XML+XSLT. E.g. you have some repeating structure that totally calls for what would be a helper function in a conventional language, say, "createMyButton(this, that)". In XML that could be done like this:

    <android:whatever xmlns:ext="urn:my-corp/ui-ext">
       <ext:my-button this="..." that="..." />
    </android:whatever>
This gets fed into an XSLT file that copies everything intact and expands your custom elements:

    <xsl:template match="ext:my-button">
      <!-- expand into what you need -->
    </xsl:template>

There are no comments on this comment yet.