Posts with keyword: xpath


First-Class Namespaces in Programming Languages

Over the last few years, I've written plenty of programs--in various languages--that used a HTTP library to fetch an XML document pointed at by a URL and then used XPath to grab parts and pieces of that XML document. The problem with this is that I'm using two different namespaces (the URI and the XML) neither of which is directly supported by my programming language. Programs that use relational databases suffer similarly: a datastore with a namespace that is extralingual. One of the great selling points of JSON is that it reduces the cognitive load of
Continue reading {First-Class Namespaces in Programming Languages}


Symmetric Queries in XML

Also in the XML session, Shuohao Zhang from Washington State University spoke on Symmetrically Exploiting XML. This paper was nominated as a best student paper. (See the paper.) XML queries are asymmetric because they're hierarchical. Rearranging the hierarchy requires changing the query. This work is aimed at making a single query work across multiple structures. This is useful when you don't know what the schema is, for heterogeneous or irregular data, or when the schema evolves. Axes (parent, child, ancestor, descendent, preceding, following, etc.) are all directional. This work proposes a non-directional axes called closest. The semantics is a
Continue reading {Symmetric Queries in XML}