Friday, August 25, 2017

Zoomable Android image view

By default, an ImageView is not zoomable in an Android app by a finger touch. Just found a brilliant customization of Android's ImageView, which is zoomable. It's located here:

To use it in the app, we just have to do TouchImageView iv = (TouchImageView) findViewById(; (in an Activity's onCreate method for example). Of course, TouchImageView supports all the behavior of standard ImageView class.

Monday, August 7, 2017

Mathematical table data with XML Schema 1.1

Here's a simple example, using XML Schema 1.1 <assert> to validate elementary school mathematical tables.

XML document:
<?xml version="1.0"?>
<table id="2">

XSD 1.1 document:
<?xml version="1.0"?>
<xs:schema xmlns:xs="">
   <xs:element name="table">
           <xs:element name="x" minOccurs="10" maxOccurs="10"/>
        <xs:attribute name="id" type="xs:positiveInteger" use="required">
             <xs:documentation>Mathematical table of @id is represented.</xs:documentation>
        <xs:assert test="x[1] = @id"/>
        <xs:assert test="every $x in x[position() gt 1] satisfies $x = $x/preceding-sibling::x[1] + @id">
              <xs:documentation>An XPath 2.0 expression validating the depicted mathematical table.    

Tuesday, August 1, 2017

Great write up on XML Schema 1.1

On this page, Roger L. Costello has posted some wonderful write up on XML Schema 1.1 technology. Enthusiasts are encouraged to read that.

Roger's language is very simple, and covers almost everything from the perspective of XML Schema 1.1 user's needs.