1 / 12

XML on the Web: is it still relevant?

XML on the Web: is it still relevant? . O'Neil D. Delpratt. XML on the Web: is it still relevant?. Successes of XML Why did this not take off and revolutionise the web ? Can it still happen?. XML on the Web: is it still relevant?. Web 2.0: Events/Interaction. Browser. JavaScript.

cassia
Download Presentation

XML on the Web: is it still relevant?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XML on the Web: is it still relevant? • O'Neil D. Delpratt

  2. XML on the Web: is it still relevant? • Successes of XML • Why did this not take off and revolutionise the web? • Can it still happen?

  3. XML on the Web: is it still relevant? Web 2.0: Events/Interaction Browser JavaScript VM HTML CSS doc JQuery, JSON XML XSLT 2.0 XML + XSLT 1.0 Server XQuery/PHP/Java/Perl/…

  4. Moving XSLT 2.0 to the browser + Web 2.0 • Multiple result files • targeted at different DIV areas on the page • Template rules to handle interaction • <xsl:template match=“button” mode=“onClick”> • Access to the dynamic HTML DOM • select="ixsl:page()//select[@name='speed']“ • Access to the browser window • select=“ixsl:get(ixsl:window(), ‘location’)” • Animation • <ixsl:schedule-action wait=“1000”> • 4

  5. Saxon-CE Demos • 5

  6. Documentation Browser • Documents stored on server in XML • mainly, “abstract” XHTML 5.0 • custom XML formats for Javadoc and for function specs • No server-side component • Single-page application using hash-bang URIs • 6

  7. User Interface Features • Persistent and visible #! URIs • Intra-site linking • Table of Contents • Search • 7

  8. Booklist sorting <xsl:template match="th" mode="ixsl:onclick"> <xsl:variable name="colNr" as="xs:integer" select="count(preceding-sibling::th)+1"/> <xsl:variable name="dataType" select="if (@data-type='number') then 'number' else 'text'" as="xs:string"/> <xsl:variable name="ascending" select="not(../../@data-order=$colNr)" as="xs:boolean"/> <xsl:result-documenthref="?select=." method="ixsl:replace-content"> <thead data-order="{if ($ascending) then $colNr else -$colNr}"> <xsl:copy-of select="thead/tr"/> </thead> <tbody> <xsl:perform-sort select="tbody/tr"> <xsl:sort select="td[$colNr]" data-type="{$dataType}" order="{if ($ascending) then 'ascending' else 'descending'}"/> </xsl:perform-sort> </tbody> </xsl:result-document> </xsl:template> • 8

  9. Saxon-CE: HTML DOM Tree doc onclick <a … Multiple result-document • Append • Replace-content <div id=“x”> • Events • Call-back to JavaScript functions

  10. Saxon-CE • Stripped down version of Saxon 9.3 • down to 60K lines of code • but still 100% conformant to XSLT 2.0 • File size 900KB • Compiled to JavaScript using Google Web Toolkit • GWT handles all browser differences • Skeletal HTML page contains • a link to the Saxon .JS executable • a link to the XSLT stylesheet • optionally, a link to an XML file on the server • XSLT extensions to handle • user interaction events • animation events • access to the JavaScript browser environment • 10

  11. Conclusion • Client-side XSLT 2.0 can be used to create rich Web 2.0 applications • handling the user interaction • and of course XML rendition • Good cross-browser interoperability • Plays well with JavaScript but eliminates most JS coding • Available as open source • 11

  12. Thank you & Questions Documentation browser: http://www.saxonica.com/documentation/index.html Saxon-CE download: https://github.com/Saxonica/Saxon-CE

More Related