Sandro Hawke
(sandro@w3.org)
XML Versioning Symposium, at Balisage
11 August 2008
http://www.w3.org/2008/Talks/0811-xtan
Forward compatibility is needed for web-scale systems to improve. ("There is no one administrator")
Making languages extensible -- predicting the future -- is too hard.
XML Transform-As-Needed (XTAN) may solve this problem (at some cost).
XTAN:
I'm here to talk about a new approach to forward compatibility. The approach is simply this: when you get an XML document you don't understand, you use the namespace URIs to lookup instructions for transforming it into something you do understand.
My claim is that in many cases this is a practical solution to the problem of versioning languages -- which is really a critical problem in building decentralized systems -- and it should be standardized and widely adopted.
What if Alice rejects beta documents?
Bob has a difficult choice:
For the system to move forward, Bob needs to be able to publish in beta without causing problems for Alice.
If HTML had always had XTAN (and XML with namespaces), then browsers which didn't implement <blink> could have followed this process:
For "table" there is no good fallback. Whatever we do will be very lossy.
At least with XTAN, the developers of "table" have a choice.
This is a first-pass design.
Usage: xtan [options] input-location Options: -F FEATURES, --allowed-feature=FEATURES Add this feature to the set of implemented features -W WEIGHTS, --weight=WEIGHTS Add weight co-efficient for given impact type, format is like '0.25 performance'
(You can't safely change the meaning of a tag. Just add new tags.)
<xs:schema
...
<xs:element name="a" type="xs:string">
<xs:annotation xtan:mayIndicate="feature-a"/>
</xs:element>
</xs:schema>
Generalization of "Delete subtree"
Generalization of all of the above
Scenario: Calendaring application uses RIF to support very complex scheduling rules.
Severity |
Area of Impact |
|||
---|---|---|---|---|
Soundness |
Completeness |
Performance |
Presentation |
|
> 0.5 |
Serious Error |
Warning |
Warning |
Ignore |
<= 0.5 | Warning |
Warning |
Ignore |
Ignore |
<a xmlns="http://www.w3.org/2008/02/xtan/test/0100-hello-world/ns"> Hello, World </a>
xtan --allowed-feature feature-b data.xml
<b xmlns="http://www.w3.org/2008/02/xtan/test/0100-hello-world/ns"> Hello, World </b>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xtan="http://www.w3.org/2008/XTAN" xmlns:test1="http://www.w3.org/2008/02/xtan/test/1-ns" targetNamespace="http://www.w3.org/2008/02/xtan/test/1-ns" elementFormDefault="qualified" version="$Id: Overview.html,v 1.33 2008/08/11 18:16:53 sandro Exp $"> <xs:annotation> <xs:appinfo> <xtan:Transform xtan:removes="feature-a" xtan:adds="feature-b"> <xtan:operation> <xtan:GlobalElementSubstitution xtan:old="a" xtan:new="b"/> </xtan:operation> </xtan:Transform> </xs:appinfo> </xs:annotation> <xs:element name="a" type="xs:string"> <xs:annotation xtan:mayIndicate="feature-a"/> </xs:element> </xs:schema>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-US"
xmlns:extn="http://www.w3.org/2008/02/xtan/test/0200-blink">
<head>
<title>Blink Demo</title>
</head>
<body>
<p><extn:blink>Blinking Text</extn:blink></p>
</body>
</html>
xtan --allowed-feature b-element data.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-US"
xmlns:extn="http://www.w3.org/2008/02/xtan/test/0200-blink">
<head>
<title>Blink Demo</title>
</head>
<body>
<p><b>Blinking Text</b></p>
</body>
</html>
xtan --allowed-feature css-blink data.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-US"
xmlns:extn="http://www.w3.org/2008/02/xtan/test/0200-blink">
<head>
<title>Blink Demo</title>
</head>
<body>
<p><span style="text-decoration: blink;">Blinking Text</span></p>
</body>
</html>