The eXtensible Programming System

XPS Frequently Asked Questions

Here's the list of questions we get frequently. Unlike many FAQ's, its not a marketing tool. These really are the questions we keep answering.

Didn't find your question? Submit a new one here

Why would I want to program in XML?

The quick answer: you wouldn't. XPL uses XML because it provides a rich set of syntactical and structural validation rules and its quick to parse. We have never intended programmers to type in programs in XML. We expect that an Integrated Development Environment will display the XPL programs in a fashion suitable to its users. XML was chosen to make XPS effective. Humans doing programming with XPS will work at a higher level.

What's wrong with current programming systems?

Well, there's a loaded question! On the one hand, there is nothing wrong with the way current programs are being written. They work fine within their domains. On the other hand, they aren't comprehensive or extensible enough to bring computer programming to the masses (one of XPS's goals). Each language comes with its own syntax, specialties, quirks and limitations. XPS will create a uniform syntax for all types of programming and consolidate the basic tenets of computer science into one platform for application construction. On top of that foundation, it will make it easy to extend the reach of XPS through the creation of domain specific programming languages just by simple text manipulations.

Why doesn't XPL use the XML ID and IDREF feature?

While we would like to conform to XML on this point, the XML specification doesn't provide enough utility for us. The main problem is that IDREF attributes can only refer to an ID defined in the same document. Unfortunately, programs are composed of many "documents" (modules) which need to refer to each other. We do this in xpl by allowing the name element to be either an XML Name value (referencing something in another module) or an XML NCName value (referencing something in the same module). For example, suppose you have the following XPL:

<Module name="mod1" pubid="file:///mod1.xpl">
 <import name="mod2" pubid="file:///mod2.xpl" prefix="m2">
 <Pointer name="a_ptr" to="m2:a_type">
</Module>

Here you've got the pointer type at_ptr referencing a type named a_type that is defined in the module named mod2 and referenced by the m2:a_type value for the to attribute. If we were to use XML's IDREF feature this would be illegal. IDREF cannot refer to an identifier defined in another document, only to identifiers in the same document.

If your next question is to ask why we don't use XML include to include the mod2.xpl document so that the IDREF can work, we've thought of that too. The answer is that it creates too much overhead in processing XPL programs. The import feature of XPL is intended to be implemented intelligently so that a database or binary form of the imported module is consulted and not reparsed from scratch. Furthermore, it opens up problems with name clashes between modules since the IDREF values are not scoped in namespaces the way elements and attributes are.