XML LONDON 2013 CONFERENCE PROCEEDINGS UNIVERSITY COLLEGE LONDON, LONDON, UNITED KINGDOM JUNE 15–16, 2013 XML London 2013 – Conference Proceedings Published by XML London Copyright © 2013 Charles Foster ISBN 978-0-9926471-0-0 Table of Contents General Information. 6 Sponsors. 7 Preface. 8 Building Rich Web Applications using XForms 2.0 - Nick van den Bleeken. 9 When MVC becomes a burden for XForms - Eric van der Vlist. 15 XML on the Web: is it still relevant? - O'Neil Delpratt. 35 Practice what we Preach - Tomos Hillman and Richard Pineger. 49 Optimizing XML for Comparison and Change - Nigel Whitaker and Robin La Fontaine. 57 What you need to know about the Maths Stack - Ms. Autumn Cuellar and Mr. Paul Topping. 63 Small Data in the large with Oppidum - Stéphane Sire and Christine Vanoirbeek. 69 Extremes of XML - Philip Fennell. 80 The National Archives Digital Records Infrastructure Catalogue: First Steps to Creating a Semantic Digital Archive - Rob Walpole. 87 From trees to graphs: creating Linked Data from XML - Catherine Dolbear and Shaun McDonald. 106 xproc.xq - Architecture of an XProc processor - James Fuller. 113 Lazy processing of XML in XSLT for big data - Abel Braaksma. 135 Using Distributed Version Control Systems Enabling enterprise scale, XML based information development - Dr. Adrian R. Warman. 145 A complete schema definition language for the Text Encoding Initiative - Lou Burnard and Sebastian Rahtz. 152 General Information Date Saturday, June 15th, 2013 Sunday, June 16th, 2013 Location University College London, London – Roberts Engineering Building, Torrington Place, London, WC1E 7JE Organising Committee Kate Foster, Socionics Limited Dr. Stephen Foster, Socionics Limited Charles Foster, XQJ.net & Socionics Limited Programme Committee Abel Braaksma, AbraSoft Adam Retter, Freelance Charles Foster (chair), XQJ.net Dr. Christian Grün, BaseX Eric van der Vlist, Dyomedea Jim Fuller, MarkLogic John Snelson, MarkLogic Lars Windauer, BetterFORM Mohamed Zergaoui, Innovimax Philip Fennell, MarkLogic Produced By XML London (http://xmllondon.com) Sponsors Gold Sponsor • OverStory - http://www.overstory.co.uk Silver Sponsor • oXygen - http://www.oxygenxml.com Bronze Sponsor • Mercator IT Solutions - http://www.mercatorit.com Preface This publication contains the papers presented during the XML London 2013 conference. This was the first international XML conference held in London for XML Developers – Worldwide, Semantic Web & Linked Data enthusiasts, Managers / Decision Makers and Markup Enthusiasts. This 2 day conference covered everything XML, both academic as well as the applied use of XML in industries such as finance and publishing. The conference took place on the 15th and 16th June 2013 at the Faculty of Engineering Sciences (Roberts Building) which is part of University College London (UCL). The conference dinner and the XML London 2013 DemoJam were held in the Jeremy Bentham Room at UCL, London. The conference will be held annually using the same format in subsequent years with XML London 2014 taking place in June 2014. — Charles Foster Chairman, XML London Building Rich Web Applications using XForms 2.0 Nick van den Bleeken Inventive Designers <[email protected]> Abstract XForms is a cross device, host-language independent markup language for declaratively defining a data XForms is a cross device, host-language independent markup processing model of XML data and its User Interface. It language for declaratively defining a data processing model uses a model-view-controller approach. The model of XML data and its User Interface. It reduces the amount consists of one or more XForms models describing the of markup that has to be written for creating rich web- data, constraints and calculations based upon that data, applications dramatically. There is no need to write any and submissions. The view describes what controls code to keep the UI in sync with the model, this is completely appear in the UI, how they are grouped together, and to handled by the XForms processor. what data they are bound. XForms 2.0 is the next huge step forward for XForms, XForms reduces the amount of markup that has to be making it an easy to use framework for creating powerful written for creating rich web-applications dramatically. web applications. There is no need to write any code to keep the UI in This paper will highlight the power of these new sync with the model, this is completely handled by the features, and show how they can be used to create real life XForms processor. web-applications. It will also discuss a possible framework XForms 2.0 is the next huge step forward for for building custom components, which is currently still XForms, making it an easy to use framework for creating missing in XForms. powerful web applications. This paper will first discuss the most important improvements in this new version of the specification, followed by an analysis of possible 1. Introduction improvements. Over the last 2 years there is a trend of moving away 2. XForm 2.0 from browser plug-in frameworks (Adobe Flash, JavaFX, and Microsoft silverlight) in favor of HTML5/Javascript This section will discuss the most important for building rich web-applications. This shift is driven by improvements of XForms compared to its previous the recent advances in technology (HTML5 [HTML5], version. Those improvements make it easier to create CSS [CSS] and Javascript APIs) and the vibrant browser powerful web applications that integrate with data market on one hand, and the recent security problems in available on the web. those plug-in frameworks on the other hand. Javascript is a powerful dynamic language, but a 2.1. XPath 2.0 potential maintenance nightmare if one is not extremely diligent. Creating rich web-applications using javascript XPath 2.0 [XPATH-20] adds a much richer type system, requires a lot of code. There are a lot of frameworks (like greatly expands the set of functions and adds additional Dojo [DOJO] and jQuery [JQUERY]) that try to language constructs like 'for' and 'if'. These new minimize the effort of creating user interfaces. Dojo even language features make it much easier to specify goes one step further by allowing you to create model- constraints and calculations. At the same time it makes it view-controller applications, but you still have to write a easier to display the data the way you want in the UI. lot of javascript to glue everything together. doi:10.14337/XMLLondon13.Bleeken01 Page 9 of 162 Building Rich Web Applications using XForms 2.0 Example 1. XPath 2.0: Calculate order price Example 3. Variables The folowing XPath expression calculates the sum of the <xf:var name="paging" value="instance('paging')"/> multiplication of the price and quantity of each item in <xf:group> the order: <xf:var name="total" value="$paging/@total"/> sum( for $n in order/item <xf:var name="page-size" return $n/price * $n/quantity value="$paging/@page-size"/> ) <xf:var name="page-count" value="($total + $page-size - 1) 2.2. Attribute Value Templates idiv $page-size"/> Attribute Value Templates [AVT] allow you the use <xf:output value="$page-count"> dynamic expressions virtually everywhere in the markup. <xf:label>Number of pages</xf:label> They are not limited to the XForms elements, but are </xf:output> supported on most host language attributes. Attribute </xf:group> Value Templates enable even more powerful styling of your form based on the data. As an example, a form 2.4. Custom Functions author can now easily highlight rows in a table based on certain data conditions (overdue, negative values, or Custom functions [CUST_FUNC] like variables allow complex conditions). In HTML5, this feature enables form authors to simplify expressions and prevent code the form author to declaratively specify when certain css- duplication without using extensions. classes apply to an element. Example 4. Custom Functions: Fibonacci Example 2. AVT: Higlight overdue jobs <function signature=" <xf:repeat ref="job"> my:fibonacci($n as xs:integer) as xs:integer"> <tr class="{ <var name="sqrt5" value="math:sqrt(5)" if(current-dateTime() > xs:dateTime(@due)) <result value="( then 'over-due' else '' math:power(1+$sqrt5, $n) - }"> math:power(1-$sqrt5, $n)) div ... (math:power(2, $n) * $sqrt5)" /> </tr> </function> </xf:repeat> 2.5. Non-XML data 2.3. Variables Because XForms' data model is XML it can consume Variables [VAR] make it possible to break down complex data from a lot of sources with little effort (SOAP expressions into pieces and make it easier to understand services, XML data bases using XQuery, REST XML the relationship of those pieces, by using expressive services, ...). Starting from XForms 2.0, XForms can variable names and documenting those individual pieces natively consume JSON data [JSON]. As more and more and their relationships. services on the web are starting to deliver JSON today Variables also facilitate in de-duplication of XPath this is an important feature. XForms implementations expressions in your form. In typical forms the same may support other non-XML file formats like CSV, expression is used multiple times (e.g.: XPath expression vCard, ... that calculates the selected language in a multi-lingual The form author can use all normal XForms UI). constructs (binds, UI controls, actions,...) independant from the data format of the external source. The XForms processor will build an XPath data model from the recieved data. Page 10 of 162 Building Rich Web Applications using XForms 2.0 2.6. Miscellaneous improvements 4.1. Using Custom Components Other interesting new features are: This section will discuss the aspects of a custom • Model based switching/repeats allows form authors to component that are relevant to the user of the capture the state of the switch/repeat in the model, component and demonstrate how custom controls can which makes it possible to save and restore the actual be used by the form author in an XForms document.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages162 Page
-
File Size-